Преглед изворни кода

feat(cockpit): 监测概览设备行带可叠加状态标签并修正未解除预警词表

票 133。运行概况的「报警设备」原来是用报警事件流水反推设备数(4 台),
与设备状态表 `equipment_status.alarm_status=1`(管理平台口径,实测 16 台)对不上。

- `/monitoring/overview` 的 `devices[]` 增 `tags`(ALARM/WARNING/WORK_ORDER,可叠加),
  事实源统一走 `BusinessCockpitDeviceFactResolver`,适配器不再各写一套四表查询
- 修 `OPEN_WARNING_STATUS`:原写 `HANDLING/RELEASED` 在字典 `pre_alarm_status` 里不存在,
  导致未解除预警几乎永不命中;改为 `PENDING/RECEIVED/PROCESSING/HANDLED`(规格 §4,DRAFT/CLOSED 排除)
- 测试:概览适配器新增「一台设备同时带三标签」用例;resolver 用例改为按字典六态逐值断言;
  监测相关 5 个测试类 56/56 通过

未改设备点的显示优先级(CONTEXT.md 两张序刻意不同),也未改六态环(另见 #134)。
Kazerin пре 4 дана
родитељ
комит
1a54a0db55

+ 1 - 0
docs/cockpit/README.md

@@ -99,6 +99,7 @@
 - 事件行(`overview`/`warningResponse` 的 `events/current` 的 `EventItem`)携带 `coordinateValidation`,与地图/监测切片**同一校验实现**(`CockpitCoordinateValidator`);坐标结构非法、越界或落在主场景区外时 `renderable = false` 且给出 `reason`。
 - `monitoring/overview` 的 `devices[]` 是**逐设备台账行**(2026-10-22 追加):每行 = `deviceCode` / `deviceName` / `deviceType{code,name}` / `industry` / `monitoringState` / `monitoringPointCode` / `sampledAt` / `createdAt`,顺序为后端遍历顺序(稳定,调用方不重排)。**行数恒等于 `counts.equipmentCount`**(同一遍历产出,不是第二个口径),筛选(`industry`/`deviceType`)生效时两者同步收窄。它与 `monitoring/situation` 的 `abnormalEquipment[]` **不是一回事**:后者只装异常四态(WARNING/ALARM/EXPIRED/OFFLINE)设备,是「异常清单」;前者是**全部**智能设备的台账。缺值一律 `null`(`deviceName`/`monitoringPointCode`/`createdAt`),不拿编码冒充、不填 0。
 - 事件坐标按同一自动准入判定(不再依赖 `coordinateVerified`):区内且数值合法 → `VALID` / `renderable=true`。报警族在数据可得时另带 `thresholdMinValue`/`thresholdMaxValue`(预警族为 `null`)。
+- `monitoring/overview` 的 `devices[]` 逐行带 **`tags`**(票 133):`ALARM` / `WARNING` / `WORK_ORDER` 的命中项,**可叠加**(一台设备可同时是报警 + 预警 + 工单),无标签时为 `[]`。事实来源统一是 `BusinessCockpitDeviceFactResolver`:在线/报警取 `equipment_status.online_status / alarm_status`,预警取「未解除预警」(字典 `pre_alarm_status` 的 `PENDING/RECEIVED/PROCESSING/HANDLED`,**DRAFT 与 CLOSED 都不算**),工单取「未结束工单」。前端据此出「报警/预警/工单设备」计数,**不得再用报警流水二次推断**(CONTEXT.md 明令)。
 - `events/history-analysis` 同时返回两块内容:`rows[]` 是**小时桶聚合行**(趋势与行级处置率口径,不携带逐事件坐标/阈值);`events[]` 是**逐事件行**(票 61 新增,形状与 `events/current` 的 `EventItem` 同构),按 `eventTime` 倒序、同时间按 `eventNo` 升序,由 `page`/`pageSize`(默认 1/100,上限 1000)分页,元数据在 `pagination` 中,`pagination.total` 即窗口内事件总数。逐事件坐标仍只在 `events/current` 提供,历史逐事件行的 `coordinateValidation` 为 `null`。
 - 预警族三个事件端点(`events/history-analysis`、`events/handling-efficiency`、`events/multidimensional-analysis`)一律排除**草稿**(`DRAFT`)预警(票 126):草稿只是未发布的编辑稿,不进逐事件行、不进小时桶/六态分布/维度桶、不计 `pagination.total`,也**不进** `warningHandlingEfficiency` 的分母。判据与总览计数同一条——`status IS NULL OR UPPER(TRIM(status)) <> 'DRAFT'`,即状态为空/缺失的行**保留**,不因词表缺口被丢掉。`events/current` 的口径不同(排除 DRAFT 与 CLOSED),两处各自成立、互不覆盖。
 

+ 10 - 5
pipe-network-service/zksy-admin/src/test/java/com/zksy/web/controller/cockpit/BusinessCockpitDeviceFactResolverTest.java

@@ -297,11 +297,16 @@ class BusinessCockpitDeviceFactResolverTest {
 
         assertTrue(resolver.resolve(device("DEV-5"), null).isWarning(), "小写 processing 也视为预警中");
 
-        when(earlyWarningService.list(any(Wrapper.class))).thenReturn(Collections.singletonList(warning("released")));
-        assertTrue(resolver.resolve(device("DEV-5"), null).isWarning(), "RELEASED 已发布预警仍为当前预警");
-
-        when(earlyWarningService.list(any(Wrapper.class))).thenReturn(Collections.singletonList(warning("CLOSED")));
-        assertFalse(resolver.resolve(device("DEV-5"), null).isWarning(), "CLOSED 预警不算预警中");
+        // 票 133:字典 pre_alarm_status 六态里「未解除」= PENDING/RECEIVED/PROCESSING/HANDLED;
+        // DRAFT(草稿)与 CLOSED(已解除)都不算,RELEASED 根本不在字典里、更不算。
+        for (String state : Arrays.asList("PENDING", "received", "PROCESSING", "HANDLED")) {
+            when(earlyWarningService.list(any(Wrapper.class))).thenReturn(Collections.singletonList(warning(state)));
+            assertTrue(resolver.resolve(device("DEV-5"), null).isWarning(), state + " 属于未解除预警");
+        }
+        for (String state : Arrays.asList("DRAFT", "CLOSED", "RELEASED")) {
+            when(earlyWarningService.list(any(Wrapper.class))).thenReturn(Collections.singletonList(warning(state)));
+            assertFalse(resolver.resolve(device("DEV-5"), null).isWarning(), state + " 不算未解除预警");
+        }
     }
 
     @Test

+ 40 - 0
pipe-network-service/zksy-admin/src/test/java/com/zksy/web/controller/cockpit/BusinessCockpitMonitoringOverviewAdapterTest.java

@@ -11,6 +11,8 @@ import com.zksy.base.service.MonitorPointService;
 import com.zksy.cockpit.monitoring.BusinessCockpitMonitoringOverviewAdapter;
 import com.zksy.cockpit.monitoring.CockpitMonitoringOverviewSnapshot;
 import com.zksy.cockpit.monitoring.CockpitMonitoringOverviewService;
+import com.zksy.cockpit.point.BusinessCockpitDeviceFactResolver;
+import com.zksy.cockpit.point.CockpitMonitoringPointDeviceSnapshot;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
@@ -42,6 +44,7 @@ class BusinessCockpitMonitoringOverviewAdapterTest {
     private EquipmentBaseService equipmentBaseService;
     private EquipmentStatusService equipmentStatusService;
     private EquipmentTypeService equipmentTypeService;
+    private BusinessCockpitDeviceFactResolver deviceFactResolver;
     private BusinessCockpitMonitoringOverviewAdapter adapter;
 
     @BeforeEach
@@ -50,8 +53,10 @@ class BusinessCockpitMonitoringOverviewAdapterTest {
         equipmentBaseService = mock(EquipmentBaseService.class);
         equipmentStatusService = mock(EquipmentStatusService.class);
         equipmentTypeService = mock(EquipmentTypeService.class);
+        deviceFactResolver = mock(BusinessCockpitDeviceFactResolver.class);
         adapter = new BusinessCockpitMonitoringOverviewAdapter(
                 monitorPointService, equipmentBaseService, equipmentStatusService, equipmentTypeService,
+                deviceFactResolver,
                 Clock.fixed(Instant.parse("2026-09-02T02:00:00Z"), ZoneOffset.UTC));
     }
 
@@ -156,6 +161,41 @@ class BusinessCockpitMonitoringOverviewAdapterTest {
         assertEquals(Collections.singletonList("EMPTY"), response.getMapFilter().getPointCodes());
     }
 
+    /**
+     * 票 133:设备行必须带「可叠加标签」——一台设备可以同时是报警 + 预警 + 工单;
+     * 标签只从设备事实解析器取,不在适配器里用报警流水反推。
+     */
+    @Test
+    void deviceRowsCarryStackableAlarmWarningWorkOrderTags() {
+        stubPoints(Collections.emptyList());
+        stubTypes(Collections.singletonList(type(22, "combustible_gas_detector", "可燃气体检测仪", "3")));
+        EquipmentBase both = device("D-1", "BOTH-1", "22");
+        EquipmentBase alarmOnly = device("D-2", "ALARM-1", "22");
+        when(equipmentBaseService.list()).thenReturn(Arrays.asList(both, alarmOnly));
+        when(equipmentStatusService.list()).thenReturn(Collections.emptyList());
+        when(deviceFactResolver.resolve(any(), any())).thenAnswer(invocation -> {
+            EquipmentBase target = invocation.getArgument(0);
+            boolean isBoth = "BOTH-1".equals(target.getEquipmentCode());
+            CockpitMonitoringPointDeviceSnapshot fact = mock(CockpitMonitoringPointDeviceSnapshot.class);
+            when(fact.isAlarm()).thenReturn(true);
+            when(fact.isWarning()).thenReturn(isBoth);
+            when(fact.isWorkOrderInProgress()).thenReturn(isBoth);
+            return fact;
+        });
+
+        CockpitMonitoringOverviewSnapshot snapshot = adapter.load();
+
+        assertEquals(Arrays.asList("ALARM", "WARNING", "WORK_ORDER"), tagsOf(snapshot, "BOTH-1"),
+                "一台设备可同时带报警/预警/工单三个标签");
+        assertEquals(Collections.singletonList("ALARM"), tagsOf(snapshot, "ALARM-1"));
+    }
+
+    private static List<String> tagsOf(CockpitMonitoringOverviewSnapshot snapshot, String deviceCode) {
+        return snapshot.getDevices().stream()
+                .filter(d -> deviceCode.equals(d.getDeviceCode()))
+                .findFirst().orElseThrow().getTags();
+    }
+
     // ---- helpers ----
 
     /**

+ 83 - 36
pipe-network-service/zksy-system/src/main/java/com/zksy/cockpit/monitoring/BusinessCockpitMonitoringOverviewAdapter.java

@@ -11,6 +11,8 @@ import com.zksy.base.service.MonitorPointService;
 import com.zksy.cockpit.foundation.CockpitCreatedAt;
 import com.zksy.cockpit.foundation.CockpitDistrict;
 import com.zksy.cockpit.foundation.CockpitTypeIndustry;
+import com.zksy.cockpit.point.BusinessCockpitDeviceFactResolver;
+import com.zksy.cockpit.point.CockpitMonitoringPointDeviceSnapshot;
 import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Component;
 
@@ -55,6 +57,8 @@ public class BusinessCockpitMonitoringOverviewAdapter implements CockpitMonitori
     private final EquipmentBaseService equipmentBaseService;
     private final EquipmentStatusService equipmentStatusService;
     private final EquipmentTypeService equipmentTypeService;
+    /** 票 133:设备状态标签(报警/预警/工单)的唯一事实源,避免各适配器各写一份四表查询。 */
+    private final BusinessCockpitDeviceFactResolver deviceFacts;
     private final Clock clock;
 
     public BusinessCockpitMonitoringOverviewAdapter(
@@ -62,11 +66,13 @@ public class BusinessCockpitMonitoringOverviewAdapter implements CockpitMonitori
             EquipmentBaseService equipmentBaseService,
             EquipmentStatusService equipmentStatusService,
             EquipmentTypeService equipmentTypeService,
+            BusinessCockpitDeviceFactResolver deviceFacts,
             Clock clock) {
         this.monitorPointService = monitorPointService;
         this.equipmentBaseService = equipmentBaseService;
         this.equipmentStatusService = equipmentStatusService;
         this.equipmentTypeService = equipmentTypeService;
+        this.deviceFacts = deviceFacts;
         this.clock = clock;
     }
 
@@ -138,42 +144,8 @@ public class BusinessCockpitMonitoringOverviewAdapter implements CockpitMonitori
             }
         }
 
-        List<CockpitMonitoringOverviewSnapshot.SourceDevice> devices = new ArrayList<>();
-        for (EquipmentBase device : ledger) {
-            if (device == null || isBlank(device.getEquipmentCode())) {
-                continue;
-            }
-            String deviceCode = device.getEquipmentCode().trim();
-            EquipmentType type = device.getEquipmentTypeId() == null
-                    ? null
-                    : types.get(device.getEquipmentTypeId());
-
-            EquipmentStatus status = statusBatchReady
-                    ? statusById.get(device.getEquipmentId())
-                    : null;
-            if (!statusBatchReady) {
-                try {
-                    status = equipmentStatusService.getByDeviceCode(deviceCode);
-                } catch (Exception ignored) {
-                    // 状态缺失按 UNKNOWN 上报,不阻断概览
-                }
-            }
-            devices.add(new CockpitMonitoringOverviewSnapshot.SourceDevice(
-                    deviceCode,
-                    // 执行票 62:设备台账要显示名称(缺名如实为 null,不拿编码冒充)。
-                    isBlank(device.getEquipmentName()) ? null : device.getEquipmentName().trim(),
-                    type == null || type.getId() == null ? null : String.valueOf(type.getId()),
-                    monitoringState(status),
-                    status == null || status.getStatusUpdateTime() == null
-                            ? null
-                            : TIME_FORMATTER.format(status.getStatusUpdateTime()
-                                    .atZone(BUSINESS_ZONE).toOffsetDateTime()),
-                    pointCodeByDevice.get(deviceCode),
-                    // 数据时间=记录创建时间(equipment_base.create_time),与 sampledAt 分离
-                    CockpitCreatedAt.format(device.getCreateTime()),
-                    // 设备自身片区(equipment_base.district)即权威来源;脏值由 codeOf 归一为未分区
-                    CockpitDistrict.codeOf(device.getDistrict())));
-        }
+        List<CockpitMonitoringOverviewSnapshot.SourceDevice> devices =
+                deviceRows(ledger, types, statusById, statusBatchReady, pointCodeByDevice);
 
         List<CockpitMonitoringOverviewSnapshot.SourceType> sourceTypes = types.values().stream()
                 .filter(type -> type.getId() != null)
@@ -199,6 +171,81 @@ public class BusinessCockpitMonitoringOverviewAdapter implements CockpitMonitori
         return Integer.valueOf(1).equals(status.getOnlineStatus()) ? "ONLINE" : "OFFLINE";
     }
 
+    /**
+     * 设备台账 → 设备行。票 133:额外带 ALARM / WARNING / WORK_ORDER 三个**可叠加标签**。
+     *
+     * <p>标签事实只从 {@link BusinessCockpitDeviceFactResolver} 取(在线/报警=equipment_status、
+     * 预警=未解除预警、工单=未结束工单);本适配器不另写四表查询,也不用报警流水二次推断
+     * (CONTEXT.md「设备预警/报警统计」「点位特效显示规则」两节都明令禁止)。
+     */
+    private List<CockpitMonitoringOverviewSnapshot.SourceDevice> deviceRows(
+            List<EquipmentBase> ledger,
+            Map<Integer, EquipmentType> types,
+            Map<String, EquipmentStatus> statusById,
+            boolean statusBatchReady,
+            Map<String, String> pointCodeByDevice) {
+        List<CockpitMonitoringOverviewSnapshot.SourceDevice> devices = new ArrayList<>();
+        deviceFacts.prepareBatch(ledger);
+        try {
+            for (EquipmentBase device : ledger) {
+                if (device == null || isBlank(device.getEquipmentCode())) {
+                    continue;
+                }
+                String deviceCode = device.getEquipmentCode().trim();
+                EquipmentType type = device.getEquipmentTypeId() == null
+                        ? null
+                        : types.get(device.getEquipmentTypeId());
+
+                EquipmentStatus status = statusBatchReady
+                        ? statusById.get(device.getEquipmentId())
+                        : null;
+                if (!statusBatchReady) {
+                    try {
+                        status = equipmentStatusService.getByDeviceCode(deviceCode);
+                    } catch (Exception ignored) {
+                        // 状态缺失按 UNKNOWN 上报,不阻断概览
+                    }
+                }
+                devices.add(new CockpitMonitoringOverviewSnapshot.SourceDevice(
+                        deviceCode,
+                        // 执行票 62:设备台账要显示名称(缺名如实为 null,不拿编码冒充)。
+                        isBlank(device.getEquipmentName()) ? null : device.getEquipmentName().trim(),
+                        type == null || type.getId() == null ? null : String.valueOf(type.getId()),
+                        monitoringState(status),
+                        status == null || status.getStatusUpdateTime() == null
+                                ? null
+                                : TIME_FORMATTER.format(status.getStatusUpdateTime()
+                                        .atZone(BUSINESS_ZONE).toOffsetDateTime()),
+                        pointCodeByDevice.get(deviceCode),
+                        // 数据时间=记录创建时间(equipment_base.create_time),与 sampledAt 分离
+                        CockpitCreatedAt.format(device.getCreateTime()),
+                        // 设备自身片区(equipment_base.district)即权威来源;脏值由 codeOf 归一为未分区
+                        CockpitDistrict.codeOf(device.getDistrict()),
+                        tagsOf(device, type)));
+            }
+        } finally {
+            deviceFacts.clearBatch();
+        }
+        return devices;
+    }
+
+    /** 单台设备的状态标签(可叠加):报警/预警/工单任一成立即入列,都不成立时为空列表。 */
+    private List<String> tagsOf(EquipmentBase device, EquipmentType type) {
+        CockpitMonitoringPointDeviceSnapshot fact =
+                deviceFacts.resolve(device, type == null ? null : type.getTypeName());
+        List<String> tags = new ArrayList<>();
+        if (fact != null && fact.isAlarm()) {
+            tags.add("ALARM");
+        }
+        if (fact != null && fact.isWarning()) {
+            tags.add("WARNING");
+        }
+        if (fact != null && fact.isWorkOrderInProgress()) {
+            tags.add("WORK_ORDER");
+        }
+        return tags;
+    }
+
     private Map<Integer, EquipmentType> equipmentTypes() {
         Map<Integer, EquipmentType> result = new HashMap<>();
         for (EquipmentType type : safeList(equipmentTypeService.list())) {

+ 24 - 1
pipe-network-service/zksy-system/src/main/java/com/zksy/cockpit/monitoring/CockpitMonitoringOverviewResponse.java

@@ -253,6 +253,11 @@ public class CockpitMonitoringOverviewResponse {
          */
         private final Integer district;
         private final String districtName;
+        /**
+         * 设备状态标签(票 133):{@code ALARM} / {@code WARNING} / {@code WORK_ORDER} 的命中项,可叠加。
+         * 空数组=无业务标签;未提供时同样给空数组,不用 null 让前端猜。
+         */
+        private final java.util.List<String> tags;
 
         public Device(
                 String deviceCode,
@@ -264,7 +269,7 @@ public class CockpitMonitoringOverviewResponse {
                 String sampledAt,
                 String createdAt) {
             this(deviceCode, deviceName, deviceType, industry, monitoringState,
-                    monitoringPointCode, sampledAt, createdAt, null, null);
+                    monitoringPointCode, sampledAt, createdAt, null, null, null);
         }
 
         public Device(
@@ -278,6 +283,22 @@ public class CockpitMonitoringOverviewResponse {
                 String createdAt,
                 Integer district,
                 String districtName) {
+            this(deviceCode, deviceName, deviceType, industry, monitoringState,
+                    monitoringPointCode, sampledAt, createdAt, district, districtName, null);
+        }
+
+        public Device(
+                String deviceCode,
+                String deviceName,
+                DeviceType deviceType,
+                String industry,
+                String monitoringState,
+                String monitoringPointCode,
+                String sampledAt,
+                String createdAt,
+                Integer district,
+                String districtName,
+                java.util.List<String> tags) {
             this.deviceCode = deviceCode;
             this.deviceName = deviceName;
             this.deviceType = deviceType;
@@ -288,6 +309,7 @@ public class CockpitMonitoringOverviewResponse {
             this.createdAt = createdAt;
             this.district = district;
             this.districtName = districtName;
+            this.tags = tags == null ? java.util.Collections.emptyList() : tags;
         }
 
         public String getDeviceCode() { return deviceCode; }
@@ -300,6 +322,7 @@ public class CockpitMonitoringOverviewResponse {
         public String getCreatedAt() { return createdAt; }
         public Integer getDistrict() { return district; }
         public String getDistrictName() { return districtName; }
+        public java.util.List<String> getTags() { return tags; }
     }
 
     public static class TypeDistribution {

+ 2 - 1
pipe-network-service/zksy-system/src/main/java/com/zksy/cockpit/monitoring/CockpitMonitoringOverviewService.java

@@ -309,7 +309,8 @@ public class CockpitMonitoringOverviewService {
                     source == null ? null : source.getCreatedAt(),
                     // 逐行带片区(票 81):前端可本地分解,不用猜这台设备算哪个片区
                     runtime.district,
-                    CockpitDistrict.nameOf(runtime.district)));
+                    CockpitDistrict.nameOf(runtime.district),
+                    source == null ? null : source.getTags()));
         }
 
         return new CockpitMonitoringOverviewResponse(

+ 24 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/cockpit/monitoring/CockpitMonitoringOverviewSnapshot.java

@@ -59,6 +59,12 @@ public class CockpitMonitoringOverviewSnapshot {
          * 这是本端点唯一的片区事实来源 —— 设备台账逐行带片区,服务层据此筛。
          */
         private final Integer district;
+        /**
+         * 设备状态标签(票 133):{@code ALARM} / {@code WARNING} / {@code WORK_ORDER} 中命中的若干项,
+         * 可同时存在(一台设备可以既有报警又有未结束工单)。空列表=没有任何业务标签。
+         * 事实来源见 {@code BusinessCockpitDeviceFactResolver},本层只携带、不推导。
+         */
+        private final List<String> tags;
 
         public SourceDevice(
                 String deviceCode,
@@ -102,6 +108,21 @@ public class CockpitMonitoringOverviewSnapshot {
                 String pointCode,
                 String createdAt,
                 Integer district) {
+            this(deviceCode, deviceName, typeCode, monitoringState,
+                    sampledAt, pointCode, createdAt, district, null);
+        }
+
+        /** 票 133:带状态标签的设备行。 */
+        public SourceDevice(
+                String deviceCode,
+                String deviceName,
+                String typeCode,
+                String monitoringState,
+                String sampledAt,
+                String pointCode,
+                String createdAt,
+                Integer district,
+                List<String> tags) {
             this.deviceCode = deviceCode;
             this.deviceName = deviceName;
             this.typeCode = typeCode;
@@ -110,6 +131,7 @@ public class CockpitMonitoringOverviewSnapshot {
             this.pointCode = pointCode;
             this.createdAt = createdAt;
             this.district = district;
+            this.tags = tags;
         }
 
         public String getDeviceCode() { return deviceCode; }
@@ -120,6 +142,8 @@ public class CockpitMonitoringOverviewSnapshot {
         public String getPointCode() { return pointCode; }
         public String getCreatedAt() { return createdAt; }
         public Integer getDistrict() { return district; }
+        /** 状态标签(可叠加);未提供时为空列表(不臆造 ALARM/WARNING)。 */
+        public List<String> getTags() { return tags == null ? java.util.Collections.emptyList() : tags; }
     }
 
     public static class SourceMonitoringPoint {

+ 7 - 2
pipe-network-service/zksy-system/src/main/java/com/zksy/cockpit/point/BusinessCockpitDeviceFactResolver.java

@@ -43,9 +43,14 @@ public class BusinessCockpitDeviceFactResolver {
     private static final DateTimeFormatter TIME_FORMATTER = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
     private static final ZoneId BUSINESS_ZONE = ZoneId.of("Asia/Shanghai");
 
-    /** 未关闭的预警状态:现网取值含 PENDING/PROCESSING 等。 */
+    /**
+     * 未解除的预警状态(票 133):取值域是字典 {@code pre_alarm_status} 的六态
+     * DRAFT/PENDING/RECEIVED/PROCESSING/HANDLED/CLOSED 中的**未解除集合**——
+     * 草稿(DRAFT)与已解除(CLOSED)都不算未解除,与总览计数的同一规格 §4。
+     * 此前写的是 HANDLING/RELEASED,这两个值在字典里不存在,永远命中不了。
+     */
     private static final Set<String> OPEN_WARNING_STATUS = new LinkedHashSet<>(
-            Arrays.asList("PENDING", "PROCESSING", "HANDLING", "RELEASED"));
+            Arrays.asList("PENDING", "RECEIVED", "PROCESSING", "HANDLED"));
 
     /** 报警记录未处理:{@code alarm_data.alarm_status},见 {@code AlarmRecordStatusEnum.UNHANDLED}。 */
     private static final Integer UNHANDLED_ALARM_STATUS = 0;