From d83f7c450b04ea62d082636e512392554cbdcfbe Mon Sep 17 00:00:00 2001 From: LENOVO <1793460677@qq.com> Date: Fri, 10 May 2024 19:19:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A6=81=E6=AD=A2=E5=87=BA=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E4=BB=BB=E5=8A=A1=E3=80=81=E6=9A=82=E5=81=9C=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StandardStackerDeviceDriver.java | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/stacker/standard_stacker/StandardStackerDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/stacker/standard_stacker/StandardStackerDeviceDriver.java index c1f6533b6..c3af51494 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/stacker/standard_stacker/StandardStackerDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/stacker/standard_stacker/StandardStackerDeviceDriver.java @@ -281,6 +281,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme */ Boolean requireSucess = false; + /** * 当前指令 */ @@ -809,11 +810,17 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme // } this.instruction_require_time = date; + //暂停任务 + if (!stopReceiveTask){ + this.notCreateInstMessage = "任务暂停"; + return false; + } //输入:指令类型多种\ 指令状态多种\ Instruction instruction1 = new Instruction(); instruction1.setInstruction_status("0"); List instructions = instructionService.findByDeviceCodes(instruction1, false); if (CollUtil.isEmpty(instructions) || instructions.size() < 1) { + this.notCreateInstMessage = "未找到任务"; return false; } List instructionList = new ArrayList<>(); @@ -863,7 +870,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme List list = new ArrayList(); pakageCommand(list,"1", inst.getInstruction_code()); - if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.conveyor.name())) { + if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.conveyor.name()) && !prohibitInWarehouse) { if (ObjectUtil.isNotEmpty(startDevice.getExtraValue().get("z"))) { HashMap map4 = new HashMap(); map4.put("code", "to_x"); @@ -883,7 +890,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme list.add(map6); } } - if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.storage.name())) { + if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.storage.name()) && !prohibitOutWarehouse) { pakagePlc(inst, list); } if (ObjectUtil.isNotEmpty(list)) { @@ -1107,9 +1114,12 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme //监控大屏下发作业命令清警-5、召回-7、急停-8 Integer toCommand = data.getInteger("toCommand"); if (toCommand != null) { - Map map = new HashMap<>(); - map.put("to_command", toCommand); - this.writing(map); + HashMap map1 = new HashMap(); + List list = new ArrayList<>(); + map1.put("code", "to_command"); + map1.put("value", toCommand); + list.add(map1); + this.writing(map1); } //ACS监控大屏设置禁止入库、禁止出库、停止接收任务 Boolean prohibitInWarehouse = data.getBoolean("prohibitInWarehouse");