From 8e922888f525bd66d684e81ed525c78961cb0afc Mon Sep 17 00:00:00 2001 From: "USER-20220102CG\\noblelift" <546428999@qq.com> Date: Wed, 7 Jun 2023 09:16:02 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BC=98=E5=8C=96ndc=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../acs/auto/run/TwoNDCSocketConnectionAutoRun.java | 11 ++++++++--- .../acs/ext/wms/service/impl/WmsToAcsServiceImpl.java | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java b/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java index 6ca2e9736..804100ff7 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java @@ -248,10 +248,15 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable { } else { device = deviceAppService.findDeviceByCode(Integer.toString(arr[20])); } - if (device.getDeviceDriver() instanceof AgvNdcTwoDeviceDriver) { - agvNdcTwoDeviceDriver = (AgvNdcTwoDeviceDriver) device.getDeviceDriver(); - agvNdcTwoDeviceDriver.processSocket(arr); + if(ObjectUtil.isNotEmpty(device)){ + if (device.getDeviceDriver() instanceof AgvNdcTwoDeviceDriver) { + agvNdcTwoDeviceDriver = (AgvNdcTwoDeviceDriver) device.getDeviceDriver(); + agvNdcTwoDeviceDriver.processSocket(arr); + } + } else { + log.info("当前phase:"+ phase +"未找到对应设备"); } + } if (!ObjectUtil.isEmpty(data)) { write(data); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java index 7aafdf6db..94b9d1233 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java @@ -667,7 +667,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { JSONObject json = new JSONObject(); json.put("task_code", task_code); json.put("ext_task_id", ext_task_id); - json.put("message", "已存在任务id为"+taskDto.getTask_id()+"相同的任务号:" + task_code); + json.put("message", "存在相同的任务号:" + task_code); errArr.add(json); continue; } @@ -677,7 +677,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { JSONObject json = new JSONObject(); json.put("task_code", task_code); json.put("ext_task_id", ext_task_id); - json.put("message", "已存在任务id为"+vehicle_dto.getTask_id()+"托盘号:" + vehicle_code); + json.put("message", "已存在任务编号为"+vehicle_dto.getTask_code()+"托盘号:" + vehicle_code); errArr.add(json); continue; }