|
|
@ -203,7 +203,7 @@ public class TargetServiceImpl implements TargetService { |
|
|
|
double sum = targets.stream().filter(target->target.getDeptId().equals(station.getRefDept())).mapToDouble(HydropowerUnitTargetVo::getPowerYear).sum(); |
|
|
|
double sum = targets.stream().filter(target->target.getDeptId().equals(station.getRefDept())).mapToDouble(HydropowerUnitTargetVo::getPowerYear).sum(); |
|
|
|
item.setElectricGeneration(sum); |
|
|
|
item.setElectricGeneration(sum); |
|
|
|
// 发电量详情
|
|
|
|
// 发电量详情
|
|
|
|
List<String> details = targets.stream().filter(target->target.getDeptId().equals(station.getRefDept())).map(target-> "[" + Optional.ofNullable(target.getDeviceCode()).orElse("填报电量") + " " + target.getPowerYear() +"kWh]").collect(Collectors.toList()); |
|
|
|
List<String> details = targets.stream().filter(target->target.getDeptId().equals(station.getRefDept())).map(target-> "[" + Optional.ofNullable(target.getDeviceName()).orElse("填报电量") + " " + target.getPowerYear() +"kWh]").collect(Collectors.toList()); |
|
|
|
item.setDetail(String.join("|",details)); |
|
|
|
item.setDetail(String.join("|",details)); |
|
|
|
return item; |
|
|
|
return item; |
|
|
|
}).filter(generate->Math.abs(generate.getElectricGeneration()) > 0).collect(Collectors.toList()); |
|
|
|
}).filter(generate->Math.abs(generate.getElectricGeneration()) > 0).collect(Collectors.toList()); |
|
|
@ -225,7 +225,7 @@ public class TargetServiceImpl implements TargetService { |
|
|
|
double sum = targets.stream().filter(target -> target.getDeptId().equals(station.getRefDept())).mapToDouble(PhotovoltaicTargetVo::getGenerationYear).sum(); |
|
|
|
double sum = targets.stream().filter(target -> target.getDeptId().equals(station.getRefDept())).mapToDouble(PhotovoltaicTargetVo::getGenerationYear).sum(); |
|
|
|
item.setElectricGeneration(sum); |
|
|
|
item.setElectricGeneration(sum); |
|
|
|
// 发电量详情
|
|
|
|
// 发电量详情
|
|
|
|
List<String> details = targets.stream().filter(target -> target.getDeptId().equals(station.getRefDept())).map(target -> "[" + Optional.ofNullable(target.getDeviceCode()).orElse("填报电量") + " " + target.getGenerationYear() + "kWh]").collect(Collectors.toList()); |
|
|
|
List<String> details = targets.stream().filter(target -> target.getDeptId().equals(station.getRefDept())).map(target -> "[" + Optional.ofNullable(target.getDeviceName()).orElse("填报电量") + " " + target.getGenerationYear() + "kWh]").collect(Collectors.toList()); |
|
|
|
item.setDetail(String.join("|", details)); |
|
|
|
item.setDetail(String.join("|", details)); |
|
|
|
return item; |
|
|
|
return item; |
|
|
|
}).filter(generate -> Math.abs(generate.getElectricGeneration()) > 0).collect(Collectors.toList()); |
|
|
|
}).filter(generate -> Math.abs(generate.getElectricGeneration()) > 0).collect(Collectors.toList()); |
|
|
|