From e58a05b78d09bcd4c1a12e8610c5adfc316494e8 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 18 十二月 2025 10:04:42 +0800
Subject: [PATCH] 2025.12.18

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

diff --git a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedClue.kt b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedClue.kt
index 19eedc2..306d4a7 100644
--- a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedClue.kt
+++ b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedClue.kt
@@ -20,18 +20,6 @@
  */
 class PollutedClue() : BaseExceptionResult() {
 
-//    constructor(
-//        tag: ExceptionTag, factor: FactorFilter.SelectedFactor, eType: ExceptionType, config: RTExcWindLevelConfig,
-//        windLevelCondition: RTExcWindLevelConfig.WindLevelCondition?,
-//    ) : this() {
-//        if (tag.exceptionData.isEmpty()) return
-//        deviceCode = tag.startData?.deviceCode
-//        pollutedData = PollutedData(
-//            tag.startData!!, tag.endData, factor, tag.exceptionData, tag.historyData, eType, windLevelCondition
-//        )
-//        pollutedArea = PollutedArea(tag.historyData, tag.exceptionData, config, windLevelCondition)
-//    }
-
     constructor(
         exceptions: List<Pair<FactorFilter.SelectedFactor, ExceptionTag>>,
         eType: ExceptionType,
@@ -45,6 +33,7 @@
         var exceptionData = mutableListOf<BaseRealTimeData>()
         var historyData = mutableListOf<BaseRealTimeData>()
         exceptions.forEach { e ->
+            // 灏嗛噰鏍锋椂闂存渶鏃╃殑浣滀负寮�濮嬫暟鎹�
             if (startData == null) {
                 startData = e.second.startData
             } else {
@@ -53,6 +42,7 @@
                 }
             }
 
+            // 灏嗛噰鏍锋椂闂存渶鏅氱殑浣滀负缁撴潫鏁版嵁
             if (endData == null) {
                 endData = e.second.endData
             } else {
@@ -61,6 +51,7 @@
                 }
             }
 
+            // 灏嗘墍鏈夊紓甯告暟鎹幓閲嶅悎骞�
             if (exceptionData.isEmpty()) {
                 exceptionData = e.second.exceptionData
             } else {
@@ -71,6 +62,7 @@
                 }
             }
 
+            // 灏嗘墍鏈夊巻鍙叉暟鎹幓閲嶅悎骞�
             if (historyData.isEmpty()) {
                 historyData = e.second.historyData
             } else {
@@ -81,21 +73,18 @@
                 }
             }
         }
+        // 鎸夌収閲囨牱鏃堕棿鍗囧簭鎺掑垪
         exceptionData.sortBy { it.dataTime }
         historyData.sortBy { it.dataTime }
 
-        val factorList = exceptions.map { it.first }
+        // 鑾峰彇鍘婚噸鍚庣殑鐩戞祴鍥犲瓙绫诲瀷
+        val factorList = exceptions.map { it.first }.distinct()
         pollutedData = PollutedData(
             startData!!, endData, factorList, exceptionData, historyData, eType, windLevelCondition
         )
         pollutedArea = PollutedArea(historyData, exceptionData, config, windLevelCondition)
 
     }
-
-
-    /**
-     * 6. 灞曠ず鏁版嵁鍙樺寲鎯呭喌锛屼笂鍗囬�熺巼绛夌瓑
-     */
 
     /**
      * @see [MsgType]

--
Gitblit v1.9.3