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/ZyStationV4Thread.java | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/impl/ZyStationV4Thread.java b/src/main/java/com/zy/core/thread/impl/ZyStationV4Thread.java
index 07a220a..1a8a4b7 100644
--- a/src/main/java/com/zy/core/thread/impl/ZyStationV4Thread.java
+++ b/src/main/java/com/zy/core/thread/impl/ZyStationV4Thread.java
@@ -272,6 +272,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) {
@@ -294,12 +297,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