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/SceneInfoRep.kt | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/main/kotlin/com/flightfeather/uav/domain/repository/SceneInfoRep.kt b/src/main/kotlin/com/flightfeather/uav/domain/repository/SceneInfoRep.kt
index 5ebde44..e6ead7f 100644
--- a/src/main/kotlin/com/flightfeather/uav/domain/repository/SceneInfoRep.kt
+++ b/src/main/kotlin/com/flightfeather/uav/domain/repository/SceneInfoRep.kt
@@ -4,6 +4,7 @@
import com.flightfeather.uav.domain.entity.SceneInfo
import com.flightfeather.uav.domain.mapper.SceneInfoMapper
import com.flightfeather.uav.lightshare.bean.AreaVo
+import com.flightfeather.uav.lightshare.eunm.SceneType
import org.springframework.stereotype.Repository
import tk.mybatis.mapper.entity.Example
@@ -46,12 +47,16 @@
/**
* 鏍规嵁澶氳竟褰㈢瓫閫夊満鏅�
* @param polygon 澶氳竟褰㈠潗鏍囧垪琛紝椤哄簭涓洪『鏃堕拡鎴栭�嗘椂閽�(瑕佹眰浣跨敤鐏槦鍧愭爣绯�)
+ * @param filter 闇�瑕佽繃婊ゆ帀鐨勫満鏅被鍨�
* @return 澶氳竟褰㈠唴鐨勫満鏅垪琛�
*/
- fun findByPolygon(polygon: List<Pair<Double, Double>>): List<SceneInfo?> {
+ fun findByPolygon(polygon: List<Pair<Double, Double>>, filter: List<SceneType> = emptyList()): List<SceneInfo?> {
+ val _filter = filter.map { it.value.toByte() }
// 璁$畻澶氳竟褰㈠洓鑷宠寖鍥�
val bounds = MapUtil.calFourBoundaries(polygon)
- val sceneList = findByCoordinateRange(bounds)
+ val sceneList = findByCoordinateRange(bounds).filter {
+ filter.isEmpty() || !_filter.contains(it?.typeId)
+ }
// 绛涢�夋槸鍚﹀湪鍙嶅悜婧簮鍖哄煙澶氳竟褰㈠唴閮�
return sceneList.filter { scene ->
scene ?: false
--
Gitblit v1.9.3