数据完整性微调
This commit is contained in:
@@ -92,6 +92,21 @@ public class IntegrityServiceImpl implements IntegrityService {
|
|||||||
dealAverageAndChildrenData(subBaseInfo, lineBaseInfo, true);
|
dealAverageAndChildrenData(subBaseInfo, lineBaseInfo, true);
|
||||||
//处理供电公司
|
//处理供电公司
|
||||||
dealAverageAndChildrenData(gdBaseInfo, subBaseInfo, false);
|
dealAverageAndChildrenData(gdBaseInfo, subBaseInfo, false);
|
||||||
|
/**
|
||||||
|
* ----------------------------------
|
||||||
|
* 处理顶层数据
|
||||||
|
* xy
|
||||||
|
*/
|
||||||
|
integrityTemp.setLineData(lineBaseInfo);
|
||||||
|
double averageData = lineBaseInfo.stream().filter(integrityVO1 -> integrityVO1.getIntegrityData() != 3.14159)
|
||||||
|
.mapToDouble(IntegrityVO::getIntegrityData)
|
||||||
|
.average()
|
||||||
|
.orElse(3.14159);
|
||||||
|
integrityTemp.setIntegrityData(averageData);
|
||||||
|
/**
|
||||||
|
* 结束
|
||||||
|
* ----------------------------------
|
||||||
|
*/
|
||||||
if (integrityParam.getStatisticalType().getCode().equalsIgnoreCase(StatisticsEnum.POWER_NETWORK.getCode())) {
|
if (integrityParam.getStatisticalType().getCode().equalsIgnoreCase(StatisticsEnum.POWER_NETWORK.getCode())) {
|
||||||
integrityTemp.setChildren(gdBaseInfo);
|
integrityTemp.setChildren(gdBaseInfo);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user