1.实体类调整
This commit is contained in:
@@ -112,7 +112,7 @@ public class NormalLimitServiceImpl extends ServiceImpl<AbnormalMapper, MpSurplu
|
||||
LambdaQueryWrapper<RStatDataVDPO> lambdaQueryDataV = new LambdaQueryWrapper<>();
|
||||
lambdaQueryDataV.eq(RStatDataVDPO::getLineId, lineIndex).eq(RStatDataVDPO::getTime, lineParam.getDataDate() + InfluxDBPublicParam.START_TIME);
|
||||
List<RStatDataVDPO> rStatDataVDPOList = rStatDataVDMapper.selectList(lambdaQueryDataV);
|
||||
Map<String, List<RStatDataVDPO>> dataVMap = rStatDataVDPOList.stream().collect(Collectors.groupingBy(RStatDataVDPO::getPhasicType));
|
||||
Map<String, List<RStatDataVDPO>> dataVMap = rStatDataVDPOList.stream().collect(Collectors.groupingBy(RStatDataVDPO::getPhaseType));
|
||||
|
||||
//电流
|
||||
LambdaQueryWrapper<RStatDataIDPO> lambdaQueryDataI = new LambdaQueryWrapper<>();
|
||||
|
||||
@@ -654,7 +654,7 @@ public class PollutionServiceImpl implements PollutionService {
|
||||
private Map<String, Optional<PublicDTO>> getThreePhaseData(List<Overlimit> overLimitList,String beginTime,String endTime){
|
||||
List<RStatDataVDPO> threePhaseList = dataVDService.list(new LambdaQueryWrapper<RStatDataVDPO>()
|
||||
.eq(RStatDataVDPO::getValueType, "CP95")
|
||||
.in(RStatDataVDPO::getPhasicType, Arrays.asList("A", "B", "C"))
|
||||
.in(RStatDataVDPO::getPhaseType, Arrays.asList("A", "B", "C"))
|
||||
.ge(RStatDataVDPO::getTime, beginTime)
|
||||
.le(RStatDataVDPO::getTime, endTime)
|
||||
);
|
||||
|
||||
@@ -56,16 +56,16 @@ public class StationBusBarReportServiceImpl extends MppServiceImpl<StationBusBar
|
||||
rStatBusbarHarmonicYPO.setDataDate(LocalDate.parse(begin));
|
||||
|
||||
LambdaQueryWrapper<RStatDataVDPO> vdQuery = new LambdaQueryWrapper<>();
|
||||
vdQuery.select(RStatDataVDPO::getLineId, RStatDataVDPO::getPhasicType, RStatDataVDPO::getVThd, RStatDataVDPO::getRms, RStatDataVDPO::getValueType, RStatDataVDPO::getVUnbalance)
|
||||
vdQuery.select(RStatDataVDPO::getLineId, RStatDataVDPO::getPhaseType, RStatDataVDPO::getVThd, RStatDataVDPO::getRms, RStatDataVDPO::getValueType, RStatDataVDPO::getVUnbalance)
|
||||
.in(RStatDataVDPO::getLineId, busBarAndHisMonitorDTO.getMonitorIds()).between(RStatDataVDPO::getTime, begin, calculatedParam.getDataDate());
|
||||
List<RStatDataVDPO> rStatDataVDPOList = irStatDataVDService.list(vdQuery);
|
||||
|
||||
Map<String, List<RStatDataVDPO>> vMap = rStatDataVDPOList.stream().collect(Collectors.groupingBy(RStatDataVDPO::getValueType));
|
||||
if (vMap.containsKey("MAX")) {
|
||||
List<RStatDataVDPO> maxList = vMap.get("MAX");
|
||||
Double rms = maxList.stream().filter(item -> !item.getPhasicType().equals("A")).map(RStatDataVDPO::getRms).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double thd = maxList.stream().filter(item -> item.getPhasicType().equals("A")).map(RStatDataVDPO::getVThd).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double un = maxList.stream().filter(item -> item.getPhasicType().equals("A")).map(RStatDataVDPO::getVUnbalance).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double rms = maxList.stream().filter(item -> !item.getPhaseType().equals("A")).map(RStatDataVDPO::getRms).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double thd = maxList.stream().filter(item -> item.getPhaseType().equals("A")).map(RStatDataVDPO::getVThd).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double un = maxList.stream().filter(item -> item.getPhaseType().equals("A")).map(RStatDataVDPO::getVUnbalance).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
rStatBusbarHarmonicYPO.setVEffectiveMax(rms);
|
||||
rStatBusbarHarmonicYPO.setVThdMax(thd);
|
||||
rStatBusbarHarmonicYPO.setUnbalanceMax(un);
|
||||
@@ -77,9 +77,9 @@ public class StationBusBarReportServiceImpl extends MppServiceImpl<StationBusBar
|
||||
|
||||
if (vMap.containsKey("MIN")) {
|
||||
List<RStatDataVDPO> maxList = vMap.get("MIN");
|
||||
Double rms = maxList.stream().filter(item -> !item.getPhasicType().equals("A")).map(RStatDataVDPO::getRms).min(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double thd = maxList.stream().filter(item -> item.getPhasicType().equals("A")).map(RStatDataVDPO::getVThd).min(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double un = maxList.stream().filter(item -> item.getPhasicType().equals("A")).map(RStatDataVDPO::getVUnbalance).min(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double rms = maxList.stream().filter(item -> !item.getPhaseType().equals("A")).map(RStatDataVDPO::getRms).min(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double thd = maxList.stream().filter(item -> item.getPhaseType().equals("A")).map(RStatDataVDPO::getVThd).min(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double un = maxList.stream().filter(item -> item.getPhaseType().equals("A")).map(RStatDataVDPO::getVUnbalance).min(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
rStatBusbarHarmonicYPO.setVEffectiveMin(rms);
|
||||
rStatBusbarHarmonicYPO.setVThdMin(thd);
|
||||
rStatBusbarHarmonicYPO.setUnbalanceMin(un);
|
||||
@@ -91,9 +91,9 @@ public class StationBusBarReportServiceImpl extends MppServiceImpl<StationBusBar
|
||||
|
||||
if (vMap.containsKey("AVG")) {
|
||||
List<RStatDataVDPO> maxList = vMap.get("AVG");
|
||||
Double rms = maxList.stream().filter(item -> !item.getPhasicType().equals("A")).mapToDouble(RStatDataVDPO::getRms).average().orElse(3.14159);
|
||||
Double thd = maxList.stream().filter(item -> item.getPhasicType().equals("A")).mapToDouble(RStatDataVDPO::getVThd).average().orElse(3.14159);
|
||||
Double un = maxList.stream().filter(item -> item.getPhasicType().equals("A")).mapToDouble(RStatDataVDPO::getVUnbalance).average().orElse(3.14159);
|
||||
Double rms = maxList.stream().filter(item -> !item.getPhaseType().equals("A")).mapToDouble(RStatDataVDPO::getRms).average().orElse(3.14159);
|
||||
Double thd = maxList.stream().filter(item -> item.getPhaseType().equals("A")).mapToDouble(RStatDataVDPO::getVThd).average().orElse(3.14159);
|
||||
Double un = maxList.stream().filter(item -> item.getPhaseType().equals("A")).mapToDouble(RStatDataVDPO::getVUnbalance).average().orElse(3.14159);
|
||||
rStatBusbarHarmonicYPO.setVEffectiveAvg(rms);
|
||||
rStatBusbarHarmonicYPO.setVThdAvg(thd);
|
||||
rStatBusbarHarmonicYPO.setUnbalanceAvg(un);
|
||||
@@ -105,9 +105,9 @@ public class StationBusBarReportServiceImpl extends MppServiceImpl<StationBusBar
|
||||
|
||||
if (vMap.containsKey("CP95")) {
|
||||
List<RStatDataVDPO> cp95List = vMap.get("CP95");
|
||||
Double rms = cp95List.stream().filter(item -> !item.getPhasicType().equals("A")).map(RStatDataVDPO::getRms).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double thd = cp95List.stream().filter(item -> item.getPhasicType().equals("A")).map(RStatDataVDPO::getVThd).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double un = cp95List.stream().filter(item -> item.getPhasicType().equals("A")).map(RStatDataVDPO::getVUnbalance).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double rms = cp95List.stream().filter(item -> !item.getPhaseType().equals("A")).map(RStatDataVDPO::getRms).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double thd = cp95List.stream().filter(item -> item.getPhaseType().equals("A")).map(RStatDataVDPO::getVThd).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
Double un = cp95List.stream().filter(item -> item.getPhaseType().equals("A")).map(RStatDataVDPO::getVUnbalance).max(Comparator.comparing(Function.identity())).orElse(3.14159);
|
||||
rStatBusbarHarmonicYPO.setVEffective95(rms);
|
||||
rStatBusbarHarmonicYPO.setVThd95(thd);
|
||||
rStatBusbarHarmonicYPO.setUnbalance95(un);
|
||||
|
||||
@@ -105,7 +105,7 @@ public class RMpInfluenceMServiceImpl extends MppServiceImpl<RMpInfluenceMMapper
|
||||
//获取data_v数据
|
||||
List<RStatDataVDPO> dataVDPOList = dataVDService.list(new LambdaQueryWrapper<RStatDataVDPO>()
|
||||
.in(RStatDataVDPO::getLineId, line)
|
||||
.eq(RStatDataVDPO::getPhasicType, "T")
|
||||
.eq(RStatDataVDPO::getPhaseType, "T")
|
||||
.eq(RStatDataVDPO::getValueType, "CP95")
|
||||
.ge(StrUtil.isNotBlank(jobParam.getBeginTime()), RStatDataVDPO::getTime, DateUtil.beginOfDay(DateUtil.parse(jobParam.getBeginTime())))
|
||||
.le(StrUtil.isNotBlank(jobParam.getEndTime()), RStatDataVDPO::getTime, DateUtil.endOfDay(DateUtil.parse(jobParam.getEndTime())))
|
||||
|
||||
@@ -81,7 +81,7 @@ public class RDimBusUpDServiceImpl extends MppServiceImpl<RDimBusUpDMapper, RDim
|
||||
List<GeneratrixWire> generatrixWireList = generatrixWireMapper.selectList(new LambdaQueryWrapper<GeneratrixWire>().in(GeneratrixWire::getId,lineIds));
|
||||
Map<String,GeneratrixWire> generatrixWireMap = generatrixWireList.stream().collect(Collectors.toMap(GeneratrixWire::getId,Function.identity()));
|
||||
|
||||
List<RStatDataVDPO> rStatDataVDPOList = rStatDataVDMapper.selectList(new LambdaQueryWrapper<RStatDataVDPO>().in(RStatDataVDPO::getLineId,allMonitorIds).eq(RStatDataVDPO::getTime,localDate).eq(RStatDataVDPO::getValueType,"AVG").in(RStatDataVDPO::getPhasicType, Stream.of("A","B","C").collect(Collectors.toList())));
|
||||
List<RStatDataVDPO> rStatDataVDPOList = rStatDataVDMapper.selectList(new LambdaQueryWrapper<RStatDataVDPO>().in(RStatDataVDPO::getLineId,allMonitorIds).eq(RStatDataVDPO::getTime,localDate).eq(RStatDataVDPO::getValueType,"AVG").in(RStatDataVDPO::getPhaseType, Stream.of("A","B","C").collect(Collectors.toList())));
|
||||
Map<String,List<RStatDataVDPO>> vMap = rStatDataVDPOList.stream().collect(Collectors.groupingBy(RStatDataVDPO::getLineId));
|
||||
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@ public class RDimBusUpMServiceImpl extends MppServiceImpl<RDimBusUpMMapper, RDim
|
||||
.in(RStatDataVDPO::getLineId,allMonitorIds)
|
||||
.between(RStatDataVDPO::getTime,start,end)
|
||||
.eq(RStatDataVDPO::getValueType,"AVG")
|
||||
.in(RStatDataVDPO::getPhasicType, Stream.of("A","B","C").collect(Collectors.toList()))
|
||||
.groupBy(RStatDataVDPO::getLineId,RStatDataVDPO::getPhasicType));
|
||||
.in(RStatDataVDPO::getPhaseType, Stream.of("A","B","C").collect(Collectors.toList()))
|
||||
.groupBy(RStatDataVDPO::getLineId,RStatDataVDPO::getPhaseType));
|
||||
Map<String,List<RStatDataVDPO>> vMap = rStatDataVDPOList.stream().collect(Collectors.groupingBy(RStatDataVDPO::getLineId));
|
||||
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
|
||||
@@ -93,8 +93,8 @@ public class RDimBusUpYServiceImpl extends MppServiceImpl<RDimBusUpYMapper, RDim
|
||||
.in(RStatDataVDPO::getLineId,allMonitorIds)
|
||||
.between(RStatDataVDPO::getTime,start,end)
|
||||
.eq(RStatDataVDPO::getValueType,"AVG")
|
||||
.in(RStatDataVDPO::getPhasicType, Stream.of("A","B","C").collect(Collectors.toList()))
|
||||
.groupBy(RStatDataVDPO::getLineId,RStatDataVDPO::getPhasicType));
|
||||
.in(RStatDataVDPO::getPhaseType, Stream.of("A","B","C").collect(Collectors.toList()))
|
||||
.groupBy(RStatDataVDPO::getLineId,RStatDataVDPO::getPhaseType));
|
||||
Map<String,List<RStatDataVDPO>> vMap = rStatDataVDPOList.stream().collect(Collectors.groupingBy(RStatDataVDPO::getLineId));
|
||||
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
|
||||
Reference in New Issue
Block a user