From 2e024c986c14943a41f7bfe913cfef0cede64198 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 29 七月 2025 17:37:54 +0800
Subject: [PATCH] 2025.7.29 1. 动态溯源模块添加记录删除等debug功能

---
 src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/exceptiontype/BaseRealTimeException.kt |   69 +++++++++++++++++-----------------
 1 files changed, 35 insertions(+), 34 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/exceptiontype/BaseRealTimeException.kt b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/exceptiontype/BaseRealTimeException.kt
index bfb6b9a..1d7d75e 100644
--- a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/exceptiontype/BaseRealTimeException.kt
+++ b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/exceptiontype/BaseRealTimeException.kt
@@ -17,6 +17,7 @@
  * @date 2025/5/13
  * @author feiyu02
  */
+@Deprecated("2025.5.29, 閫昏緫涓庝笟鍔′笉鍖归厤锛屽悗缁垹闄�")
 abstract class BaseRealTimeException<T : ExceptionTag>(config: RealTimeAnalysisConfig, tagClz: Class<T>) :
     BaseExceptionContinuous<T, RealTimeAnalysisConfig, RealTimeExceptionResult>(config, tagClz) {
 
@@ -26,42 +27,42 @@
 
     var callback: NewExceptionCallback? = null
 
-    override fun onNextData(data: BaseRealTimeData) {
-        val isContinue = isContinuous(lastData, data)
-        val hasException = judgeException(lastData, data)
-        config.factorFilter.selectedList.forEach { s ->
-            val f = s.main
-            tagMap[f]?.let {
-                it.eIndex++
-                // 璧峰鏁版嵁
-                it.endData = data
-                if (it.startData == null) {
-                    it.refreshWithNextException(data)
-                }
-                // 鍒ゆ柇鐩搁偦鏁版嵁鏄惁杩炵画鎴栬�呮槸鍚︽弧瓒宠嚜瀹氫箟鎴彇鏉′欢
-                if (!isContinue || needCut(it)) {
-                    // 璁板綍寮傚父锛岀粨鏉熷紓甯哥殑瀹炴椂鐘舵�佹挱鎶�
-                    recordException(s, it, data)
-                } else {
-                    // 绉婚櫎浜嗙埗绫诲師鏈夐�昏緫锛屾敼涓哄綋婊¤冻寮傚父鏉′欢鏃讹紝闇�瑕佸疄鏃舵帹閫佹挱鎶ュ紓甯哥殑鐘舵�佸彉鍖栵紝浣嗕笉鎴彇寮傚父
-                    if (hasException[f] == true) {
-                        it.addExceptionData(data)
-                        checkResult(s)
-                    }
-                }
-            }
-        }
-        lastData = data
+//    override fun onNextData(data: BaseRealTimeData) {
+//        val isContinue = isContinuous(lastData, data)
+//        val hasException = judgeException(lastData, data)
+//        config.factorFilter.selectedList.forEach { s ->
+//            val f = s.main
+//            tagMap[f]?.let {
+//                it.eIndex++
+//                // 璧峰鏁版嵁
+//                it.endData = data
+//                if (it.startData == null) {
+//                    it.refreshWithNextException(data)
+//                }
+//                // 鍒ゆ柇鐩搁偦鏁版嵁鏄惁杩炵画鎴栬�呮槸鍚︽弧瓒宠嚜瀹氫箟鎴彇鏉′欢
+//                if (!isContinue || needCut(it)) {
+//                    // 璁板綍寮傚父锛岀粨鏉熷紓甯哥殑瀹炴椂鐘舵�佹挱鎶�
+//                    recordException(s, it, data)
+//                } else {
+//                    // 绉婚櫎浜嗙埗绫诲師鏈夐�昏緫锛屾敼涓哄綋婊¤冻寮傚父鏉′欢鏃讹紝闇�瑕佸疄鏃舵帹閫佹挱鎶ュ紓甯哥殑鐘舵�佸彉鍖栵紝浣嗕笉鎴彇寮傚父
+//                    if (hasException[f] == true) {
+//                        it.addExceptionData(data)
+//                        checkResult(s)
+//                    }
+//                }
+//            }
+//        }
+//        lastData = data
+//    }
+
+
+    override fun newResult(tag:T, factor: FactorFilter.SelectedFactor): RealTimeExceptionResult {
+        val eType = getExceptionType()
+        return RealTimeExceptionResult(tag.startData!!, tag.endData, factor, tag.exceptionData, eType)
     }
 
-    override fun newResult(
-        start: BaseRealTimeData,
-        end: BaseRealTimeData?,
-        factor: FactorFilter.SelectedFactor,
-        exceptionData: List<BaseRealTimeData>,
-    ): RealTimeExceptionResult {
-        val eType = getExceptionType()
-        return RealTimeExceptionResult(start, end, factor, exceptionData, eType)
+    override fun newResult(exceptions: List<Pair<FactorFilter.SelectedFactor, ExceptionTag>>): RealTimeExceptionResult {
+        return RealTimeExceptionResult()
     }
 
     override fun onNewException(tag: T, factor: FactorFilter.SelectedFactor, exceptionStatus: ExceptionStatusType) {

--
Gitblit v1.9.3