From 38d72198bfcced01ed9513b978163e5cd1d84625 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 21 七月 2025 15:31:41 +0800
Subject: [PATCH] 2025.7.21 1. 修改动态溯源异常判断逻辑

---
 src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedArea.kt |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedArea.kt b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedArea.kt
index 563466a..9375913 100644
--- a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedArea.kt
+++ b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedArea.kt
@@ -26,6 +26,8 @@
         windLevelCondition: RTExcWindLevelConfig.WindLevelCondition?,
     ) : this() {
         distanceType = windLevelCondition?.distanceType
+        distanceRange = distanceType?.disRange
+        distanceDes = distanceType?.des
         windLevelCondition?.let { sourceTrace(historyData, exceptionData, config, it) }
     }
 
@@ -39,6 +41,9 @@
 
     // 姹℃煋鍙兘鐨勫彂鐢熻窛绂�
     var distanceType: DistanceType? = null
+
+    var distanceRange: Pair<Double, Double>? = null
+    var distanceDes: String? = null
 
     /**
      * 鍙嶅悜婧簮
@@ -102,7 +107,7 @@
 //            result.add(center)
             var startDeg = 0
             while (startDeg <= 360) {
-                val p = MapUtil.getPointByLen(center, 50.0, startDeg * PI / 180)
+                val p = MapUtil.getPointByLen(center, distanceRange.second, startDeg * PI / 180)
                 result.add(p)
                 startDeg++
             }
@@ -135,7 +140,7 @@
         val result = mutableListOf<Pair<Double, Double>>()
         var startDeg = 0
         while (startDeg <= 360) {
-            val p = MapUtil.getPointByLen(center, 50.0, startDeg * PI / 180)
+            val p = MapUtil.getPointByLen(center, DistanceType.TYPE1.disRange.second, startDeg * PI / 180)
             result.add(p)
             startDeg++
         }

--
Gitblit v1.9.3