diff --git a/nladmin-system/nlsso-server/pom.xml b/nladmin-system/nlsso-server/pom.xml
index ee3e714..0644044 100644
--- a/nladmin-system/nlsso-server/pom.xml
+++ b/nladmin-system/nlsso-server/pom.xml
@@ -374,38 +374,38 @@
commons-io
2.8.0
-
- org.openscada.jinterop
- org.openscada.jinterop.core
- 2.1.8
-
-
- org.bouncycastle
- bcprov-jdk15on
-
-
-
-
- org.openscada.jinterop
- org.openscada.jinterop.deps
- 1.5.0
-
-
- org.bouncycastle
- bcprov-jdk15on
-
-
-
-
- org.openscada.utgard
- org.openscada.opc.dcom
- 1.5.0
-
-
- org.openscada.utgard
- org.openscada.opc.lib
- 1.5.0
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
org.bouncycastle
@@ -445,6 +445,23 @@
xercesImpl
2.12.0
-->
+
+ org.springframework.boot
+ spring-boot-starter-integration
+
+
+ org.springframework.integration
+ spring-integration-stream
+
+
+ org.springframework.integration
+ spring-integration-mqtt
+
+
+ com.hivemq
+ hivemq-mqtt-client
+ 1.3.3
+
diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/AbstractDriverService.java b/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/AbstractDriverService.java
deleted file mode 100644
index edae461..0000000
--- a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/AbstractDriverService.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.nl.acs.common;
-
-import com.alibaba.fastjson.JSONObject;
-import org.nl.acs.device.domain.Device;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-/**
- * @param 抽象类
- * @author geng by
- */
-public class AbstractDriverService implements IDriverService {
- @Override
- public JSONObject getDeviceInfo(Device device) {
- return null;
- }
-
- @Override
- public Integer getDbValue(Device device, String dbName) {
- return null;
- }
-
-
- public Integer getDbValue(T t, String dbName) {
- Integer dbValue = 0;
- try {
- Class> tClass = t.getClass();
- Method methodDb = tClass.getMethod("get" + dbName);
- dbValue = (Integer) methodDb.invoke(t);
- } catch (NoSuchMethodException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
- return dbValue;
- }
-
-
- public JSONObject getCommonDeviceInfo(T t, int i, int j) {
- JSONObject map = new JSONObject();
- try {
- Class> tClass = t.getClass();
- Method methodGetHasGoods = tClass.getMethod("getHasGoods");
- Method methodGetIsonline = tClass.getMethod("getIsonline");
- Integer hasGoods = (Integer) methodGetHasGoods.invoke(t);
- Boolean isOnline = (Boolean) methodGetIsonline.invoke(t);
- map.put("hasGoods", hasGoods);
- map.put("isOnline", isOnline);
- } catch (NoSuchMethodException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
- return map;
- }
-}
diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/IDriverService.java b/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/IDriverService.java
deleted file mode 100644
index 276788b..0000000
--- a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/IDriverService.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.nl.acs.common;
-
-import com.alibaba.fastjson.JSONObject;
-import org.nl.acs.device.domain.Device;
-
-
-public interface IDriverService {
- /**
- * 获取设备监控信息
- *
- * @param device
- * @return
- */
- JSONObject getDeviceInfo(Device device);
-
- /**
- * getDbValue
- * @param device
- * @param dbName
- * @return
- */
- Integer getDbValue(Device device, String dbName);
-}
diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/StandardCoveyorControlWithPlcScannerDevice.java b/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/StandardCoveyorControlWithPlcScannerDevice.java
deleted file mode 100644
index d0b27a7..0000000
--- a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/StandardCoveyorControlWithPlcScannerDevice.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.nl.acs.common;
-
-import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONObject;
-import org.nl.acs.device.domain.Device;
-import org.nl.acs.device_driver.conveyor.standard_conveyor_control_with_plcscanner.StandardCoveyorControlWithPlcScannerDeviceDriver;
-import org.springframework.stereotype.Service;
-
-/**
- * @author geng by
- * 输送机-控制点-PLC扫码器
- */
-@Service("standard_conveyor_control_with_plcscanner")
-public class StandardCoveyorControlWithPlcScannerDevice extends AbstractDriverService {
- @Override
- public JSONObject getDeviceInfo(Device device) {
- StandardCoveyorControlWithPlcScannerDeviceDriver standardCoveyorControlWithPlcScannerDeviceDriver = (StandardCoveyorControlWithPlcScannerDeviceDriver) device.getDeviceDriver();
- JSONObject jo = super.getCommonDeviceInfo(standardCoveyorControlWithPlcScannerDeviceDriver, 0, 0);
- jo.put("error", standardCoveyorControlWithPlcScannerDeviceDriver.getError());
- jo.put("isError", standardCoveyorControlWithPlcScannerDeviceDriver.getIserror());
- jo.put("height", standardCoveyorControlWithPlcScannerDeviceDriver.getHeight());
- jo.put("operation_type", standardCoveyorControlWithPlcScannerDeviceDriver.getOperation_type());
- jo.put("direction", standardCoveyorControlWithPlcScannerDeviceDriver.getDirection());
- jo.put("action", standardCoveyorControlWithPlcScannerDeviceDriver.getAction());
- jo.put("ioaction", standardCoveyorControlWithPlcScannerDeviceDriver.getIoaction());
- jo.put("container", StrUtil.isEmpty(standardCoveyorControlWithPlcScannerDeviceDriver.getBarcode()) ? "" : standardCoveyorControlWithPlcScannerDeviceDriver.getBarcode());
- jo.put("message", StrUtil.isEmpty(standardCoveyorControlWithPlcScannerDeviceDriver.getMessage()) ? "" : standardCoveyorControlWithPlcScannerDeviceDriver.getMessage());
- jo.put("requestSucess", standardCoveyorControlWithPlcScannerDeviceDriver.getRequireSucess().toString());
- jo.put("applySucess", standardCoveyorControlWithPlcScannerDeviceDriver.getApplySucess().toString());
- jo.put("instruction_message", standardCoveyorControlWithPlcScannerDeviceDriver.getInst_message());
- return jo;
- }
-}
diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/StandardCoveyorControlWithScannerDevice.java b/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/StandardCoveyorControlWithScannerDevice.java
deleted file mode 100644
index 0f09ae0..0000000
--- a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/StandardCoveyorControlWithScannerDevice.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.nl.acs.common;
-
-import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONObject;
-import org.nl.acs.device.domain.Device;
-import org.nl.acs.device_driver.conveyor.standard_conveyor_control_with_scanner.StandardCoveyorControlWithScannerDeviceDriver;
-import org.springframework.stereotype.Service;
-
-/**
- * @author geng by
- * 输送机控制点-带扫描驱动
- */
-@Service("standard_conveyor_control_with_scanner")
-public class StandardCoveyorControlWithScannerDevice extends AbstractDriverService {
-
- @Override
- public JSONObject getDeviceInfo(Device device) {
- StandardCoveyorControlWithScannerDeviceDriver standardCoveyorControlWithScannerDeviceDriver = (StandardCoveyorControlWithScannerDeviceDriver) device.getDeviceDriver();
- JSONObject jo = super.getCommonDeviceInfo(standardCoveyorControlWithScannerDeviceDriver, 0, 0);
- jo.put("error", standardCoveyorControlWithScannerDeviceDriver.getError());
- jo.put("isError", standardCoveyorControlWithScannerDeviceDriver.getIserror());
- jo.put("action", standardCoveyorControlWithScannerDeviceDriver.getAction());
- try {
- jo.put("container", StrUtil.isEmpty(standardCoveyorControlWithScannerDeviceDriver.barcode()) ? "" : standardCoveyorControlWithScannerDeviceDriver.barcode());
- } catch (Exception e) {
- e.printStackTrace();
- }
- jo.put("message", StrUtil.equals(standardCoveyorControlWithScannerDeviceDriver.getMessage(), "null") ? "" : standardCoveyorControlWithScannerDeviceDriver.getMessage());
- jo.put("requestSucess", standardCoveyorControlWithScannerDeviceDriver.getRequireSucess().toString());
- jo.put("applySucess", standardCoveyorControlWithScannerDeviceDriver.getApplySucess().toString());
- return jo;
- }
-}
diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/StandardInspectSiteDevice.java b/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/StandardInspectSiteDevice.java
deleted file mode 100644
index b419359..0000000
--- a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/StandardInspectSiteDevice.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.nl.acs.common;
-
-import com.alibaba.fastjson.JSONObject;
-import org.nl.acs.device.domain.Device;
-import org.nl.acs.device_driver.conveyor.standard_inspect_site.StandardInspectSiteDeviceDriver;
-import org.springframework.stereotype.Service;
-
-/**
- * @author geng by
- * 检测站点
- */
-@Service("standard_inspect_site")
-public class StandardInspectSiteDevice extends AbstractDriverService {
- @Override
- public JSONObject getDeviceInfo(Device device) {
- StandardInspectSiteDeviceDriver standardInspectSiteDevicedriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
- JSONObject jo = super.getCommonDeviceInfo(standardInspectSiteDevicedriver, 0, 0);
- jo.put("error", standardInspectSiteDevicedriver.getError());
- jo.put("isError", standardInspectSiteDevicedriver.getIserror());
- jo.put("container", standardInspectSiteDevicedriver.getContainer());
- jo.put("message", standardInspectSiteDevicedriver.getMessage());
- return jo;
- }
-}
diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/StandardOrdinarySiteDevice.java b/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/StandardOrdinarySiteDevice.java
deleted file mode 100644
index fddd360..0000000
--- a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/common/StandardOrdinarySiteDevice.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.nl.acs.common;
-
-import com.alibaba.fastjson.JSONObject;
-import org.nl.acs.device.domain.Device;
-import org.nl.acs.device_driver.conveyor.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
-import org.springframework.stereotype.Service;
-
-/**
- * @author geng by
- * 普通站点
- */
-@Service("standard_ordinary_site")
-public class StandardOrdinarySiteDevice extends AbstractDriverService {
-
- @Override
- public JSONObject getDeviceInfo(Device device) {
- StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
- JSONObject jo = new JSONObject();
- jo.put("container", standardOrdinarySiteDeviceDriver.getContainer());
- jo.put("hasGoods", standardOrdinarySiteDeviceDriver.getHasGoods());
- jo.put("isOnline", true);
- //点击弹出
- jo.put("is_click", true);
- jo.put("device_type", device.getDevice_type());
- jo.put("error", standardOrdinarySiteDeviceDriver.getError());
- jo.put("isError", standardOrdinarySiteDeviceDriver.getIserror());
- jo.put("container", standardOrdinarySiteDeviceDriver.getContainer());
- jo.put("message", standardOrdinarySiteDeviceDriver.getMessage());
- jo.put("material", standardOrdinarySiteDeviceDriver.getMaterial());
- jo.put("batch", standardOrdinarySiteDeviceDriver.getBatch());
- return jo;
- }
-}
diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/device_driver/standard_inspect/BaseDeviceDriver.java b/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/device_driver/standard_inspect/BaseDeviceDriver.java
deleted file mode 100644
index 04f8d3b..0000000
--- a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/device_driver/standard_inspect/BaseDeviceDriver.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.nl.acs.device.device_driver.standard_inspect;
-
-import lombok.extern.slf4j.Slf4j;
-import org.nl.acs.device.domain.Device;
-import org.nl.acs.device_driver.DeviceDriver;
-import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
-import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
-
-@Slf4j
-public class BaseDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver {
- protected ItemProtocol itemProtocol = new ItemProtocol(this);
-
-
- @Override
- public Device getDevice() {
- return this.device;
- }
-
-
- @Override
- public void execute() {
- int mode = this.itemProtocol.getMode();
- log.info("驱动执行mode :" + mode);
- }
-}
diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/device_driver/standard_inspect/ItemProtocol.java b/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/device_driver/standard_inspect/ItemProtocol.java
deleted file mode 100644
index 24304d7..0000000
--- a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/device_driver/standard_inspect/ItemProtocol.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.nl.acs.device.device_driver.standard_inspect;
-
-import lombok.extern.slf4j.Slf4j;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@Slf4j
-public class ItemProtocol {
- public static String item_heartbeat = "heartbeat";
- public static String item_mode = "mode";
- public static String item_move = "move";
- public static String item_action = "action";
- public static String item_error = "error";
- public static String item_task = "task";
- public static String item_container_quantity = "container_quantity";
- public static String item_container_code = "container_code";
- public static String item_to_command = "to_command";
- public static String item_to_target = "to_target";
- public static String item_to_task = "to_task";
- public static String item_weight = "weight";
-
- private BaseDeviceDriver driver;
-
- public ItemProtocol(BaseDeviceDriver driver) {
- this.driver = driver;
- }
-
- public int getMode() {
- return this.getOpcIntegerValue(item_mode);
- }
-
- public int getOpcIntegerValue(String protocol) {
- Integer value = this.driver.getIntegeregerValue(protocol);
- if (value == null) {
- } else {
- return value;
- }
- return 0;
-
- }
-
- public static List getReadableItemDtos() {
- ArrayList list = new ArrayList();
- list.add(new ItemDto(item_heartbeat, "心跳", "DB100.B0"));
- list.add(new ItemDto(item_mode, "工作状态", "DB100.B2", Boolean.valueOf(true)));
- list.add(new ItemDto(item_move, "光电开关信号", "DB100.B3"));
- list.add(new ItemDto(item_action, "动作信号", "DB100.B4"));
- list.add(new ItemDto(item_error, "报警信号", "DB100.B5"));
- list.add(new ItemDto(item_task, "任务号", "DB100.D6"));
- return list;
- }
-
- public static List getWriteableItemDtos() {
- ArrayList list = new ArrayList();
- list.add(new ItemDto(item_to_command, "作业命令", "DB200.W2", Boolean.valueOf(true)));
- list.add(new ItemDto(item_to_target, "目标站", "DB200.W4"));
- list.add(new ItemDto(item_to_task, "任务号", "DB200.D6"));
- return list;
- }
-
-}
-
diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/rest/DeviceController.java b/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/rest/DeviceController.java
index ef85d6d..0ef5da2 100644
--- a/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/rest/DeviceController.java
+++ b/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/rest/DeviceController.java
@@ -135,6 +135,12 @@ public class DeviceController {
return new ResponseEntity<>(ja, HttpStatus.OK);
}
+ @GetMapping("/getAllDriverCode")
+ @Log("获取所有的设备驱动信息")
+ public ResponseEntity