From 53857f42f777e2b9753b8f00cce1a60ce3dcb8fd Mon Sep 17 00:00:00 2001
From: Riku <risaku@163.com>
Date: 星期三, 15 十月 2025 22:42:29 +0800
Subject: [PATCH] 2025.10.15 修改高德地图地理逆编码结果,让地理位置信息更加详细
---
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