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/MissionRep.kt | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/main/kotlin/com/flightfeather/uav/domain/repository/MissionRep.kt b/src/main/kotlin/com/flightfeather/uav/domain/repository/MissionRep.kt
index ce7cdec..164f303 100644
--- a/src/main/kotlin/com/flightfeather/uav/domain/repository/MissionRep.kt
+++ b/src/main/kotlin/com/flightfeather/uav/domain/repository/MissionRep.kt
@@ -2,6 +2,7 @@
import com.flightfeather.uav.domain.entity.Mission
import com.flightfeather.uav.domain.mapper.MissionMapper
+import com.flightfeather.uav.lightshare.bean.AreaVo
import org.springframework.stereotype.Repository
import tk.mybatis.mapper.entity.Example
import java.util.*
@@ -44,4 +45,25 @@
.andIsNotNull("endTime")
})
}
+
+ /**
+ * 鏍规嵁鍖哄煙鍜屾椂闂磋寖鍥存煡璇㈡湁鏁堣蛋鑸换鍔″垪琛�
+ * 绛涢�夋寚瀹氳鏀垮尯鍒掑唴銆佺壒瀹氭椂闂存涓斿凡瀹屾垚鏈夋晥閲岀▼璁板綍鐨勮蛋鑸换鍔�
+ * @param areaVo 鍖哄煙鍙傛暟瀵硅薄锛屽寘鍚渷銆佸競銆佸尯涓夌骇琛屾斂鍖哄垝缂栫爜
+ * @param startTime 鏌ヨ璧峰鏃堕棿锛堝寘鍚級
+ * @param endTime 鏌ヨ缁撴潫鏃堕棿锛堝寘鍚級
+ * @return 绗﹀悎鏉′欢鐨勮蛋鑸换鍔″垪琛紝鑻ユ棤鍙繑鍥炵┖鍒楄〃
+ * @see AreaVo 鍖哄煙鍙傛暟鏁版嵁缁撴瀯
+ * @see Mission 璧拌埅浠诲姟瀹炰綋绫�
+ */
+ fun findByAreaAndTime(areaVo: AreaVo, startTime: Date, endTime: Date): List<Mission?> {
+ return missionMapper.selectByExample(Example(Mission::class.java).apply {
+ createCriteria().andBetween("startTime", startTime, endTime)
+ .andEqualTo("provinceCode", areaVo.provinceCode)
+ .andEqualTo("cityCode", areaVo.cityCode)
+ .andEqualTo("districtCode", areaVo.districtCode)
+ .andIsNotNull("kilometres")
+ .andNotEqualTo("kilometres", 0)
+ })
+ }
}
\ No newline at end of file
--
Gitblit v1.9.3