From 4df42ce4e72927ae79f68627bab11cc52917ffac Mon Sep 17 00:00:00 2001 From: "USER-20220102CG\\noblelift" <546428999@qq.com> Date: Mon, 30 Jan 2023 09:52:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hongxiang_device/HongXiangConveyorDeviceDriver.java | 4 +--- .../siemens_conveyor/SiemensConveyorDeviceDriver.java | 4 +++- .../StandardCoveyorControlWithScannerDeviceDriver.java | 3 +++ .../org/nl/modules/security/service/OnlineUserService.java | 2 ++ acs/nladmin-system/src/main/resources/logback-spring.xml | 1 - 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hongxiang_device/HongXiangConveyorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hongxiang_device/HongXiangConveyorDeviceDriver.java index d138d799d..010b952ca 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hongxiang_device/HongXiangConveyorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hongxiang_device/HongXiangConveyorDeviceDriver.java @@ -293,11 +293,9 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple if (this.getMode() == 0) { mode = "未联机"; } else if (this.getMode() == 1) { - mode = "单机"; + mode = "联机"; } else if (this.getMode() == 2) { mode = "联机"; - } else if (this.getMode() == 3) { - mode = "运行中"; } String requireSucess = "0"; if (this.requireSucess) { 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 1ec382c96..ae64411bb 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 @@ -145,7 +145,6 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme task = this.itemProtocol.getTask(); if (mode != last_mode) { if( mode == 2){ - message = null; requireSucess = false; requireApplyLabelingSuccess = false; requireApplyLaStrangulationSuccess =false; @@ -158,6 +157,8 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme } if (move != last_move) { if(move == 0 && mode == 2 ){ + message = null; + inst_message = null; this.clearWrite(); } logServer.deviceItemValue(this.device_code, "move", String.valueOf(move)); @@ -442,6 +443,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme jo.put("move", move); jo.put("carrier_direction", carrier_direction); jo.put("task", task); + jo.put("inst_message", this.inst_message); jo.put("isOnline", this.getIsonline()); jo.put("error", this.getError()); jo.put("isError", this.getIserror()); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/StandardCoveyorControlWithScannerDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/StandardCoveyorControlWithScannerDeviceDriver.java index 469332373..34a3910a2 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/StandardCoveyorControlWithScannerDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/StandardCoveyorControlWithScannerDeviceDriver.java @@ -195,6 +195,8 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe } if (move != last_move) { if (move == 0 && mode == 2) { + message = null; + inst_message = null; thingToNothing(); } logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move); @@ -753,6 +755,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe jo.put("error", this.getError()); jo.put("isError", this.getIserror()); jo.put("message", this.getMessage()); + jo.put("inst_message", this.inst_message); jo.put("task", this.getTask()); jo.put("barcode", plcbarcode); jo.put("barcode_length", plcbarcode_length); diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/security/service/OnlineUserService.java b/acs/nladmin-system/src/main/java/org/nl/modules/security/service/OnlineUserService.java index e4b8b5e1a..2ae96ec44 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/security/service/OnlineUserService.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/security/service/OnlineUserService.java @@ -16,6 +16,7 @@ package org.nl.modules.security.service; import cn.dev33.satoken.stp.StpUtil; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import lombok.extern.slf4j.Slf4j; import org.nl.modules.common.utils.*; @@ -118,6 +119,7 @@ public class OnlineUserService { * @param token / */ public void logout(String token) { + if (ObjectUtil.isNotEmpty(token)) redisUtils.del(token); } diff --git a/acs/nladmin-system/src/main/resources/logback-spring.xml b/acs/nladmin-system/src/main/resources/logback-spring.xml index 60d28f677..b661855b1 100644 --- a/acs/nladmin-system/src/main/resources/logback-spring.xml +++ b/acs/nladmin-system/src/main/resources/logback-spring.xml @@ -149,7 +149,6 @@ https://juejin.cn/post/6844903775631572999 -