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/lightshare/service/impl/SatelliteDataCalculateServiceImpl.kt | 28 ++++++++++++++++------------
1 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/SatelliteDataCalculateServiceImpl.kt b/src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/SatelliteDataCalculateServiceImpl.kt
index ece5805..93866e6 100644
--- a/src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/SatelliteDataCalculateServiceImpl.kt
+++ b/src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/SatelliteDataCalculateServiceImpl.kt
@@ -60,6 +60,7 @@
return cellList
}
+ @Transactional
override fun splitGrid(groupId: Int, scale: Int): List<GridCell?> {
// 妫�鏌ヨ缃戞牸灞炴�ф槸鍚﹀悎瑙�
val gridGroup =
@@ -134,7 +135,10 @@
}
@Transactional
- override fun dataFusion(missionCode: String, groupId: Int): List<GridDataDetail?> {
+ override fun dataFusion(gridData: GridData): List<GridDataDetail?> {
+ val missionCode = gridData.missionCode ?: throw BizException("缂哄皯浠诲姟缂栧彿")
+ val groupId = gridData.groupId ?: throw BizException("缂哄皯缃戞牸缁刬d")
+
// 鏌ヨ璧拌埅浠诲姟鍙婂搴旇蛋鑸洃娴嬫暟鎹�
val mission = missionRep.findOne(missionCode) ?: throw BizException("浠诲姟涓嶅瓨鍦�")
val data = realTimeDataRep.fetchData(mission)
@@ -142,25 +146,24 @@
// 鏌ユ壘鏄惁宸叉湁璧拌埅铻嶅悎璁板綍
val oldGridDataList = satelliteGridRep.fetchGridData(GridData().apply {
this.groupId = groupId
- mixDataId = missionCode
+ this.missionCode = missionCode
this.type = SatelliteDataType.Monitor.value.toByte()
})
if (oldGridDataList.isEmpty()) {
// 鍒涘缓铻嶅悎鏁版嵁绱㈠紩瀵硅薄
- val newGridData = GridData().apply {
+ val newGridData = gridData.apply {
this.groupId = groupId
dataTime = mission.startTime
type = SatelliteDataType.Monitor.value.toByte()
this.missionCode = mission.missionCode
- // Fixme 2025.3.27: 琛屾斂鍖哄垝鍦ㄨ蛋鑸换鍔℃坊鍔犲搴斿瓧娈靛悗杩涜璧嬪��
- provinceCode
- provinceName
- cityCode
- cityName
- districtCode
+ provinceCode = mission.provinceCode
+ provinceName = mission.provinceName
+ cityCode = mission.cityCode
+ cityName = mission.cityName
+ districtCode = mission.districtCode
districtName = mission.districtName
- // Fixme 2025.3.27: 鎵�灞炵洃娴嬬偣鍖哄煙鐩墠闇�瑕侀�氳繃鐢ㄦ埛閫夋嫨纭畾
+ // 2025.3.27: 鎵�灞炵洃娴嬬偣鍖哄煙闇�瑕侀�氳繃鐢ㄦ埛閫夋嫨纭畾
zone
pollutionDegreeIndex
pollutionDegree
@@ -199,7 +202,7 @@
}
}
- override fun mixGridData(groupId: Int, dataIdList: List<Int>): List<GridDataDetailMixVo> {
+ override fun mixUnderwayGridData(groupId: Int, dataIdList: List<Int>): List<GridDataDetailMixVo> {
// 鑾峰彇鎵�浣跨敤鐨勭綉鏍肩粍缃戞牸淇℃伅
val gridCellList = satelliteGridRep.fetchGridCell(groupId)
@@ -248,10 +251,11 @@
gridDataDetailList: List<GridDataDetail>,
searchLength: Int,
): List<GridDataDetail> {
+ val gridGroup =satelliteGridRep.fetchGridGroup(groupId)
val gridCellList = satelliteGridRep.fetchGridCell(groupId)
val originCellIdList = gridDataDetailList.map { it.cellId }
// Fixme 2025.3.24: 姝ゅ鏍规嵁鐜版湁鐨勭綉鏍间俊鎭璁℃柟寮忥紝浣跨敤涓存椂鐨勫弬鏁帮紝鍚庣画灏嗙綉鏍奸�氳繃浜岀淮鍧愭爣褰㈠紡琛ㄧず锛屾澶勫弬鏁板幓闄�
- val option = GridGroupOption(120, 90, 10, 10)
+ val option = GridGroupOption(gridGroup?.maxXaxis ?: 120, gridGroup?.maxYaxis ?: 90, 10, 10)
val resMap = mutableMapOf<Int, MutableList<GridDataDetail>>()
--
Gitblit v1.9.3