From 4da282d3a87fb648ae6865929f5862b27d05a562 Mon Sep 17 00:00:00 2001
From: cpT <1@123>
Date: 星期四, 03 七月 2025 15:07:25 +0800
Subject: [PATCH] #改造

---
 src/main/java/com/zy/core/thread/LedThread.java |   27 ++++++++++++++++++++-------
 1 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/LedThread.java b/src/main/java/com/zy/core/thread/LedThread.java
index c4cf476..550c2c0 100644
--- a/src/main/java/com/zy/core/thread/LedThread.java
+++ b/src/main/java/com/zy/core/thread/LedThread.java
@@ -202,14 +202,19 @@
             screen.turnOn();
         } catch (Exception ignore) {
         }
-        DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
-        if (connRes) {
-            log.info("led杩炴帴鎴愬姛 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
-            deviceErrorService.deleteDeviceError("led", slave.getId());
-        } else {
-            log.error("led杩炴帴澶辫触锛侊紒锛� ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
-            deviceErrorService.addDeviceError("led", slave.getId(), "led杩炴帴澶辫触");
+        try{
+            DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
+            if (connRes) {
+                log.info("led杩炴帴鎴愬姛 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
+                deviceErrorService.deleteDeviceError("led", slave.getId());
+            } else {
+                log.error("led杩炴帴澶辫触锛侊紒锛� ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
+                deviceErrorService.addDeviceError("led", slave.getId(), "led杩炴帴澶辫触");
+            }
+        } catch (Exception e){
+//            log.error("e:"+e.getMessage());
         }
+
         return connRes;
     }
 
@@ -463,4 +468,12 @@
 
     }
 
+
+    /**
+     * 娓呴櫎浣滀笟鍚姩涓�
+     */
+    @Override
+    public void setWrkSign() {
+    }
+
 }

--
Gitblit v1.9.1