From 176d7d8283e66ccf63878c9ab823e900df94b748 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 05 八月 2025 17:20:58 +0800 Subject: [PATCH] 2025.8.5 1. 动态溯源模块添加延迟数据周期异常合并功能 --- src/main/kotlin/com/flightfeather/uav/biz/dataanalysis/model/ExceptionTag.kt | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/flightfeather/uav/biz/dataanalysis/model/ExceptionTag.kt b/src/main/kotlin/com/flightfeather/uav/biz/dataanalysis/model/ExceptionTag.kt index 4d7cb93..65507b3 100644 --- a/src/main/kotlin/com/flightfeather/uav/biz/dataanalysis/model/ExceptionTag.kt +++ b/src/main/kotlin/com/flightfeather/uav/biz/dataanalysis/model/ExceptionTag.kt @@ -2,16 +2,20 @@ import com.flightfeather.uav.biz.dataanalysis.BaseExceptionResult import com.flightfeather.uav.domain.entity.BaseRealTimeData +import org.apache.commons.lang3.SerializationUtils +import org.springframework.beans.BeanUtils +import java.io.Serializable /** * 寮傚父鏁版嵁鏍囩 * @date 2025/5/13 * @author feiyu02 */ -open class ExceptionTag { +open class ExceptionTag : Serializable { companion object { const val MAX_HISTORY = 10 } + // 璧峰鏁版嵁涓嬫爣 var sIndex = 0 @@ -53,7 +57,7 @@ } } - fun addExceptionData(data: BaseRealTimeData){ + fun addExceptionData(data: BaseRealTimeData) { exceptionExisted = true exceptionData.add(data) } @@ -69,4 +73,22 @@ exceptionExisted = false exceptionCreated = false } + + fun clone(): ExceptionTag { + val exceptionTag = SerializationUtils.clone(this) +// val exceptionTag = ExceptionTag() +// BeanUtils.copyProperties(this, exceptionTag) +// exceptionTag.apply { +// this.sIndex = this@ExceptionTag.sIndex +// this.startData = this@ExceptionTag.startData +// this.eIndex = this@ExceptionTag.eIndex +// this.endData = this@ExceptionTag.endData +// this.exceptionData = this@ExceptionTag.exceptionData +// this.historyData = this@ExceptionTag.historyData +// this.exceptionExisted = this@ExceptionTag.exceptionExisted +// this.exceptionCreated = this@ExceptionTag.exceptionCreated +// this.exceptionResult = this@ExceptionTag.exceptionResult +// } + return exceptionTag + } } \ No newline at end of file -- Gitblit v1.9.3