From 29383149f7040d89ae00ad48dc48bbcf46587946 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 01 九月 2025 17:32:53 +0800
Subject: [PATCH] 2025.9.1 1. 新增走航任务统计功能(待完成)

---
 src/main/kotlin/com/flightfeather/uav/domain/repository/SourceTraceRep.kt |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/domain/repository/SourceTraceRep.kt b/src/main/kotlin/com/flightfeather/uav/domain/repository/SourceTraceRep.kt
index b8c4c4c..23f46e0 100644
--- a/src/main/kotlin/com/flightfeather/uav/domain/repository/SourceTraceRep.kt
+++ b/src/main/kotlin/com/flightfeather/uav/domain/repository/SourceTraceRep.kt
@@ -99,9 +99,18 @@
         return if (res.isEmpty()) null else res[0]
     }
 
-    fun fetchList(deviceCode: String, startTime: Date, endTime: Date): List<BaseExceptionResult?> {
-        return sourceTraceMsgBlobMapper.selectWithBlob(deviceCode, startTime, endTime)
-            .map { stm ->
+    fun fetchList(
+        deviceCode: String,
+        startTime: Date,
+        endTime: Date,
+        msgType: MsgType? = null,
+    ): List<BaseExceptionResult?> {
+        var res = sourceTraceMsgBlobMapper.selectWithBlob(deviceCode, startTime, endTime)
+        if (msgType !== null) {
+            res = res.filter { it?.msgType == msgType.value }
+        }
+
+        return res.map { stm ->
             when (stm?.msgType) {
                 MsgType.PolClue.value,
                 MsgType.DataChange.value,

--
Gitblit v1.9.3