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))) {