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

---
 src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedClue.kt |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 54 insertions(+), 2 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 9893656..e8c29b7 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
@@ -1,10 +1,62 @@
 package com.flightfeather.uav.biz.sourcetrace.model
 
+import com.flightfeather.uav.biz.FactorFilter
+import com.flightfeather.uav.biz.dataanalysis.BaseExceptionResult
+import com.flightfeather.uav.biz.dataanalysis.model.ExceptionTag
+import com.flightfeather.uav.biz.dataanalysis.model.ExceptionType
+import com.flightfeather.uav.biz.sourcetrace.config.RTExcWindLevelConfig
+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.socket.sender.MsgType
+
 /**
  * 姹℃煋绾跨储
- * 鏍规嵁
+ * 閫氳繃姹℃煋鏁版嵁[PollutedData],姹℃煋鍖哄煙[PollutedArea],姹℃煋鏉ユ簮[PollutedSource]锛屽舰鎴愪竴鏉℃薄鏌撴函婧愮嚎绱�
  * @date 2025/5/27
  * @author feiyu02
  */
-class PollutedClue {
+class PollutedClue() : BaseExceptionResult() {
+
+    constructor(
+        exceptions: List<Pair<FactorFilter.SelectedFactor, ExceptionTag>>,
+        eType: ExceptionType,
+        config: RTExcWindLevelConfig,
+        windLevelCondition: RTExcWindLevelConfig.WindLevelCondition?,
+    ) : this() {
+        if (exceptions.isEmpty() || exceptions[0].second.exceptionData.isEmpty()) return
+        deviceCode = exceptions[0].second.startData?.deviceCode
+
+
+        // 鑾峰彇鍘婚噸鍚庣殑鐩戞祴鍥犲瓙绫诲瀷
+        val factorList = exceptions.map { it.first }.distinct()
+        pollutedData = PollutedData(exceptions, eType)
+        pollutedArea = PollutedArea(pollutedData!!, config, windLevelCondition)
+
+    }
+
+    /**
+     * @see [MsgType]
+     */
+    var msgType: Int? = null
+
+    var deviceCode: String? = null
+
+    var pollutedData: PollutedData? = null
+
+    var pollutedArea: PollutedArea? = null
+
+    var pollutedSource: PollutedSource? = null
+
+    /**
+     * 鏌ユ壘绯荤粺鍐呴儴婧簮鑼冨洿鍐呯殑姹℃煋浼佷笟
+     */
+    fun searchScenes(sceneInfoRep: SceneInfoRep) {
+        if (pollutedArea == null || pollutedData == null) return
+        pollutedSource = PollutedSource().also {
+            it.searchScenes(pollutedArea!!, sceneInfoRep, pollutedData!!)
+        }
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3