From 45ace1388677f5c628d36c53aa6fd0b9e7750c2f Mon Sep 17 00:00:00 2001 From: LENOVO <1793460677@qq.com> Date: Thu, 11 Apr 2024 10:18:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8B=94=E5=89=8D=E8=A1=8C=E6=9E=B6?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PullHeadManipulatorDeviceDriver.java | 58 +++++++++++++------ 1 file changed, 39 insertions(+), 19 deletions(-) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_head_manipulator/PullHeadManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_head_manipulator/PullHeadManipulatorDeviceDriver.java index 1ff2f8de5..28f5db845 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_head_manipulator/PullHeadManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_head_manipulator/PullHeadManipulatorDeviceDriver.java @@ -357,19 +357,29 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp String nextAddr = nextDevice.getExtraValue().get("address").toString(); String interaction_json = taskDto.getInteraction_json(); JSONObject jsonObject = JSONObject.parseObject(interaction_json); -// Object isBushing = jsonObject.get("is_bushing"); -// Object isPulling = jsonObject.get("is_pulling"); -// Object qzzNo = jsonObject.get("qzz_no"); -// Object qzzSize = jsonObject.get("qzz_size"); + //所需纸管信息(左边) + Object left = jsonObject.get("left"); + //所需纸管信息(右边) + Object right = jsonObject.get("right"); + //当前纸管信息(左边) + Object currentLeft = jsonObject.get("currentLeft"); + //当前纸管信息(右边) + Object currentRight = jsonObject.get("currentRight"); + //套管数量 + Object casingCount = jsonObject.get("casingCount"); + //拔管数量 + Object pullCount = jsonObject.get("pullCount"); Map map = new LinkedHashMap<>(); map.put("to_command", CommonFinalParam.ONE); map.put("to_onset", startAddr); - map.put("to_target", nextAddr); map.put("to_task", instruction.getInstruction_code()); -// map.put("to_pull", isPulling); -// map.put("to_bushing", isBushing); -// map.put("to_size", qzzSize); -// map.put("to_barcode", qzzNo); + map.put("to_target", nextAddr); + map.put("left", left); + map.put("right", right); + map.put("currentLeft", currentLeft); + map.put("currentRight", currentRight); + map.put("casingCount", casingCount); + map.put("pullCount", pullCount); this.writing(map); this.setRequireSucess(true); return true; @@ -443,21 +453,31 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp } String startAddr = startDevice.getExtraValue().get("address").toString(); String nextAddr = nextDevice.getExtraValue().get("address").toString(); -// String interactionJson = task.getInteraction_json(); -// JSONObject jsonObject = JSONObject.parseObject(interactionJson); -// Object isBushing = jsonObject.get("is_bushing"); -// Object isPulling = jsonObject.get("is_pulling"); -// Object qzzNo = jsonObject.get("qzz_no"); -// Object qzzSize = jsonObject.get("qzz_size"); + String interactionJson = task.getInteraction_json(); + JSONObject jsonObject = JSONObject.parseObject(interactionJson); + //所需纸管信息(左边) + Object left = jsonObject.get("left"); + //所需纸管信息(右边) + Object right = jsonObject.get("right"); + //当前纸管信息(左边) + Object currentLeft = jsonObject.get("currentLeft"); + //当前纸管信息(右边) + Object currentRight = jsonObject.get("currentRight"); + //套管数量 + Object casingCount = jsonObject.get("casingCount"); + //拔管数量 + Object pullCount = jsonObject.get("pullCount"); Map map = new LinkedHashMap<>(); map.put("to_command", CommonFinalParam.ONE); map.put("to_onset", startAddr); map.put("to_task", instdto.getInstruction_code()); map.put("to_target", nextAddr); -// map.put("to_pull", isPulling); -// map.put("to_bushing", isBushing); -// map.put("to_size", qzzSize); -// map.put("to_barcode", qzzNo); + map.put("left", left); + map.put("right", right); + map.put("currentLeft", currentLeft); + map.put("currentRight", currentRight); + map.put("casingCount", casingCount); + map.put("pullCount", pullCount); this.writing(map); this.setRequireSucess(true); notCreateInstMessage = "";