微调
This commit is contained in:
@@ -298,19 +298,22 @@ public class GridServiceImpl implements IGridService {
|
||||
if (CollUtil.isNotEmpty(limitRateList)) {
|
||||
List<RStatLimitRateDPO> l1 = limitRateList.stream().filter(it -> ll.contains(it.getLineId())).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(l1)) {
|
||||
this.getDataByTarget(param.getHarmonicType(), l1, children);
|
||||
this.getDataByTarget(param.getHarmonicType(), l1, children, ll.size());
|
||||
}
|
||||
}
|
||||
childrenList.add(children);
|
||||
}
|
||||
});
|
||||
result.setChildrenList(childrenList);
|
||||
int overCount = 0;
|
||||
if (CollUtil.isNotEmpty(childrenList)) {
|
||||
int sum = childrenList.stream().mapToInt(EvaluationVo.Children::getSize).sum();
|
||||
if (lineList.size()!=0) {
|
||||
result.setLineRatio(NumberUtil.round(sum * 100.0 /lineList.size(),2).doubleValue());
|
||||
for (EvaluationVo.Children children : childrenList) {
|
||||
overCount = overCount + children.getSize();
|
||||
}
|
||||
}
|
||||
if (!lineList.isEmpty()) {
|
||||
result.setLineRatio(NumberUtil.round(overCount * 100.0/lineList.size(),2).doubleValue());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -811,7 +814,7 @@ public class GridServiceImpl implements IGridService {
|
||||
/**
|
||||
* 根据指标类型计算数据
|
||||
*/
|
||||
public void getDataByTarget(Integer type, List<RStatLimitRateDPO> limitRateList, EvaluationVo.Children children) {
|
||||
public void getDataByTarget(Integer type, List<RStatLimitRateDPO> limitRateList, EvaluationVo.Children children,int monitorTotal) {
|
||||
switch (type) {
|
||||
//全指标
|
||||
case 0:
|
||||
@@ -819,7 +822,7 @@ public class GridServiceImpl implements IGridService {
|
||||
.filter(data -> data.getFreqDevOvertime() + data.getVoltageDevOvertime() + data.getFlickerOvertime() + data.getUaberranceOvertime() + data.getUbalanceOvertime() > 0)
|
||||
.collect(Collectors.toList());
|
||||
children.setSize(filteredList0.size());
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList0.size() * 100.0 / limitRateList.size()));
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList0.size() * 100.0 / monitorTotal));
|
||||
break;
|
||||
//电压偏差
|
||||
case 1:
|
||||
@@ -827,7 +830,7 @@ public class GridServiceImpl implements IGridService {
|
||||
.filter(data -> data.getVoltageDevOvertime() > 0)
|
||||
.collect(Collectors.toList());
|
||||
children.setSize(filteredList1.size());
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList1.size() * 100.0 / limitRateList.size()));
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList1.size() * 100.0 / monitorTotal));
|
||||
break;
|
||||
//频率偏差
|
||||
case 2:
|
||||
@@ -835,7 +838,7 @@ public class GridServiceImpl implements IGridService {
|
||||
.filter(data -> data.getFreqDevOvertime() > 0)
|
||||
.collect(Collectors.toList());
|
||||
children.setSize(filteredList2.size());
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList2.size() * 100.0 / limitRateList.size()));
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList2.size() * 100.0 / monitorTotal));
|
||||
break;
|
||||
//电压总谐波畸变率
|
||||
case 3:
|
||||
@@ -843,7 +846,7 @@ public class GridServiceImpl implements IGridService {
|
||||
.filter(data -> data.getUaberranceOvertime() > 0)
|
||||
.collect(Collectors.toList());
|
||||
children.setSize(filteredList3.size());
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList3.size() * 100.0 / limitRateList.size()));
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList3.size() * 100.0 / monitorTotal));
|
||||
break;
|
||||
//电压闪变
|
||||
case 4:
|
||||
@@ -851,7 +854,7 @@ public class GridServiceImpl implements IGridService {
|
||||
.filter(data -> data.getFlickerOvertime() > 0)
|
||||
.collect(Collectors.toList());
|
||||
children.setSize(filteredList4.size());
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList4.size() * 100.0 / limitRateList.size()));
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList4.size() * 100.0 / monitorTotal));
|
||||
break;
|
||||
//三相电压不平衡度
|
||||
case 5:
|
||||
@@ -859,7 +862,7 @@ public class GridServiceImpl implements IGridService {
|
||||
.filter(data -> data.getUbalanceOvertime() > 0)
|
||||
.collect(Collectors.toList());
|
||||
children.setSize(filteredList5.size());
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList5.size() * 100.0 / limitRateList.size()));
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList5.size() * 100.0 / monitorTotal));
|
||||
break;
|
||||
// 谐波电压
|
||||
// 谐波电压含有率 + 谐波电压有效值
|
||||
@@ -868,7 +871,7 @@ public class GridServiceImpl implements IGridService {
|
||||
.filter(x -> getLimitRateStats(x, 2, 26, "uharm", "Overtime") || x.getUaberranceOvertime() > 0)
|
||||
.collect(Collectors.toList());
|
||||
children.setSize(filteredList6.size());
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList6.size() * 100.0 / limitRateList.size()));
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList6.size() * 100.0 / monitorTotal));
|
||||
break;
|
||||
//谐波电流
|
||||
case 7:
|
||||
@@ -876,7 +879,7 @@ public class GridServiceImpl implements IGridService {
|
||||
.filter(x -> getLimitRateStats(x, 2, 26, "iharm", "Overtime"))
|
||||
.collect(Collectors.toList());
|
||||
children.setSize(filteredList7.size());
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList7.size() * 100.0 / limitRateList.size()));
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList7.size() * 100.0 / monitorTotal));
|
||||
break;
|
||||
//间谐波电压
|
||||
case 8:
|
||||
@@ -884,7 +887,7 @@ public class GridServiceImpl implements IGridService {
|
||||
.filter(x -> getLimitRateStats(x, 1, 16, "inuharm", "Overtime"))
|
||||
.collect(Collectors.toList());
|
||||
children.setSize(filteredList8.size());
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList8.size() * 100.0 / limitRateList.size()));
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList8.size() * 100.0 / monitorTotal));
|
||||
break;
|
||||
//负序电流
|
||||
case 9:
|
||||
@@ -892,7 +895,7 @@ public class GridServiceImpl implements IGridService {
|
||||
.filter(data -> data.getINegOvertime() > 0)
|
||||
.collect(Collectors.toList());
|
||||
children.setSize(filteredList9.size());
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList9.size() * 100.0 / limitRateList.size()));
|
||||
children.setRatio(PubUtils.doubleRound(2, filteredList9.size() * 100.0 / monitorTotal));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user