From ba285b5e9d8f101fca5221ef46b48db60257298a Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期一, 15 十二月 2025 15:19:37 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/thread/impl/ZyRgvThread.java |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/impl/ZyRgvThread.java b/src/main/java/com/zy/core/thread/impl/ZyRgvThread.java
index 461f6e8..420650f 100644
--- a/src/main/java/com/zy/core/thread/impl/ZyRgvThread.java
+++ b/src/main/java/com/zy/core/thread/impl/ZyRgvThread.java
@@ -51,7 +51,7 @@
     public void run() {
         connect();
         initRgv();
-        while (true) {
+        while (!Thread.currentThread().isInterrupted()) {
             try {
                 deviceLogCollectTime = Utils.getDeviceLogCollectTime();
                 int step = 1;
@@ -131,7 +131,12 @@
             rgvProtocol.setDeviceDataLog(System.currentTimeMillis());
         }
 
-        BasRgvService basRgvService = SpringUtils.getBean(BasRgvService.class);
+        BasRgvService basRgvService = null;
+        try {
+            basRgvService = SpringUtils.getBean(BasRgvService.class);
+        } catch (Exception e) {
+
+        }
         if (basRgvService != null) {
             BasRgv basRgv = basRgvService.selectOne(new EntityWrapper<BasRgv>().eq("rgv_no", deviceConfig.getDeviceNo()));
             if(basRgv == null) {

--
Gitblit v1.9.1