diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java index 806cb6b..d8234f9 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java @@ -339,7 +339,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver; StandardCoveyorControlWithScannerDeviceDriver standardCoveyorControlWithScannerDeviceDriver; - + WQLObject wo = WQLObject.getWQLObject("acs_instruction"); try { String start_device_code = dto.getStart_device_code(); String next_device_code = dto.getNext_device_code(); @@ -360,6 +360,9 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu if (ObjectUtil.isEmpty(route)) { throw new BadRequestException("未查询到相关路由!"); } + JSONObject json = (JSONObject) JSONObject.toJSON(dto); + wo.insert(json); + NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class); ndcAgvService.sendAgvInstToNDC(task.getAgv_system_type(), dto); @@ -370,10 +373,10 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu log.error(""); } - WQLObject wo = WQLObject.getWQLObject("acs_instruction"); + JSONObject json = (JSONObject) JSONObject.toJSON(dto); - wo.insert(json); + wo.update(json); instructions.add(dto); }