From b315032d126a640758d4a6fccf297acbab057772 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期五, 22 八月 2025 17:30:44 +0800 Subject: [PATCH] 2025.8.21 1. 新增走航任务统计功能(待完成) --- src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/exceptiontype/RealTimeExceptionValueMutation.kt | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/exceptiontype/RealTimeExceptionValueMutation.kt b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/exceptiontype/RealTimeExceptionValueMutation.kt index 81bc08a..2a3d11c 100644 --- a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/exceptiontype/RealTimeExceptionValueMutation.kt +++ b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/exceptiontype/RealTimeExceptionValueMutation.kt @@ -3,6 +3,7 @@ import com.flightfeather.uav.biz.dataanalysis.model.ExceptionTag import com.flightfeather.uav.biz.dataanalysis.model.ExceptionType import com.flightfeather.uav.biz.sourcetrace.RealTimeAnalysisConfig +import com.flightfeather.uav.biz.sourcetrace.model.RealTimeExceptionResult import com.flightfeather.uav.common.utils.MapUtil import com.flightfeather.uav.domain.entity.BaseRealTimeData import com.flightfeather.uav.socket.eunm.FactorType @@ -32,6 +33,8 @@ return ExceptionType.TYPE4 } + override var judgeMethod: JudgeMethod = JudgeMethod.M2 + override fun judgeException(p: BaseRealTimeData?, n: BaseRealTimeData): MutableMap<FactorType, Boolean> { val res = mutableMapOf<FactorType, Boolean>() config.factorFilter.mainList().forEach { f -> @@ -53,7 +56,7 @@ return res } - override fun judgeExceptionCount(tag: ExceptionTag): Boolean { + override fun judgeExceptionCount(tag: ExceptionTag, factorType: FactorType?): Boolean { val count = tag.exceptionData.size val b1 = special && count >= (config.mutationNum / 2) @@ -62,12 +65,12 @@ return b1 || b2 } - override fun needCut(tag: ExceptionTag, hasException: Boolean?): Boolean { + override fun needCut(tag: ExceptionTag, hasException: Boolean?, data: BaseRealTimeData): Boolean { // 鎸夌収鏃堕暱鍜岃窛绂婚檺鍒跺皢寮傚父鎴彇 if (tag.exceptionData.isEmpty()) return false val se = tag.exceptionData.first() - val ee = tag.exceptionData.last() + val ee = data val sTime = LocalDateTime.ofInstant(se.dataTime?.toInstant(), ZoneId.systemDefault()) val eTime = LocalDateTime.ofInstant(ee.dataTime?.toInstant(), ZoneId.systemDefault()) @@ -88,4 +91,8 @@ return b1 || b2 } + + override fun onNewResult(result: List<RealTimeExceptionResult>) { + TODO("Not yet implemented") + } } \ No newline at end of file -- Gitblit v1.9.3