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/SatelliteTelemetryServiceImpl.kt | 45 +++++++++++++++------------------------------
1 files changed, 15 insertions(+), 30 deletions(-)
diff --git a/src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/SatelliteTelemetryServiceImpl.kt b/src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/SatelliteTelemetryServiceImpl.kt
index d83ba68..33c310e 100644
--- a/src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/SatelliteTelemetryServiceImpl.kt
+++ b/src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/SatelliteTelemetryServiceImpl.kt
@@ -54,11 +54,25 @@
return satelliteGridRep.fetchGridData(groupId, dataTime, type)
}
+ override fun fetchGridData(gridData: GridData): List<GridData?> {
+ return satelliteGridRep.fetchGridData(gridData)
+ }
+
+ override fun deleteGridData(dataId: Int): Boolean {
+ try {
+ satelliteGridRep.deleteGridData(dataId)
+ } catch (e: Exception) {
+ // todo: 鍔犲叆鏃ュ織瀛樺偍閫昏緫
+ return false
+ }
+ return true
+ }
+
override fun fetchGridDataDetail(dataId: Int, groupId: Int?, cellId: Int?): List<GridDataDetail?> {
val res = satelliteGridRep.fetchGridDataDetail(dataId, groupId, cellId)
res.forEach {
if (it?.pm25 != null) {
- it.pm25 = round(it.pm25 * 100) / 100
+ it.pm25 = round(it.pm25 * 10) / 10
}
}
return res
@@ -234,35 +248,6 @@
response.outputStream.write(file.readBytes())
}
return true
- }
-
- override fun calGridVertex(groupId: Int): List<GridCell?> {
- val cellList = satelliteGridRep.fetchGridCell(groupId)
- val vertexList = SatelliteGridManage.calGridVertex(cellList.map {
- if (it?.longitude == null || it.latitude == null) {
- throw BizException("鍗槦閬ユ祴缃戞牸璁$畻椤剁偣鍧愭爣鐐瑰け璐ワ紝瀛樺湪涓績鐐瑰潗鏍囦负绌虹殑鎯呭喌")
- }
- it.longitude?.toDouble()!! to it.latitude?.toDouble()!!
- })
-
- cellList.forEachIndexed { i, c ->
- val v = vertexList[i]
- c?.point1Lon = v.point1Lon.toBigDecimal()
- c?.point1Lat = v.point1Lat.toBigDecimal()
-
- c?.point2Lon = v.point2Lon.toBigDecimal()
- c?.point2Lat = v.point2Lat.toBigDecimal()
-
- c?.point3Lon = v.point3Lon.toBigDecimal()
- c?.point3Lat = v.point3Lat.toBigDecimal()
-
- c?.point4Lon = v.point4Lon.toBigDecimal()
- c?.point4Lat = v.point4Lat.toBigDecimal()
- }
-
- satelliteGridRep.updateGridCellBatch(cellList)
-
- return cellList
}
override fun fetchGridAod(groupId: Int, dataTime: LocalDateTime?): List<GridAod?> {
--
Gitblit v1.9.3