From d649f734c44541641158aec2d6b10d630f5a0827 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 25 十二月 2025 17:25:16 +0800
Subject: [PATCH] 2025.12.19 1. 动态溯源相关分析逻辑调整; 2. 走航报告接口参数调整;

---
 src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedSource.kt |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedSource.kt b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedSource.kt
index a6e9311..52b226c 100644
--- a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedSource.kt
+++ b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedSource.kt
@@ -3,7 +3,6 @@
 import com.flightfeather.uav.biz.dataanalysis.model.ExceptionType
 import com.flightfeather.uav.common.utils.DateUtil
 import com.flightfeather.uav.common.utils.MapUtil
-import com.flightfeather.uav.domain.entity.BaseRealTimeData
 import com.flightfeather.uav.domain.entity.SceneInfo
 import com.flightfeather.uav.domain.repository.SceneInfoRep
 import com.flightfeather.uav.lightshare.bean.AreaVo
@@ -12,6 +11,7 @@
 import com.flightfeather.uav.socket.eunm.FactorType
 import org.springframework.beans.BeanUtils
 import org.springframework.web.context.ContextLoader
+import kotlin.math.round
 
 /**
  * 姹℃煋鏉ユ簮
@@ -186,9 +186,9 @@
         pollutedData.statisticMap.entries.forEach { s ->
             val txtArr = mutableListOf<String>()
             s.value.excGroup?.forEach exception@{ p ->
-                val preValue = p.getFirstDataValue()
-                val curValue = p.getLastDataValue()
-                val per = p.per?.times(100)
+                val preValue = p.firstDataValue()
+                val curValue = p.lastDataValue()
+                val per = round(p.per?.times(100) ?: .0)
                 val rate = p.rate
                 if (preValue == null || curValue == null || per == null) return@exception
                 when (pollutedData.exceptionType) {

--
Gitblit v1.9.3