|
|
|
@ -870,7 +870,12 @@ public class TargetServiceImpl implements TargetService {
|
|
|
|
|
if(CollectionUtil.isEmpty(reals)){ |
|
|
|
|
hydropower.setPower(0.0); |
|
|
|
|
}else{ |
|
|
|
|
hydropower.setPower(reals.stream().filter(real->real.getDeptId().equals(station.getRefDept())).mapToDouble(HydropowerUnitRealVo::getActivePower).sum()); |
|
|
|
|
hydropower.setPower(reals.stream().filter(real->real.getDeptId().equals(station.getRefDept())).mapToDouble(real->{ |
|
|
|
|
if("MW".equalsIgnoreCase(real.getPowerUnit())){ |
|
|
|
|
return real.getActivePower() * 1000; |
|
|
|
|
} |
|
|
|
|
return real.getActivePower(); |
|
|
|
|
}).sum()); |
|
|
|
|
} |
|
|
|
|
return hydropower; |
|
|
|
|
})/*.filter(hydropower -> Math.abs(hydropower.getPower()) > 0)*/.sorted(Comparator.comparing(HydropowerTargetVo::getPower).reversed()).collect(Collectors.toList()); |
|
|
|
|