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

---
 src/main/java/com/zy/core/thread/impl/ZyStationThread.java |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/impl/ZyStationThread.java b/src/main/java/com/zy/core/thread/impl/ZyStationThread.java
index 9552cc0..3d932ea 100644
--- a/src/main/java/com/zy/core/thread/impl/ZyStationThread.java
+++ b/src/main/java/com/zy/core/thread/impl/ZyStationThread.java
@@ -59,7 +59,7 @@
 
         //璁惧璇诲彇
         Thread readThread = new Thread(() -> {
-            while (true) {
+            while (!Thread.currentThread().isInterrupted()) {
                 try {
                     readStatus();
                     Thread.sleep(200);
@@ -70,7 +70,7 @@
         });
         readThread.start();
 
-        while (true) {
+        while (!Thread.currentThread().isInterrupted()) {
             try {
                 int step = 1;
                 Task task = MessageQueue.poll(SlaveType.Devp, deviceConfig.getDeviceNo());
@@ -97,7 +97,12 @@
         }
 
         if(statusList.isEmpty()) {
-            BasDevpService basDevpService = SpringUtils.getBean(BasDevpService.class);
+            BasDevpService basDevpService = null;
+            try {
+                basDevpService = SpringUtils.getBean(BasDevpService.class);
+            } catch (Exception e) {
+
+            }
             if (basDevpService == null) {
                 return;
             }

--
Gitblit v1.9.1