多个固化室之间互相异常不影响

This commit is contained in:
psh
2024-06-21 14:50:52 +08:00
parent 7733485ea2
commit 9166305707
2 changed files with 28 additions and 20 deletions

View File

@@ -77,19 +77,23 @@ public class GHCMLTask extends AbstractTask {
List<SchBasePoint> ghsExitList = autoMapper.getGHSExitMaterialList();
AbstractTask task = taskFactory.getTask(TASK_CONFIG_CODE);
ghsExitList.forEach(point -> {
JSONObject param = new JSONObject();
param.put("config_code", TASK_CONFIG_CODE);
param.put("requestNo", "LMS" + IdUtil.simpleUUID());
param.put("device_code", point.getPoint_code());
param.put("vehicle_code", point.getVehicle_code());
param.put("vehicle_type", point.getVehicle_type());
param.put("create_mode", GeneralDefinition.AUTO_CREATION);
SchBaseVehiclematerialgroup groupInfo = vehiclematerialgroupService.getVehicleGroupInfo(
point.getVehicle_code(),
point.getVehicle_type(),
GroupBindMaterialStatusEnum.BOUND.getValue());
param.put("material_id", groupInfo.getMaterial_id());
task.apply(param);
try {
JSONObject param = new JSONObject();
param.put("config_code", TASK_CONFIG_CODE);
param.put("requestNo", "LMS" + IdUtil.simpleUUID());
param.put("device_code", point.getPoint_code());
param.put("vehicle_code", point.getVehicle_code());
param.put("vehicle_type", point.getVehicle_type());
param.put("create_mode", GeneralDefinition.AUTO_CREATION);
SchBaseVehiclematerialgroup groupInfo = vehiclematerialgroupService.getVehicleGroupInfo(
point.getVehicle_code(),
point.getVehicle_type(),
GroupBindMaterialStatusEnum.BOUND.getValue());
param.put("material_id", groupInfo.getMaterial_id());
task.apply(param);
} catch (Exception e) {
log.error("{}创建任务失败{}{}", this.TASK_CONFIG_CODE, e, e.getMessage());
}
});
}
@@ -307,7 +311,7 @@ public class GHCMLTask extends AbstractTask {
// throw new BadRequestException("找不到任务:[" + task_id + "]等待点!");
// }
if (!"DDD".equals(task.getPoint_code2())) {
log.info("任务号{}已请求过二次分配,直接返回已分配地址{}",task_id,task.getPoint_code2());
log.info("任务号{}已请求过二次分配,直接返回已分配地址{}", task_id, task.getPoint_code2());
return task.getPoint_code2();
}
// SchBasePoint waitPointObj = pointService.getById(waitPoint);

View File

@@ -76,12 +76,16 @@ public class GHCQLTask extends AbstractTask {
List<SchBasePoint> ghsExitList = autoMapper.getGHSExitAvailableList();
AbstractTask task = taskFactory.getTask(TASK_CONFIG_CODE);
ghsExitList.forEach(point -> {
JSONObject param = new JSONObject();
param.put("config_code", TASK_CONFIG_CODE);
param.put("requestNo", "LMS" + IdUtil.simpleUUID());
param.put("device_code", point.getPoint_code());
param.put("create_mode", GeneralDefinition.AUTO_CREATION);
task.apply(param);
try {
JSONObject param = new JSONObject();
param.put("config_code", TASK_CONFIG_CODE);
param.put("requestNo", "LMS" + IdUtil.simpleUUID());
param.put("device_code", point.getPoint_code());
param.put("create_mode", GeneralDefinition.AUTO_CREATION);
task.apply(param);
}catch (Exception e){
log.error("{}创建任务失败{}{}",this.TASK_CONFIG_CODE,e,e.getMessage());
}
});
}