From bd921b8e2db78be2178803c018f1a6f63a02525f Mon Sep 17 00:00:00 2001
From: yeg <1347747024@qq.com>
Date: 星期六, 05 九月 2026 19:39:53 +0800
Subject: [PATCH] 按当前设备状态展示控制台离线提醒

---
 battery-business/src/main/java/com/battery/business/service/impl/TTestLiveServiceImpl.java |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/battery-business/src/main/java/com/battery/business/service/impl/TTestLiveServiceImpl.java b/battery-business/src/main/java/com/battery/business/service/impl/TTestLiveServiceImpl.java
index a560e1e..620ad61 100644
--- a/battery-business/src/main/java/com/battery/business/service/impl/TTestLiveServiceImpl.java
+++ b/battery-business/src/main/java/com/battery/business/service/impl/TTestLiveServiceImpl.java
@@ -59,9 +59,8 @@
         // 完成或暂停后只保留历史异常事实,实时控制台不再展示开放预警。
         if (receiving && mapper != null) {
             mapper.selectWarningExceptions(testId, "OPEN").forEach(item -> {
-                boolean offline = "DEVICE_OFFLINE".equals(item.getExceptionType());
-                if (offline) offlineSources.add(item.getSourceType() + ":" + item.getSourceIdentity());
-                // 离线异常没有测量值,必须允许空值,不能用 Map.of 构造响应。
+                // 离线待办的处理状态不代表当前设备状态,实时提醒只由下方当前来源生成。
+                if ("DEVICE_OFFLINE".equals(item.getExceptionType())) return;
                 Map<String, Object> warning = new LinkedHashMap<>();
                 warning.put("exceptionId", item.getExceptionId());
                 warning.put("exceptionType", item.getExceptionType());
@@ -71,7 +70,7 @@
                 warning.put("value", item.getAbnormalValue());
                 warning.put("unit", item.getUnit());
                 warning.put("status", item.getExceptionStatus());
-                warning.put("message", offline ? "接收期间设备离线,等待处理" : "测试预警异常");
+                warning.put("message", "测试预警异常");
                 exceptions.add(warning);
             });
         }

--
Gitblit v1.7.1