From ec3308617909c8d6280e0d00ffb18350e372fbdf Mon Sep 17 00:00:00 2001
From: yeg <1347747024@qq.com>
Date: 星期日, 30 八月 2026 17:36:29 +0800
Subject: [PATCH] 实现采集器断线恢复与来源异常持久化

---
 ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTestMapper.java |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTestMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTestMapper.java
index 76f31d2..ee5884e 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTestMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTestMapper.java
@@ -11,6 +11,8 @@
 import com.ruoyi.system.domain.TTestPlanStep;
 import com.ruoyi.system.domain.TTestResult;
 import com.ruoyi.system.domain.TTestWarningThreshold;
+import com.ruoyi.system.domain.TTestCollectorSource;
+import com.ruoyi.system.domain.TTestCollectorExceptionInterval;
 import com.ruoyi.system.domain.TDetectionChannel;
 import com.ruoyi.system.domain.vo.TestBatteryOptionVo;
 import com.ruoyi.system.domain.vo.TestChannelOptionVo;
@@ -87,4 +89,15 @@
             @Param("updatedAtUtc") Date updatedAtUtc);
     int updateReceptionStopped(@Param("testId") Long testId, @Param("updateBy") String updateBy,
             @Param("endedAtUtc") Date endedAtUtc);
+
+    /** 查询仍在接收中的采集器来源。 */
+    List<TTestCollectorSource> selectReceivingCollectorSources();
+    /** 查询来源当前开放的断线区间。 */
+    TTestCollectorExceptionInterval selectOpenCollectorException(@Param("testId") Long testId,
+            @Param("batteryRelationId") Long batteryRelationId, @Param("collectorId") Long collectorId,
+            @Param("channelCode") String channelCode);
+    int insertCollectorExceptionInterval(TTestCollectorExceptionInterval interval);
+    int closeCollectorExceptionInterval(@Param("intervalId") Long intervalId,
+            @Param("recoveredAtUtc") Date recoveredAtUtc, @Param("missingToUtc") Date missingToUtc);
+    List<TTestCollectorExceptionInterval> selectCollectorExceptionIntervals(Long testId);
 }

--
Gitblit v1.7.1