From 0235992088f3f84c3e3cb29d83f57e4cca19c51f Mon Sep 17 00:00:00 2001 From: zds <2388969634@qq.com> Date: Mon, 30 Sep 2024 14:06:37 +0800 Subject: [PATCH] =?UTF-8?q?opt=EF=BC=9A=E7=AD=89=E5=BE=85=E7=82=B9?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=94=B3=E8=AF=B7=E7=9A=84=E7=82=B9=E4=BD=8D?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=90=8E=E5=86=8D=E6=9B=B4=E6=96=B0=E5=88=B0?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=8C=87=E4=BB=A4=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../agv/ndcone/AgvNdcOneDeviceDriver.java | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java index 09f4d85..3a1eb43 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java @@ -344,19 +344,33 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic next_height = resp.getJSONObject("parameters").getInteger("next_height"); start_point = resp.getJSONObject("parameters").getString("start_point"); next_point = resp.getJSONObject("parameters").getString("next_point"); + String start_device_code = ""; + String next_device_code = ""; + if (StrUtil.isNotEmpty(start_point) && start_point.indexOf("-") > 0) { + String str[] = start_point.split("-"); + start_device_code = str[0]; + } else { + start_device_code = start_point; + } + if (StrUtil.isNotEmpty(next_point) && next_point.indexOf("-") > 0) { + String str[] = next_point.split("-"); + next_device_code = str[0]; + } else { + next_device_code = next_point; + } task.setStart_height(String.valueOf(start_height)); task.setNext_height(String.valueOf(next_height)); task.setStart_point_code(start_point); - task.setStart_device_code(start_point); + task.setStart_device_code(start_device_code); task.setNext_point_code(next_point); - task.setNext_device_code(next_point); + task.setNext_device_code(next_device_code); int start_address = deviceService.queryAddressBydeviceCode(start_point); int next_address = deviceService.queryAddressBydeviceCode(next_point); taskService.update(task); inst.setStart_point_code(start_point); - inst.setStart_device_code(start_point); + inst.setStart_device_code(start_device_code); inst.setNext_point_code(next_point); - inst.setNext_device_code(next_point); + inst.setNext_device_code(next_device_code); instructionService.update(inst); data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, start_address, next_address, start_height, next_height); log.info("指令号:{},phase:{},acs请求wms申请成功", inst.getInstruction_code(), phase);