|
|
@ -363,6 +363,7 @@ public class ObtainGenerationServiceImpl implements ObtainGenerationService { |
|
|
|
if(CollectionUtil.isEmpty(records)){ |
|
|
|
if(CollectionUtil.isEmpty(records)){ |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
List<AnalyseDataTaosVO> reactives = dataService.periodTargetData(start,end,5,5,device.getEmCode(),HomePageConstant.HYDROPOWER_REACTIVE_GENERATE); |
|
|
|
// 保存设备发电量
|
|
|
|
// 保存设备发电量
|
|
|
|
threeGenerateService.saveBatch(records.stream().map(record -> { |
|
|
|
threeGenerateService.saveBatch(records.stream().map(record -> { |
|
|
|
ThreeGenerationEntity generate = new ThreeGenerationEntity(); |
|
|
|
ThreeGenerationEntity generate = new ThreeGenerationEntity(); |
|
|
@ -387,6 +388,11 @@ public class ObtainGenerationServiceImpl implements ObtainGenerationService { |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
generate.setGenerate(BigDecimal.valueOf(Double.parseDouble(record.getVal()) * device.getRideCount())); |
|
|
|
generate.setGenerate(BigDecimal.valueOf(Double.parseDouble(record.getVal()) * device.getRideCount())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 无功电量
|
|
|
|
|
|
|
|
if(CollectionUtil.isEmpty(reactives)){ |
|
|
|
|
|
|
|
generate.setReactiveGenerate(BigDecimal.ZERO); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return generate; |
|
|
|
return generate; |
|
|
|
}).collect(Collectors.toList())); |
|
|
|
}).collect(Collectors.toList())); |
|
|
|
}); |
|
|
|
}); |
|
|
|