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

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,6 +77,7 @@ public class GHCMLTask extends AbstractTask {
List<SchBasePoint> ghsExitList = autoMapper.getGHSExitMaterialList(); List<SchBasePoint> ghsExitList = autoMapper.getGHSExitMaterialList();
AbstractTask task = taskFactory.getTask(TASK_CONFIG_CODE); AbstractTask task = taskFactory.getTask(TASK_CONFIG_CODE);
ghsExitList.forEach(point -> { ghsExitList.forEach(point -> {
try {
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
param.put("config_code", TASK_CONFIG_CODE); param.put("config_code", TASK_CONFIG_CODE);
param.put("requestNo", "LMS" + IdUtil.simpleUUID()); param.put("requestNo", "LMS" + IdUtil.simpleUUID());
@@ -90,6 +91,9 @@ public class GHCMLTask extends AbstractTask {
GroupBindMaterialStatusEnum.BOUND.getValue()); GroupBindMaterialStatusEnum.BOUND.getValue());
param.put("material_id", groupInfo.getMaterial_id()); param.put("material_id", groupInfo.getMaterial_id());
task.apply(param); task.apply(param);
} catch (Exception e) {
log.error("{}创建任务失败{}{}", this.TASK_CONFIG_CODE, e, e.getMessage());
}
}); });
} }

View File

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