From 36907a602a11928a1e6d4883e60ef6df31d5c4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B1=9F=E7=8E=AE?= Date: Fri, 18 Aug 2023 14:56:12 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=8F=8D=E9=A6=88=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java | 6 ++++++ .../basedriver/agv/ndctwo/AgvNdcTwoDeviceDriver.java | 6 ++++++ .../device_status/DeviceStatusDeviceDriver.java | 3 +++ .../OvenGantryManipulatorDeviceDriver.java | 9 +++++++++ .../siemens_conveyor/SiemensConveyorDeviceDriver.java | 6 ++++++ .../SiemensConveyorCkkDeviceDriver.java | 6 ++++++ .../SiemensConveyorLabelingDeviceDriver.java | 6 ++++++ .../SiemensOneFloorAGVConveyorDeviceDriver.java | 6 ++++++ .../SlitTwoManipulatorDeviceDriver.java | 9 +++++++++ 9 files changed, 57 insertions(+) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java index 571e07595..9a8b3668c 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java @@ -448,6 +448,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic param.put("device_code", this.device_code); param.put("error", error); param.put("error_msg", this.getError_message()); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "4"); + param.put("product_area", paramService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); } data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); @@ -472,6 +475,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic JSONObject param = new JSONObject(); param.put("device_code", this.device_code); param.put("mode", status); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "4"); + param.put("product_area", paramService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndctwo/AgvNdcTwoDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndctwo/AgvNdcTwoDeviceDriver.java index b0a3165fb..f829443f6 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndctwo/AgvNdcTwoDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndctwo/AgvNdcTwoDeviceDriver.java @@ -691,6 +691,9 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic param.put("device_code", this.device_code); param.put("error", error); param.put("error_msg", this.getError_message()); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "4"); + param.put("product_area", ParamService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); } data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); @@ -715,6 +718,9 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic JSONObject param = new JSONObject(); param.put("device_code", this.device_code); param.put("mode", status); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "4"); + param.put("product_area", ParamService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/device_status/DeviceStatusDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/device_status/DeviceStatusDeviceDriver.java index 725422341..0ac1ab09d 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/device_status/DeviceStatusDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/device_status/DeviceStatusDeviceDriver.java @@ -123,6 +123,9 @@ public class DeviceStatusDeviceDriver extends AbstractOpcDeviceDriver implements param.put("device_code", this.device_id); param.put("error", alarm); param.put("error_msg", ErrorUtil.getDictDetail("ssx_error_type", alarm)); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "3"); + param.put("product_area", paramService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); } this.last_iserror = iserror; diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/oven_manipulator/OvenGantryManipulatorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/oven_manipulator/OvenGantryManipulatorDeviceDriver.java index 4e332d911..6fd5c62f5 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/oven_manipulator/OvenGantryManipulatorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/oven_manipulator/OvenGantryManipulatorDeviceDriver.java @@ -37,6 +37,8 @@ import org.nl.acs.route.service.RouteLineService; import org.nl.acs.task.service.TaskService; import org.nl.acs.task.service.dto.TaskDto; import org.nl.modules.common.exception.BadRequestException; +import org.nl.modules.system.service.ParamService; +import org.nl.modules.system.service.impl.ParamServiceImpl; import org.nl.modules.wql.util.SpringContextHolder; import org.openscada.opc.lib.da.Server; import org.springframework.beans.factory.annotation.Autowired; @@ -67,6 +69,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); @Autowired DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class); + ParamService paramService = SpringContextHolder.getBean(ParamServiceImpl.class); //工作模式 int mode = 0; int last_mode = 0; @@ -180,6 +183,9 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i JSONObject param = new JSONObject(); param.put("device_code", this.device_code); param.put("mode", mode); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "2"); + param.put("product_area", paramService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); if (mode == 2) { @@ -221,6 +227,9 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i param.put("device_code", this.device_code); param.put("error", error); param.put("error_msg", errorInfo); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "2"); + param.put("product_area", paramService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); } logServer.deviceItemValue(this.device_code, "error", String.valueOf(error)); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java index b6df3b53e..6b3b84f54 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java @@ -233,6 +233,9 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme JSONObject param = new JSONObject(); param.put("device_code", this.device_code); param.put("mode", mode); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "1"); + param.put("product_area", paramService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); } @@ -275,6 +278,9 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme param.put("device_code", this.device_code); param.put("error", error); param.put("error_msg", errorInfo); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "1"); + param.put("product_area", paramService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); } } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor_ckk/SiemensConveyorCkkDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor_ckk/SiemensConveyorCkkDeviceDriver.java index b53882f36..a745b49aa 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor_ckk/SiemensConveyorCkkDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor_ckk/SiemensConveyorCkkDeviceDriver.java @@ -191,6 +191,9 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl JSONObject param = new JSONObject(); param.put("device_code", this.device_code); param.put("mode", mode); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "1"); + param.put("product_area", paramService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode)); @@ -230,6 +233,9 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl param.put("device_code", this.device_code); param.put("error", error); param.put("error_msg", errorInfo); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "1"); + param.put("product_area", paramService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); } logServer.deviceItemValue(this.device_code, "error", String.valueOf(error)); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor_labeling/SiemensConveyorLabelingDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor_labeling/SiemensConveyorLabelingDeviceDriver.java index 8cffdb010..b6fb67619 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor_labeling/SiemensConveyorLabelingDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor_labeling/SiemensConveyorLabelingDeviceDriver.java @@ -174,6 +174,9 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver JSONObject param = new JSONObject(); param.put("device_code", this.device_code); param.put("mode", mode); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "1"); + param.put("product_area", paramService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode)); @@ -208,6 +211,9 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver param.put("device_code", this.device_code); param.put("error", error); param.put("error_msg", errorInfo); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "1"); + param.put("product_area", paramService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); } logServer.deviceItemValue(this.device_code, "error", String.valueOf(error)); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_onefloor_agv_conveyor/SiemensOneFloorAGVConveyorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_onefloor_agv_conveyor/SiemensOneFloorAGVConveyorDeviceDriver.java index fd0ad57ac..985094f8c 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_onefloor_agv_conveyor/SiemensOneFloorAGVConveyorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_onefloor_agv_conveyor/SiemensOneFloorAGVConveyorDeviceDriver.java @@ -165,6 +165,9 @@ public class SiemensOneFloorAGVConveyorDeviceDriver extends AbstractOpcDeviceDri JSONObject param = new JSONObject(); param.put("device_code", this.device_code); param.put("mode", mode); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "1"); + param.put("product_area", paramService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); } if (to_command != last_to_command) { @@ -189,6 +192,9 @@ public class SiemensOneFloorAGVConveyorDeviceDriver extends AbstractOpcDeviceDri param.put("device_code", this.device_code); param.put("error", error); param.put("error_msg", errorInfo); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "1"); + param.put("product_area", paramService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); } } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java index ce7e8642c..9b8c7eaa0 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java @@ -34,6 +34,8 @@ import org.nl.acs.route.service.RouteLineService; import org.nl.acs.task.service.TaskService; import org.nl.acs.task.service.dto.TaskDto; import org.nl.modules.common.exception.BadRequestException; +import org.nl.modules.system.service.ParamService; +import org.nl.modules.system.service.impl.ParamServiceImpl; import org.nl.modules.wql.util.SpringContextHolder; import org.openscada.opc.lib.da.Server; import org.springframework.beans.factory.annotation.Autowired; @@ -64,6 +66,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl"); @Autowired DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class); + ParamService paramService = SpringContextHolder.getBean(ParamServiceImpl.class); //分切行架机械手是否禁用 0否 1是 private int is_disable = 0; private String error_type = "fqhj_error_type"; @@ -233,6 +236,9 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl JSONObject param = new JSONObject(); param.put("device_code", this.device_code); param.put("mode", mode); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "2"); + param.put("product_area", paramService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); inst_type = null; @@ -265,6 +271,9 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl param.put("device_code", this.device_code); param.put("error", error); param.put("error_msg", errorInfo); + param.put("device_name", this.getDevice().getDevice_name()); + param.put("device_type", "2"); + param.put("product_area", paramService.findByCode("productArea").getValue()); acsToWmsService.sendDeviceStatus(param); } logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));