From 357c5a3c4659f1fe9e46e8c20827ab757c5d3929 Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期四, 14 十二月 2023 15:27:34 +0800
Subject: [PATCH] 增加数据请求配置表和异常分析配置表的接口

---
 src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionNoFluctuation.kt |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionNoFluctuation.kt b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionNoFluctuation.kt
index c83b49e..1f1daf2 100644
--- a/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionNoFluctuation.kt
+++ b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionNoFluctuation.kt
@@ -2,6 +2,7 @@
 
 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
 
 /**
@@ -13,10 +14,13 @@
 
     override fun judgeException(p: DustSiteData?, n: DustSiteData): Boolean {
         if (p == null) return false
-        return p.dustValue == n.dustValue
+        val b1 = p.dustValue == n.dustValue
+        val b2 = p.flag != DataStatus.A.value && p.flag != DataStatus.D.value
+        val b3 = n.flag != DataStatus.A.value && n.flag != DataStatus.D.value
+        return b1 && b2 && b3
     }
 
     override fun judgeDuration(sIndex: Int, eIndex: Int): Boolean {
-        return (eIndex - sIndex) >= config.longTimeNoChange
+        return (eIndex - 1 - sIndex) >= config.longTimeNoChange
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3