From bf9e59c1fcd3bff4c69af0927dba690a112a77b2 Mon Sep 17 00:00:00 2001 From: "USER-20220102CG\\noblelift" <546428999@qq.com> Date: Tue, 2 Aug 2022 08:56:26 +0800 Subject: [PATCH] 1 --- .../acs/agv/server/impl/AgvServiceImpl.java | 1 - .../StandardAutodoorDeviceDriver.java | 28 +++++++++---------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java index de828f9..dc58b1a 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java @@ -683,7 +683,6 @@ public class AgvServiceImpl implements AgvService { HttpResponse result = HttpRequest.get(agvurl) .timeout(20000)//超时,毫秒 .execute(); - System.out.println("查询agv指令数据:" + result.body()); return result; } else { diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_autodoor/StandardAutodoorDeviceDriver.java b/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_autodoor/StandardAutodoorDeviceDriver.java index e221efe..e4d9475 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_autodoor/StandardAutodoorDeviceDriver.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_autodoor/StandardAutodoorDeviceDriver.java @@ -100,38 +100,36 @@ public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implem mode = this.itemProtocol.getMode(); action = this.itemProtocol.getAction(); error = this.itemProtocol.getError(); - if (mode != last_mode) { - this.execute_log.log("设备:" + device_code + ",last_mode -> mode:" + last_mode + "->" + mode); - } - if (action != last_action) { - this.execute_log.log("设备:" + device_code + ",last_action -> action:" + last_action + "->" + action); - } - if (error != last_error) { - //this.execute_log.setContainer(""); - this.execute_log.log("设备:" + device_code + ",last_error -> error:" + last_error + "->" + error); - } + last_action = action; last_mode = mode; last_error = error; - //message = StringFormatUtl.format("设备报警:{}", new Object[]{}); - -// String manual_create_task = this.getDevice().getExtraValue().get("manual_create_task").toString(); } public synchronized String getStatus() { JSONObject jo = new JSONObject(); - if (action == 1 && mode == 2) { + if (action == 1) { jo.put("name", this.getDevice().getDevice_code()); jo.put("status", "OPEN"); - } else if (action == 2 && mode == 2) { + jo.put("action", action); + jo.put("mode", mode); + + } else if (action == 2) { jo.put("name", this.getDevice().getDevice_code()); jo.put("status", "CLOSE"); + jo.put("action", action); + jo.put("mode", mode); + } else { jo.put("name", this.getDevice().getDevice_code()); jo.put("status", "ERROR"); + jo.put("action", action); + jo.put("mode", mode); } + System.out.println("查询自动门状态,device_code:"+this.getDevice().getDevice_code() +",action:" + action +",mode:"+mode+",param:"+jo); + return jo.toString(); }