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 3d283f6..a28a6b9 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 @@ -342,6 +342,9 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); Device startdevice = appService.findDeviceByCode(dto.getStart_device_code()); Device nextdevice = appService.findDeviceByCode(dto.getNext_device_code()); + WQLObject wo = WQLObject.getWQLObject("acs_instruction"); + JSONObject json = (JSONObject) JSONObject.toJSON(dto); + wo.insert(json); try { // != 0 为agv任务 @@ -386,10 +389,6 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu e.printStackTrace(); } - WQLObject wo = WQLObject.getWQLObject("acs_instruction"); - JSONObject json = (JSONObject) JSONObject.toJSON(dto); - - wo.insert(json); instructions.add(dto); } diff --git a/acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java b/acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java index 48cd921..6ce0bda 100644 --- a/acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java +++ b/acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java @@ -147,6 +147,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable { int carno = arr[20]; Instruction link_inst = null; Instruction inst = null; + Instruction instruction_status=null; List insts = null; boolean link_flag = false; Device agv_device = null; @@ -178,6 +179,8 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable { inst.setAgv_jobno(String.valueOf(index)); inst.setSend_status("1"); instructionService.update(inst); + } else { + log.info("agv的指令号{} agv指令状态为{} 未找到对应指令",inst,instruction_status); } data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); }