From 35939e6f8f9e15a4bd83e0fe09e384b6eb001631 Mon Sep 17 00:00:00 2001 From: xy <748613696@qq.com> Date: Tue, 3 Feb 2026 16:45:05 +0800 Subject: [PATCH] =?UTF-8?q?=E9=95=BF=E6=97=B6=E9=97=AA=E5=8F=98=E8=B6=8A?= =?UTF-8?q?=E9=99=90=E5=85=BC=E5=AE=B9=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../line/IDataLimitRateAsyncImpl.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/serviceimpl/line/IDataLimitRateAsyncImpl.java b/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/serviceimpl/line/IDataLimitRateAsyncImpl.java index 4b023c7..18be446 100644 --- a/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/serviceimpl/line/IDataLimitRateAsyncImpl.java +++ b/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/serviceimpl/line/IDataLimitRateAsyncImpl.java @@ -186,12 +186,19 @@ public class IDataLimitRateAsyncImpl implements IDataLimitRateAsync { .collect(Collectors.groupingBy(DataVDto::getLineId)); /** - * 功能描述:获取influxDB -> data_plt -> 长时间闪变 + * 功能描述:获取influxDB -> data_plt -> 长时间闪变 -> 注(取最大值原始算法去掉了,现没有根据最大值比较) */ - Map> dataPlt = dataPltAllTime.stream() - .filter(x -> phase.contains(x.getPhasicType())) - .filter(x -> InfluxDBTableConstant.MAX.equalsIgnoreCase(x.getValueType())) - .collect(Collectors.groupingBy(DataPltDto::getLineId)); + Map> dataPlt; + if (type == 2) { + dataPlt = dataPltAllTime.stream() + .filter(x -> phase.contains(x.getPhasicType())) + .filter(x -> InfluxDBTableConstant.MAX.equalsIgnoreCase(x.getValueType())) + .collect(Collectors.groupingBy(DataPltDto::getLineId)); + } else { + dataPlt = dataPltAllTime.stream() + .filter(x -> PhaseType.PHASE_A.equals(x.getPhasicType())) + .collect(Collectors.groupingBy(DataPltDto::getLineId)); + } for (String item : list) { if (ObjectUtil.isNotNull(overLimitMap.get(item))) {