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");