feiyu02
2025-08-05 176d7d8283e66ccf63878c9ab823e900df94b748
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
@@ -15,6 +16,7 @@
 * @date 2025/5/13
 * @author feiyu02
 */
@Deprecated("2025.5.29, 逻辑与业务不匹配,后续删除")
class RealTimeExceptionValueMutation : BaseRealTimeException<ExceptionTag> {
    constructor(config: RealTimeAnalysisConfig) : super(config, ExceptionTag::class.java)
@@ -30,6 +32,8 @@
    override fun getExceptionType(): ExceptionType {
        return ExceptionType.TYPE4
    }
    override var judgeMethod: JudgeMethod = JudgeMethod.M2
    override fun judgeException(p: BaseRealTimeData?, n: BaseRealTimeData): MutableMap<FactorType, Boolean> {
        val res = mutableMapOf<FactorType, Boolean>()
@@ -52,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)
@@ -61,12 +65,12 @@
        return b1 || b2
    }
    override fun needCut(tag: ExceptionTag): 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())
@@ -87,4 +91,8 @@
        return b1 || b2
    }
    override fun onNewResult(result: List<RealTimeExceptionResult>) {
        TODO("Not yet implemented")
    }
}