From ed76f8d72b9a12017a96c9d327413edd12602123 Mon Sep 17 00:00:00 2001
From: yeg <1347747024@qq.com>
Date: 星期三, 02 九月 2026 16:58:41 +0800
Subject: [PATCH] 刷新暂停停止后的设备状态
---
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTestLiveServiceImpl.java | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTestLiveServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTestLiveServiceImpl.java
index 7ae32ac..18595c1 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTestLiveServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTestLiveServiceImpl.java
@@ -97,8 +97,9 @@
private LiveSource snapshotFor(Long testId, LiveSource fresh, boolean receiving, boolean freeze)
{
String key = testId + ":" + fresh.sourceType() + ":" + fresh.sourceId() + ":" + fresh.batteryNo();
+ // 暂停或停止只停止数据请求;设备状态仍以本次查询的最新事实为准,采集快照不继续展示。
if (!receiving)
- return freeze ? lastSources.getOrDefault(key, withoutSnapshot(fresh)) : withoutSnapshot(fresh);
+ return withoutSnapshot(fresh);
lastSources.put(key, fresh);
return fresh;
}
--
Gitblit v1.7.1