From c56e1e74426238939f229f0005828d05089715ff Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期四, 03 七月 2025 17:30:58 +0800 Subject: [PATCH] 2025.7.3 1. 新增动态污染溯源新的判定逻辑 --- src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/SourceTraceController.kt | 31 +++++++++++++++++++++---------- 1 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/SourceTraceController.kt b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/SourceTraceController.kt index cefe129..9c522a0 100644 --- a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/SourceTraceController.kt +++ b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/SourceTraceController.kt @@ -35,23 +35,23 @@ else RTExcWindLevelConfig( FactorFilter.builder() -// .withMain(FactorType.NO2) - .withMain(FactorType.CO) -// .withMain(FactorType.H2S) -// .withMain(FactorType.SO2) -// .withMain(FactorType.O3) +// .withMain(FactorType.NO2) +// .withMain(FactorType.CO) +// .withMain(FactorType.H2S) +// .withMain(FactorType.SO2) +// .withMain(FactorType.O3) .withMain(FactorType.PM25) .withMain(FactorType.PM10) .withMain(FactorType.VOC) .create() ) - pollutedSummary = PollutedSummary(config){ summaryCallback(it)} + pollutedSummary = PollutedSummary(config) { summaryCallback(it) } newTask() } constructor(sceneInfoRep: SceneInfoRep) : this(sceneInfoRep, null) - private val pollutedSummary:PollutedSummary + private val pollutedSummary: PollutedSummary private val sceneInfoRep: SceneInfoRep @@ -71,6 +71,8 @@ add(RTExcWindLevel1_1(config) { exceptionCallback(it) }.also { it.init() }) add(RTExcWindLevel4(config) { exceptionCallback(it) }.also { it.init() }) add(RTExcWindLevel6(config) { exceptionCallback(it) }.also { it.init() }) + add(RTExcChangeRate(config) { exceptionCallback(it) }.also { it.init() }) + add(RTWarnChangeRate(config) { dataChangeCallback(it) }.also { it.init() }) } } @@ -102,11 +104,20 @@ // 婧簮姹℃煋婧愪俊鎭� ex.searchScenes(sceneInfoRep) - // 璁板綍姹℃煋绾跨储 - pollutedSummary.addClue(ex) - // 骞挎挱姹℃煋婧簮寮傚父缁撴灉 UnderwayWebSocketSender.broadcast(MsgType.PolClue.value, ex) + + // 璁板綍姹℃煋绾跨储 + pollutedSummary.addClue(ex) + } + + // 鏁版嵁鍙樺寲鎻愰啋鍥炶皟 + private fun dataChangeCallback(ex: PollutedClue) { + // 婧簮姹℃煋婧愪俊鎭� + ex.searchScenes(sceneInfoRep) + + // 骞挎挱鏁版嵁鍙樺寲鎻愰啋 + UnderwayWebSocketSender.broadcast(MsgType.DataChange.value, ex) } private fun summaryCallback(ex: PollutedSummary.AnalysisResult) { -- Gitblit v1.9.3