From 2f49f62c5dcdee465d438d8de48752b351cbeac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E4=BF=8A=E6=9D=B0?= <9463626+zhou-junjiezjj@user.noreply.gitee.com> Date: Tue, 12 Sep 2023 14:26:51 +0800 Subject: [PATCH] =?UTF-8?q?rev=20=E6=8C=87=E4=BB=A4=E7=94=9F=E6=88=90?= =?UTF-8?q?=E9=A1=BA=E5=AF=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../instruction/service/impl/InstructionServiceImpl.java | 7 +++---- .../org/nl/start/auto/run/NDCSocketConnectionAutoRun.java | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) 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); }