From 9a035dda0b939de031c0b80f6003a8fd92f0cd42 Mon Sep 17 00:00:00 2001 From: tuqiang <437016993@qq.com> Date: Mon, 17 Nov 2025 09:29:39 +0800 Subject: [PATCH] =?UTF-8?q?add=EF=BC=9A=E6=96=B0=E5=A2=9E=E7=83=98?= =?UTF-8?q?=E7=AE=B1=E6=8A=A5=E8=AD=A6=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HongXiangConveyorDeviceDriver.java | 12 +++++++++--- .../ext/wms/service/impl/WmsToAcsServiceImpl.java | 4 ++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_device/HongXiangConveyorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_device/HongXiangConveyorDeviceDriver.java index 370f155ac..8a6b07d20 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_device/HongXiangConveyorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_device/HongXiangConveyorDeviceDriver.java @@ -196,9 +196,9 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple } if (mode == 0) { this.setIsonline(false); - message = "有报警"; + message = "脱机"; //无报警 - } else if (error != 0 && error1 != 1) { + } else if (error != 0 || error1 != 0) { this.setIserror(true); message = "有报警"; //无报警 @@ -415,7 +415,13 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple /*map.put("action", action); map.put("message", message);*/ /*map.put("task", this.getTask());*/ - map.put("error", ErrorUtil.getDictDetail("hx_error_type", String.valueOf(this.getError()))); + map.put("error", "正常"); + if(this.getError() != 0){ + map.put("error", "error有报警,请检查烘箱!"); + } + if (this.getError1() != 0){ + map.put("error", "error1有报警,请检查烘箱!"); + } map.put("temperature", temperature); map.put("countdown_house", countdown_house); map.put("countdown_min", countdown_min); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java index 8ba4af5fc..a0e39fde6 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java @@ -1150,6 +1150,10 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { errorInfo.put("device_name", conveyorWithScannerWeightDeviceDriver.getDevice().getDevice_name()); errorInfo.put("error_code", conveyorWithScannerWeightDeviceDriver.getError()); errorInfo.put("error_message", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(conveyorWithScannerWeightDeviceDriver.getError()))); + if (conveyorWithScannerWeightDeviceDriver.getError() == 0 && conveyorWithScannerWeightDeviceDriver.getIserror()) { + errorInfo.put("error_code", 111); + errorInfo.put("error_message", conveyorWithScannerWeightDeviceDriver.getMessage()); + } respData.add(errorInfo); } else if (device.getDeviceDriver() instanceof UnBoxLableConveyorDeviceDriver) { UnBoxLableConveyorDeviceDriver unBoxLableConveyorDeviceDriver = (UnBoxLableConveyorDeviceDriver) device.getDeviceDriver();