From d23281103fd7c8dc513095766ce896a6f8770ab5 Mon Sep 17 00:00:00 2001 From: miguannan <53815784+javami888@users.noreply.github.com> Date: Sat, 1 Aug 2026 09:49:36 +0700 Subject: [PATCH] =?UTF-8?q?add:=E7=9B=98=E7=82=B9=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=B8=8B=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../belt_conveyor/BeltConveyorDeviceDriver.java | 12 ++++++++---- .../box_package_manipulator/InteractionJsonDTO.java | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/lk_conveyor/belt_conveyor/BeltConveyorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/lk_conveyor/belt_conveyor/BeltConveyorDeviceDriver.java index 091c0b6..14fbed0 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/lk_conveyor/belt_conveyor/BeltConveyorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/lk_conveyor/belt_conveyor/BeltConveyorDeviceDriver.java @@ -537,11 +537,13 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements String interactionJson = handCodeTaskDto.getInteraction_json(); InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class); String containerType = "0"; + String type = "0"; if (ObjectUtil.isNotEmpty(interactionJsonDTO)) { containerType = interactionJsonDTO.getContainerType(); + type = interactionJsonDTO.getType(); } - List keys = new ArrayList<>(Arrays.asList(ItemProtocol.TO_TARGET.getKey(), ItemProtocol.TO_TASK.getKey(), ItemProtocol.TO_CONTAINER_TYPE.getKey(), ItemProtocol.TO_COMMAND.getKey())); - List values = new ArrayList<>(Arrays.asList(getTargetAddress(nextDevice), Integer.parseInt(instDto.getInstruction_code()), Integer.parseInt(containerType), ToCommandEnum.COMMAND_ONE.getSignalNum())); + List keys = new ArrayList<>(Arrays.asList(ItemProtocol.TO_BACK_UP_1.getKey(),ItemProtocol.TO_TARGET.getKey(), ItemProtocol.TO_TASK.getKey(), ItemProtocol.TO_CONTAINER_TYPE.getKey(), ItemProtocol.TO_COMMAND.getKey())); + List values = new ArrayList<>(Arrays.asList(type,getTargetAddress(nextDevice), Integer.parseInt(instDto.getInstruction_code()), Integer.parseInt(containerType), ToCommandEnum.COMMAND_ONE.getSignalNum())); this.writing(keys, values); this.requireSuccess = true; return; @@ -591,11 +593,13 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements String interactionJson = taskDto.getInteraction_json(); InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class); String containerType = "0"; + String type = "0"; if (ObjectUtil.isNotEmpty(interactionJsonDTO)) { containerType = interactionJsonDTO.getContainerType(); + type = interactionJsonDTO.getType(); } - List keys = new ArrayList<>(Arrays.asList(ItemProtocol.TO_TARGET.getKey(), ItemProtocol.TO_TASK.getKey(), ItemProtocol.TO_CONTAINER_TYPE.getKey(), ItemProtocol.TO_COMMAND.getKey())); - List values = new ArrayList<>(Arrays.asList(getTargetAddress(nextDevice), Integer.parseInt(instDto.getInstruction_code()), Integer.parseInt(containerType), ToCommandEnum.COMMAND_ONE.getSignalNum())); + List keys = new ArrayList<>(Arrays.asList(ItemProtocol.TO_BACK_UP_1.getKey(),ItemProtocol.TO_TARGET.getKey(), ItemProtocol.TO_TASK.getKey(), ItemProtocol.TO_CONTAINER_TYPE.getKey(), ItemProtocol.TO_COMMAND.getKey())); + List values = new ArrayList<>(Arrays.asList(type,getTargetAddress(nextDevice), Integer.parseInt(instDto.getInstruction_code()), Integer.parseInt(containerType), ToCommandEnum.COMMAND_ONE.getSignalNum())); this.writing(keys, values); this.requireSuccess = true; } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_package_manipulator/InteractionJsonDTO.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_package_manipulator/InteractionJsonDTO.java index 3822916..c9ba832 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_package_manipulator/InteractionJsonDTO.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_package_manipulator/InteractionJsonDTO.java @@ -41,4 +41,6 @@ public class InteractionJsonDTO { * 高度等级 */ private String heightLevel; + + private String type; }