diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/ItemProtocol.java index 924383bf3..e3f1ff713 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/ItemProtocol.java @@ -126,9 +126,9 @@ public class ItemProtocol { public int getOpcIntegerValue(String protocol) { Integer value = this.driver.getIntegeregerValue(protocol); - if(ObjectUtil.isEmpty(value)){ + if (ObjectUtil.isEmpty(value)) { deviceStatus = true; - }else if (item_heartbeat.equals(protocol)){ + } else if (item_heartbeat.equals(protocol)) { deviceStatus = false; } if (value == null) { @@ -138,6 +138,9 @@ public class ItemProtocol { setIsonline(true); return value; } + if (item_mode.equals(protocol)) { + return -1; + } return 0; } 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 724d46d46..15f870ac2 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 @@ -260,7 +260,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme last_inst_message = inst_message; if ("true".equals(this.device.getExtraValue().get("ship_device_update"))) { this.requiresShipDeviceUpdate = false; - if (mode > 0) { + if (mode >= 0) { shipDeviceUpdate(); } } @@ -358,7 +358,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme Instruction instruction = null; List toInstructions; - if(mode > 0) { + if (mode > 0) { switch (mode) { case 1: log.debug("设备运转模式:等待工作"); @@ -615,10 +615,10 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme move = "有托盘有货"; jo.put("hasGoods", true); } - if(deviceStatus){ + if (deviceStatus) { iserror = true; } - if(error == 0 && !deviceStatus){ + if (error == 0 && !deviceStatus) { iserror = false; } if (this.carrier_direction == 1) { @@ -630,7 +630,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme if (this.requireSucess) { requireSucess = "1"; } - if(error == 0 && iserror){ + if (error == 0 && iserror) { message = "信号连接异常!"; } jo.put("device_name", this.getDevice().getDevice_name()); @@ -1086,7 +1086,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme apply.put("type", "2"); String str = acsToWmsService.applyTaskToWms(apply); logServer.deviceExecuteLog(this.device_code, "", "", "申请空盘入库,请求参数:" + apply + ",响应参数:" + JSON.toJSONString(str)); - message = "申请空盘入库任务,请求参数:" + apply + "响应参数: "+ str; + message = "申请空盘入库任务,请求参数:" + apply + "响应参数: " + str; JSONObject jo = JSON.parseObject(str); if (ObjectUtil.isEmpty(jo)) { diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java index f6b115d05..cf4374aed 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java @@ -150,13 +150,13 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements /** * 下发目标站 */ - int to_target = 0; - int last_to_target = 0; + String to_target = null; + String last_to_target = null; /** * 下发任务号 */ - int to_task = 0; - int last_to_task = 0; + String to_task = null; + String last_to_task = null; /** * 下发接纯数字托盘号 */ diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/ItemProtocol.java index 8a7cd386f..3dac73a82 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/ItemProtocol.java @@ -110,15 +110,15 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_task); } - public int getTo_task() { - return this.getOpcIntegerValue(item_to_task); + public String getTo_task() { + return this.getOpcStringValue(item_to_task); } - public int getTotarget() { - return this.getOpcIntegerValue(item_to_target); + public String getTotarget() { + return this.getOpcStringValue(item_to_target); } public String getTo_command() { diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/scanner_weight_conveyor/ConveyorWithScannerWeightDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/scanner_weight_conveyor/ConveyorWithScannerWeightDeviceDriver.java index 23f5158de..36938cf89 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/scanner_weight_conveyor/ConveyorWithScannerWeightDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/scanner_weight_conveyor/ConveyorWithScannerWeightDeviceDriver.java @@ -121,8 +121,8 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv String to_task = null; String last_to_task = null; - int to_container_type = 0; - int last_to_container_type = 0; + String to_container_type = null; + String last_to_container_type = null; String to_height_level = null; String last_to_height_level = null; diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/scanner_weight_conveyor/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/scanner_weight_conveyor/ItemProtocol.java index 858495909..7b378b39c 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/scanner_weight_conveyor/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_conveyor/scanner_weight_conveyor/ItemProtocol.java @@ -148,8 +148,8 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_container_type); } - public int getTo_container_type(){ - return this.getOpcIntegerValue(item_to_container_type); + public String getTo_container_type(){ + return this.getOpcStringValue(item_to_container_type); } public String getTo_height_level(){ diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml b/acs2/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml index 4c03df4ca..427aaa5df 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml @@ -30,11 +30,9 @@ https://juejin.cn/post/6844903775631572999 true ${log.pattern} - ${log.charset} + - - @@ -50,6 +48,7 @@ https://juejin.cn/post/6844903775631572999 %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + ${log.charset}