From eb3dd00b0b7fcda477229d518d250f9c842b790b Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 21 十月 2025 17:45:44 +0800
Subject: [PATCH] 2025.10.21 1. 走航季度报告相关数据计算逻辑调整
---
src/main/kotlin/com/flightfeather/uav/domain/repository/SourceTraceRep.kt | 16 +++++++++++++---
1 files changed, 13 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..f726760 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,
@@ -125,6 +134,7 @@
.andGreaterThanOrEqualTo("startTime", mission.startTime)
.andLessThanOrEqualTo("endTime", mission.endTime)
}).map { it?.id }
+ if (idList.isEmpty()) return 0
sourceTraceMsgMapper.deleteByExample(Example(SourceTraceMsg::class.java).apply {
createCriteria().andIn("id", idList)
})
--
Gitblit v1.9.3