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; }