bug修改
This commit is contained in:
@@ -382,13 +382,17 @@
|
|||||||
line.sort,
|
line.sort,
|
||||||
line.pids,
|
line.pids,
|
||||||
CONCAT(voltage.name, '_', line.name) name,
|
CONCAT(voltage.name, '_', line.name) name,
|
||||||
comFlag.Com_Flag
|
comFlag.Com_Flag,
|
||||||
|
detail.pt_type
|
||||||
FROM
|
FROM
|
||||||
pq_line line,
|
pq_line line,
|
||||||
|
pq_line_detail detail,
|
||||||
pq_line voltage,
|
pq_line voltage,
|
||||||
pq_line device,
|
pq_line device,
|
||||||
pq_device comFlag
|
pq_device comFlag
|
||||||
WHERE
|
WHERE
|
||||||
|
line.id = detail.id
|
||||||
|
AND
|
||||||
line.pid = voltage.id
|
line.pid = voltage.id
|
||||||
AND
|
AND
|
||||||
voltage.pid = device.id
|
voltage.pid = device.id
|
||||||
|
|||||||
@@ -88,11 +88,12 @@ public class HarmonicServiceImpl implements IHarmonicService {
|
|||||||
|
|
||||||
List<RStatLimitTargetDPO> finalAllData = allData;
|
List<RStatLimitTargetDPO> finalAllData = allData;
|
||||||
deptList.forEach(dept->{
|
deptList.forEach(dept->{
|
||||||
|
|
||||||
|
if (!CollectionUtils.isEmpty(dept.getSubIndexes())){
|
||||||
List<PollutionVO> childrenList = new ArrayList<>();
|
List<PollutionVO> childrenList = new ArrayList<>();
|
||||||
PollutionVO pollutionVO = new PollutionVO();
|
PollutionVO pollutionVO = new PollutionVO();
|
||||||
pollutionVO.setId(dept.getIndex());
|
pollutionVO.setId(dept.getIndex());
|
||||||
pollutionVO.setName(dept.getName());
|
pollutionVO.setName(dept.getName());
|
||||||
if (!CollectionUtils.isEmpty(dept.getSubIndexes())){
|
|
||||||
dept.getSubIndexes().forEach(sub->{
|
dept.getSubIndexes().forEach(sub->{
|
||||||
List<PollutionLineDTO> l1 = map.get(sub);
|
List<PollutionLineDTO> l1 = map.get(sub);
|
||||||
PollutionVO children = new PollutionVO();
|
PollutionVO children = new PollutionVO();
|
||||||
@@ -108,7 +109,7 @@ public class HarmonicServiceImpl implements IHarmonicService {
|
|||||||
children.setData(handleDataNew(collect,sumList,harmonicPublicParam.getStatisticalType().getCode()).getRatio());
|
children.setData(handleDataNew(collect,sumList,harmonicPublicParam.getStatisticalType().getCode()).getRatio());
|
||||||
childrenList.add(children);
|
childrenList.add(children);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
if (!CollectionUtils.isEmpty(childrenList)){
|
if (!CollectionUtils.isEmpty(childrenList)){
|
||||||
pollutionVO.setChildren(childrenList.stream().sorted(Comparator.comparing(PollutionVO::getData).reversed().thenComparing(PollutionVO::getName)).collect(Collectors.toList()));
|
pollutionVO.setChildren(childrenList.stream().sorted(Comparator.comparing(PollutionVO::getData).reversed().thenComparing(PollutionVO::getName)).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
@@ -117,6 +118,8 @@ public class HarmonicServiceImpl implements IHarmonicService {
|
|||||||
pollutionVO.setData(NumberUtil.round(childrenList.stream().mapToDouble(PollutionVO::getData).average().orElse(3.14159),2).doubleValue());
|
pollutionVO.setData(NumberUtil.round(childrenList.stream().mapToDouble(PollutionVO::getData).average().orElse(3.14159),2).doubleValue());
|
||||||
}
|
}
|
||||||
list.add(pollutionVO);
|
list.add(pollutionVO);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
if (!CollectionUtils.isEmpty(list)){
|
if (!CollectionUtils.isEmpty(list)){
|
||||||
return list.stream().sorted(Comparator.comparing(PollutionVO::getData).reversed().thenComparing(PollutionVO::getName)).collect(Collectors.toList());
|
return list.stream().sorted(Comparator.comparing(PollutionVO::getData).reversed().thenComparing(PollutionVO::getName)).collect(Collectors.toList());
|
||||||
@@ -145,10 +148,9 @@ public class HarmonicServiceImpl implements IHarmonicService {
|
|||||||
List<RStatLimitTargetDPO> finalAllData = allData;
|
List<RStatLimitTargetDPO> finalAllData = allData;
|
||||||
deptList.forEach(item->{
|
deptList.forEach(item->{
|
||||||
List<String> lineList = item.getLineIndexes();
|
List<String> lineList = item.getLineIndexes();
|
||||||
HarmonicDeptVO harmonicDeptVO = new HarmonicDeptVO();
|
|
||||||
if (!CollectionUtils.isEmpty(lineList)){
|
if (!CollectionUtils.isEmpty(lineList)){
|
||||||
|
|
||||||
|
HarmonicDeptVO harmonicDeptVO = new HarmonicDeptVO();
|
||||||
List<RStatLimitTargetDPO> collect = limitTargetNew.stream().filter(x -> lineList.contains(x.getLineId())).collect(Collectors.toList());
|
List<RStatLimitTargetDPO> collect = limitTargetNew.stream().filter(x -> lineList.contains(x.getLineId())).collect(Collectors.toList());
|
||||||
|
|
||||||
List<RStatLimitTargetDPO> sumList = finalAllData.stream().filter(x -> lineList.contains(x.getLineId())).collect(Collectors.toList());
|
List<RStatLimitTargetDPO> sumList = finalAllData.stream().filter(x -> lineList.contains(x.getLineId())).collect(Collectors.toList());
|
||||||
@@ -156,10 +158,11 @@ public class HarmonicServiceImpl implements IHarmonicService {
|
|||||||
AreaDTO areaDTO = handleDataNew(collect, sumList, param.getStatisticalType().getCode());
|
AreaDTO areaDTO = handleDataNew(collect, sumList, param.getStatisticalType().getCode());
|
||||||
|
|
||||||
BeanUtil.copyProperties(areaDTO,harmonicDeptVO);
|
BeanUtil.copyProperties(areaDTO,harmonicDeptVO);
|
||||||
}
|
|
||||||
harmonicDeptVO.setId(item.getIndex());
|
harmonicDeptVO.setId(item.getIndex());
|
||||||
harmonicDeptVO.setName(item.getName());
|
harmonicDeptVO.setName(item.getName());
|
||||||
list.add(harmonicDeptVO);
|
list.add(harmonicDeptVO);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
if (!CollectionUtils.isEmpty(list)){
|
if (!CollectionUtils.isEmpty(list)){
|
||||||
return list.stream().sorted(Comparator.comparing(HarmonicDeptVO::getRatio).reversed().thenComparing(HarmonicDeptVO::getOnlineCount).thenComparing(HarmonicDeptVO::getOverLineCount)).collect(Collectors.toList());
|
return list.stream().sorted(Comparator.comparing(HarmonicDeptVO::getRatio).reversed().thenComparing(HarmonicDeptVO::getOnlineCount).thenComparing(HarmonicDeptVO::getOverLineCount)).collect(Collectors.toList());
|
||||||
@@ -586,7 +589,7 @@ public class HarmonicServiceImpl implements IHarmonicService {
|
|||||||
sum = targetDMapper.getSumV(lineList, startTime, endTime);
|
sum = targetDMapper.getSumV(lineList, startTime, endTime);
|
||||||
|
|
||||||
} else if (Objects.equals(type, DicDataEnum.XBDL_ENUM.getCode())){
|
} else if (Objects.equals(type, DicDataEnum.XBDL_ENUM.getCode())){
|
||||||
sum = targetDMapper.getSumV(lineList, startTime, endTime);
|
sum = targetDMapper.getSumI(lineList, startTime, endTime);
|
||||||
|
|
||||||
}
|
}
|
||||||
if(CollUtil.isNotEmpty(sum)){
|
if(CollUtil.isNotEmpty(sum)){
|
||||||
|
|||||||
@@ -232,10 +232,14 @@ public class PollutionSubstationServiceImpl extends ServiceImpl<RStatPollutionSu
|
|||||||
harmonicPublicParam.setServerName(generalInfo.getMicroServiceName());
|
harmonicPublicParam.setServerName(generalInfo.getMicroServiceName());
|
||||||
List<GeneralDeviceDTO> sub = generalDeviceInfoClient.getPracticalRunDeviceInfo(harmonicPublicParam).getData();
|
List<GeneralDeviceDTO> sub = generalDeviceInfoClient.getPracticalRunDeviceInfo(harmonicPublicParam).getData();
|
||||||
for (GeneralDeviceDTO temp : sub) {
|
for (GeneralDeviceDTO temp : sub) {
|
||||||
|
List<String> subIndexes = temp.getSubIndexes();
|
||||||
|
if(CollectionUtil.isEmpty(subIndexes)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
PollutionVO pollutionVO = new PollutionVO();
|
PollutionVO pollutionVO = new PollutionVO();
|
||||||
String detpid = temp.getIndex();
|
String detpid = temp.getIndex();
|
||||||
String name = temp.getName();
|
String name = temp.getName();
|
||||||
List<String> subIndexes = temp.getSubIndexes();
|
|
||||||
pollutionVO.setId(detpid);
|
pollutionVO.setId(detpid);
|
||||||
pollutionVO.setName(name);
|
pollutionVO.setName(name);
|
||||||
pollutionVO.setData(-1.0);
|
pollutionVO.setData(-1.0);
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
|||||||
if (deptVo.getType() == 0) {
|
if (deptVo.getType() == 0) {
|
||||||
deptVo.setName(deptVo.getAreaName());
|
deptVo.setName(deptVo.getAreaName());
|
||||||
}
|
}
|
||||||
}).collect(Collectors.toList());
|
}).sorted(Comparator.comparing(DeptTreeVO::getSort)).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user