新建指令先创建再下发,防止未插入数据库NDC已有反馈导致数据不存在
This commit is contained in:
@@ -339,7 +339,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
|||||||
|
|
||||||
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
|
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
|
||||||
StandardCoveyorControlWithScannerDeviceDriver standardCoveyorControlWithScannerDeviceDriver;
|
StandardCoveyorControlWithScannerDeviceDriver standardCoveyorControlWithScannerDeviceDriver;
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("acs_instruction");
|
||||||
try {
|
try {
|
||||||
String start_device_code = dto.getStart_device_code();
|
String start_device_code = dto.getStart_device_code();
|
||||||
String next_device_code = dto.getNext_device_code();
|
String next_device_code = dto.getNext_device_code();
|
||||||
@@ -360,6 +360,9 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
|||||||
if (ObjectUtil.isEmpty(route)) {
|
if (ObjectUtil.isEmpty(route)) {
|
||||||
throw new BadRequestException("未查询到相关路由!");
|
throw new BadRequestException("未查询到相关路由!");
|
||||||
}
|
}
|
||||||
|
JSONObject json = (JSONObject) JSONObject.toJSON(dto);
|
||||||
|
wo.insert(json);
|
||||||
|
|
||||||
NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class);
|
NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||||
ndcAgvService.sendAgvInstToNDC(task.getAgv_system_type(), dto);
|
ndcAgvService.sendAgvInstToNDC(task.getAgv_system_type(), dto);
|
||||||
|
|
||||||
@@ -370,10 +373,10 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
|||||||
log.error("");
|
log.error("");
|
||||||
}
|
}
|
||||||
|
|
||||||
WQLObject wo = WQLObject.getWQLObject("acs_instruction");
|
|
||||||
JSONObject json = (JSONObject) JSONObject.toJSON(dto);
|
JSONObject json = (JSONObject) JSONObject.toJSON(dto);
|
||||||
|
|
||||||
wo.insert(json);
|
wo.update(json);
|
||||||
instructions.add(dto);
|
instructions.add(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user