From cc720a16549bbb691344afb31f702530588c75fd Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 24 三月 2026 00:03:06 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/thread/impl/ZyStationV5Thread.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/impl/ZyStationV5Thread.java b/src/main/java/com/zy/core/thread/impl/ZyStationV5Thread.java
index 69345d9..c0eb09e 100644
--- a/src/main/java/com/zy/core/thread/impl/ZyStationV5Thread.java
+++ b/src/main/java/com/zy/core/thread/impl/ZyStationV5Thread.java
@@ -362,6 +362,9 @@
             e.printStackTrace();
         } finally {
             BasStationOptService optService = SpringUtils.getBean(BasStationOptService.class);
+            if (optService == null) {
+                return commandResponse;
+            }
             List<ZyStationStatusEntity> statusListEntity = zyStationConnectDriver.getStatus();
             ZyStationStatusEntity matched = null;
             if (statusListEntity != null) {
@@ -384,12 +387,10 @@
                     null,
                     JSON.toJSONString(command),
                     JSON.toJSONString(matched),
-                    1,
+                    commandResponse != null && Boolean.TRUE.equals(commandResponse.getResult()) ? 1 : 0,
                     JSON.toJSONString(commandResponse)
             );
-            if (optService != null) {
-                optService.save(basStationOpt);
-            }
+            optService.save(basStationOpt);
         }
         return commandResponse;
     }

--
Gitblit v1.9.1