From e2392116cd6f875cdc2f46bc04b04d5305f21b56 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期四, 23 十一月 2023 13:25:04 +0800 Subject: [PATCH] 1. 修改日统计值的排序查询逻辑 --- src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataLowValue.kt | 20 ++++++-------------- 1 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataLowValue.kt b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataLowValue.kt index 353b7fe..acc2917 100644 --- a/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataLowValue.kt +++ b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataLowValue.kt @@ -3,32 +3,24 @@ import com.flightfeather.monitor.domain.ds1.entity.DustExceptionData import com.flightfeather.monitor.domain.ds1.entity.DustExceptionSetting import com.flightfeather.monitor.domain.ds1.entity.DustSiteData +import com.flightfeather.monitor.enumration.dust.DataStatus import com.flightfeather.monitor.enumration.dust.ExceptionType /** * 鏁版嵁瓒呬綆寮傚父鍒嗘瀽 */ -class ExceptionDataLowValue(config: DustExceptionSetting) : BaseExceptionContinuous(config) { +class ExceptionDataLowValue(config: DustExceptionSetting) : BaseExceptionContinuousSingle(config) { override fun getExceptionType(): ExceptionType = ExceptionType.TYPE1 override fun judgeException(p: DustSiteData?, n: DustSiteData): Boolean { - return n.dustValue <= config.dataLow + val b1 = n.flag == DataStatus.OUT_MIN.value + val b2 = n.dustValue <= config.dataLow && n.flag == DataStatus.N.value + val b3 = n.flag == DataStatus.Q.value + return b1 || b2 || b3 } override fun judgeDuration(sIndex: Int, eIndex: Int): Boolean { return true - } - - override fun newResult(p: DustSiteData, n: DustSiteData?): DustExceptionData { - val eType = getExceptionType() - return DustExceptionData().apply { - mnCode = p.mnCode - exception = eType.des - exceptionType = eType.value - region = config.region - beginTime = n?.lst - endTime = n?.lst - } } } \ No newline at end of file -- Gitblit v1.9.3