From f59370c02338b9c876332bf984284f42de4b0904 Mon Sep 17 00:00:00 2001 From: pangshenghao Date: Wed, 14 Jun 2023 15:50:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=88=E7=82=B9=E5=AF=BB=E6=89=BE=E8=B5=B7?= =?UTF-8?q?=E7=82=B9=E8=B7=AF=E7=94=B1=E7=94=9F=E6=88=90=E6=8C=87=E4=BB=A4?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StandardInspectSiteDeviceDriver.java | 7 ++++++- .../instruction/service/impl/InstructionServiceImpl.java | 3 +-- .../org/nl/start/auto/run/NDCSocketConnectionAutoRun.java | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_inspect_site/StandardInspectSiteDeviceDriver.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_inspect_site/StandardInspectSiteDeviceDriver.java index 922b72f..1c91235 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_inspect_site/StandardInspectSiteDeviceDriver.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_inspect_site/StandardInspectSiteDeviceDriver.java @@ -493,15 +493,20 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp try { if (taskList.size() != 0) { for (TaskDto task : taskList) { + log.warn("当前取消任务code为{}",task.getTask_code()); + System.out.println("当前取消任务code为"+task.getTask_code()); Instruction inst = instructionService.findByTaskCodeFromCache(task.getTask_code()); if (ObjectUtil.isNotEmpty(inst)) { + log.warn("当前取消指令id为{}",inst.getInstruction_id()); + System.out.println("当前取消指令id为"+inst.getInstruction_id()); instructionService.cancel(inst.getInstruction_id()); } taskserver.cancel(task.getTask_id()); } } } catch (Exception e) { - e.printStackTrace(); + log.error("取消指令异常{}",e,e.getMessage()); + System.out.println("取消指令异常"+e.getMessage()); } writing(6); return true; diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java index 1a577f0..666ae4b 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java @@ -876,10 +876,9 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu } else if (StrUtil.equals(acsConfigService.findConfigFromCache().get(AcsConfig.AGVTYPE).toString(), "2")) { //NDC agv指令不当场取消指令,需要等agv上报 + flag = true; if (!StrUtil.isEmpty(entity.getAgv_jobno())) { agvService.deleteAgvInstToNDC(entity); - } else { - flag = true; } } else if (StrUtil.equals(acsConfigService.findConfigFromCache().get(AcsConfig.AGVTYPE).toString(), "3") && !StrUtil.equals(entity.getSend_status(),"2")) { diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java b/acs/hd/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java index 101afde..6809741 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java @@ -640,6 +640,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable { else if (phase == 0xFF) { flag = true; if (!ObjectUtil.isEmpty(inst)) { + log.info("当前删除instId为[]",inst.getInstruction_id()); instructionService.cancelNOSendAgv(inst.getInstruction_id()); } data = AgvService.sendAgvOneModeInst(phase, index, 0);