|
|
|
@ -203,7 +203,7 @@ public class TargetServiceImpl implements TargetService {
|
|
|
|
|
double sum = targets.stream().filter(target->target.getDeptId().equals(station.getRefDept())).mapToDouble(HydropowerUnitTargetVo::getPowerYear).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)); |
|
|
|
|
return item; |
|
|
|
|
}).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(); |
|
|
|
|
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)); |
|
|
|
|
return item; |
|
|
|
|
}).filter(generate -> Math.abs(generate.getElectricGeneration()) > 0).collect(Collectors.toList()); |
|
|
|
|