From a8a243f30c46726b202cc8fb7aaf73742e626e64 Mon Sep 17 00:00:00 2001 From: pangshenghao Date: Thu, 15 Jun 2023 11:11:32 +0800 Subject: [PATCH] =?UTF-8?q?1.wcs=E5=8F=96=E6=B6=88=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=90=8C=E6=97=B6=E5=8F=96=E6=B6=88=E6=8C=87?= =?UTF-8?q?=E4=BB=A4=202.0x03=E9=80=BB=E8=BE=91=E5=9B=9E=E6=BB=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../agv/ndcone/AgvNdcOneDeviceDriver.java | 10 +++++----- .../wms/service/impl/WmsToAcsServiceImpl.java | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java index 33d9045..e0f135b 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java @@ -173,8 +173,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic return; } -// Object reqWms = device.getExtraValue().get("reqWms"); -// if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")) { + Object reqWms = device.getExtraValue().get("reqWms"); + if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")) { JSONArray req = new JSONArray(); JSONObject map = new JSONObject(); map.put("vehicle_code", inst.getVehicle_code()); @@ -194,9 +194,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic } else { log.warn("指令号:{},acs请求wms取货申请失败,连接被拒绝,未反馈agv允许取货", inst.getInstruction_code()); } -// } else { -// data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); -// } + } else { + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); + } //取货完毕 //(需要WCS反馈) } else if (phase == 0x05) { diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java index 23b1bb6..fc74800 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java @@ -84,16 +84,18 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { } TaskDto taskDto = taskService.findByCodeFromCache(task_code); String cancelTaskCheck = paramService.findByCode(AcsConfig.CANCELTASKCHECK).getValue(); - if (StrUtil.equals(cancelTaskCheck, "1")) { - taskService.cancelNoSendWms(taskDto.getTask_id()); - } else if (StrUtil.equals(cancelTaskCheck, "0")) { + +// if (StrUtil.equals(cancelTaskCheck, "1")) { +// taskService.cancelNoSendWms(taskDto.getTask_id()); +// } else if (StrUtil.equals(cancelTaskCheck, "0")) { Instruction inst = instructionService.findByTaskcode(task_code); - if (inst == null) { - taskService.cancelNoSendWms(taskDto.getTask_id()); - } else { - throw new RuntimeException("指令正在执行中,操作失败!"); + if (inst != null) { + instructionService.cancelNOSendAgv(inst.getInstruction_id()); } - } + taskService.cancelNoSendWms(taskDto.getTask_id()); +// } else { +// throw new RuntimeException("指令正在执行中,操作失败!"); +// } }