From f7bdafb7cddd049bbb1bbf265fa006683b4ac693 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期三, 11 六月 2025 17:08:35 +0800 Subject: [PATCH] 1. 新增动态污染溯源新的判定逻辑(待完成) --- src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedClue.kt | 48 ++++++++++++++++++++++++++++++++---------------- 1 files changed, 32 insertions(+), 16 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 6775572..53fbd07 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 @@ -2,6 +2,7 @@ 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 @@ -18,19 +19,34 @@ */ class PollutedClue() : BaseExceptionResult() { +// constructor( +// start: BaseRealTimeData, +// end: BaseRealTimeData?, +// factor: FactorFilter.SelectedFactor, +// exceptionData: List<BaseRealTimeData>, +// eType: ExceptionType, +// config: RTExcWindLevelConfig, +// windLevelCondition: RTExcWindLevelConfig.WindLevelCondition?, +// ) : this() { +// if (exceptionData.isEmpty()) return +// pollutedData = PollutedData(start, end, factor, exceptionData, eType, windLevelCondition) +// pollutedArea = PollutedArea(exceptionData, config, windLevelCondition) +// } + constructor( - start: BaseRealTimeData, - end: BaseRealTimeData?, - factor: FactorFilter.SelectedFactor, - exceptionData: List<BaseRealTimeData>, - eType: ExceptionType, - config: RTExcWindLevelConfig, - windLevelCondition: RTExcWindLevelConfig.WindLevelCondition - ) : this() { - this.factor = factor - if (exceptionData.isEmpty()) return - pollutedData = PollutedData(start, end, factor, exceptionData, eType, windLevelCondition) - pollutedArea = PollutedArea(exceptionData, config, windLevelCondition) + tag: ExceptionTag, factor: FactorFilter.SelectedFactor, eType: ExceptionType, config: RTExcWindLevelConfig, + windLevelCondition: RTExcWindLevelConfig.WindLevelCondition?, + ) :this() +// this( +// tag.startData!!, tag.endData, factor, tag.exceptionData, eType, config, +// windLevelCondition +// ) + { + if (tag.exceptionData.isEmpty()) return + pollutedData = PollutedData( + tag.startData!!, tag.endData, factor, tag.exceptionData, tag.historyData, eType, windLevelCondition + ) + pollutedArea = PollutedArea(tag.historyData, tag.exceptionData, config, windLevelCondition) } /** @@ -43,13 +59,13 @@ var pollutedSource: PollutedSource? = null - private var factor: FactorFilter.SelectedFactor? = null - /** * 鏌ユ壘绯荤粺鍐呴儴婧簮鑼冨洿鍐呯殑姹℃煋浼佷笟 */ fun searchScenes(sceneInfoRep: SceneInfoRep) { - if (pollutedArea == null || factor == null) return - pollutedSource = PollutedSource().also { it.searchScenes(pollutedArea!!, sceneInfoRep, factor!!) } + if (pollutedArea == null || pollutedData == null) return + pollutedSource = PollutedSource().also { + it.searchScenes(pollutedArea!!, sceneInfoRep, pollutedData!!) + } } } \ No newline at end of file -- Gitblit v1.9.3