From 176d7d8283e66ccf63878c9ab823e900df94b748 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 05 八月 2025 17:20:58 +0800 Subject: [PATCH] 2025.8.5 1. 动态溯源模块添加延迟数据周期异常合并功能 --- src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedClue.kt | 8 +++++++- 1 files changed, 7 insertions(+), 1 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..6035ec5 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 @@ -45,6 +45,7 @@ var exceptionData = mutableListOf<BaseRealTimeData>() var historyData = mutableListOf<BaseRealTimeData>() exceptions.forEach { e -> + // 灏嗛噰鏍锋椂闂存渶鏃╃殑浣滀负寮�濮嬫暟鎹� if (startData == null) { startData = e.second.startData } else { @@ -53,6 +54,7 @@ } } + // 灏嗛噰鏍锋椂闂存渶鏅氱殑浣滀负缁撴潫鏁版嵁 if (endData == null) { endData = e.second.endData } else { @@ -61,6 +63,7 @@ } } + // 灏嗘墍鏈夊紓甯告暟鎹幓閲嶅悎骞� if (exceptionData.isEmpty()) { exceptionData = e.second.exceptionData } else { @@ -71,6 +74,7 @@ } } + // 灏嗘墍鏈夊巻鍙叉暟鎹幓閲嶅悎骞� if (historyData.isEmpty()) { historyData = e.second.historyData } else { @@ -81,10 +85,12 @@ } } } + // 鎸夌収閲囨牱鏃堕棿鍗囧簭鎺掑垪 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 ) -- Gitblit v1.9.3