|
|
@ -590,7 +590,7 @@ public class HydropowerServiceImpl implements HydropowerService { |
|
|
|
// 总有功功率(总发电负荷)
|
|
|
|
// 总有功功率(总发电负荷)
|
|
|
|
response.setPowerSum(this.getPowerSum(realList,station.getRefDept())); |
|
|
|
response.setPowerSum(this.getPowerSum(realList,station.getRefDept())); |
|
|
|
// 总有功单位
|
|
|
|
// 总有功单位
|
|
|
|
response.setPowerUnit(this.getPowerUnit(realList,station.getRefDept())); |
|
|
|
response.setPowerUnit("kW"); |
|
|
|
// 月计划发电量
|
|
|
|
// 月计划发电量
|
|
|
|
response.setPlanPowerMon(this.getPlanPowerrMon(station.getCode())); |
|
|
|
response.setPlanPowerMon(this.getPlanPowerrMon(station.getCode())); |
|
|
|
// 年计划发电量
|
|
|
|
// 年计划发电量
|
|
|
@ -1553,14 +1553,6 @@ public class HydropowerServiceImpl implements HydropowerService { |
|
|
|
hydropower.setMinTemp(this.intervalTemp(weekWeather,station.getCode(),false)); |
|
|
|
hydropower.setMinTemp(this.intervalTemp(weekWeather,station.getCode(),false)); |
|
|
|
// 装机容量
|
|
|
|
// 装机容量
|
|
|
|
hydropower.setCapacity(reals.stream().filter(real-> real.getDeptId().equals(station.getRefDept())).mapToDouble(HydropowerUnitRealVo::getInstalledCapacity).sum()); |
|
|
|
hydropower.setCapacity(reals.stream().filter(real-> real.getDeptId().equals(station.getRefDept())).mapToDouble(HydropowerUnitRealVo::getInstalledCapacity).sum()); |
|
|
|
// 负荷
|
|
|
|
|
|
|
|
hydropower.setLoad(reals.stream().filter(real-> real.getDeptId().equals(station.getRefDept())).mapToDouble(HydropowerUnitRealVo::getActivePower).sum()); |
|
|
|
|
|
|
|
// 出力
|
|
|
|
|
|
|
|
if(Math.abs(hydropower.getCapacity()) > 0){ |
|
|
|
|
|
|
|
hydropower.setOutput(BigDecimal.valueOf(hydropower.getLoad() / hydropower.getCapacity() * 100).setScale(2, RoundingMode.HALF_UP).doubleValue()); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
hydropower.setOutput(0.0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 运行天数
|
|
|
|
// 运行天数
|
|
|
|
hydropower.setRunDay(this.getRunDay(station)); |
|
|
|
hydropower.setRunDay(this.getRunDay(station)); |
|
|
|
// 告警
|
|
|
|
// 告警
|
|
|
@ -1571,8 +1563,9 @@ public class HydropowerServiceImpl implements HydropowerService { |
|
|
|
// 站点设备
|
|
|
|
// 站点设备
|
|
|
|
List<HydropowerUnitRealVo> devices = reals.stream().filter(real-> real.getDeptId().equals(station.getRefDept())).collect(Collectors.toList()); |
|
|
|
List<HydropowerUnitRealVo> devices = reals.stream().filter(real-> real.getDeptId().equals(station.getRefDept())).collect(Collectors.toList()); |
|
|
|
if(CollectionUtil.isNotEmpty(devices)){ |
|
|
|
if(CollectionUtil.isNotEmpty(devices)){ |
|
|
|
// 设备
|
|
|
|
List<AppHydropowerDeviceVo> hydropowerDevices = new ArrayList<>(); |
|
|
|
hydropower.setDevices(devices.stream().map(real->{ |
|
|
|
Double loadSum = 0.0; |
|
|
|
|
|
|
|
for(HydropowerUnitRealVo real : devices){ |
|
|
|
AppHydropowerDeviceVo device = new AppHydropowerDeviceVo(); |
|
|
|
AppHydropowerDeviceVo device = new AppHydropowerDeviceVo(); |
|
|
|
device.setOrd(real.getOrd()); |
|
|
|
device.setOrd(real.getOrd()); |
|
|
|
device.setDeviceCode(real.getDeviceCode()); |
|
|
|
device.setDeviceCode(real.getDeviceCode()); |
|
|
@ -1580,12 +1573,30 @@ public class HydropowerServiceImpl implements HydropowerService { |
|
|
|
device.setOrd(real.getOrd()); |
|
|
|
device.setOrd(real.getOrd()); |
|
|
|
device.setState(real.getState()); |
|
|
|
device.setState(real.getState()); |
|
|
|
device.setLoadUnit(Optional.ofNullable(real.getPowerUnit()).orElse("kW")); |
|
|
|
device.setLoadUnit(Optional.ofNullable(real.getPowerUnit()).orElse("kW")); |
|
|
|
|
|
|
|
if("MW".equalsIgnoreCase(device.getLoadUnit())){ |
|
|
|
|
|
|
|
loadSum += (real.getActivePower() * 1000); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
loadSum += real.getActivePower(); |
|
|
|
|
|
|
|
} |
|
|
|
device.setCapacity(real.getInstalledCapacity()); |
|
|
|
device.setCapacity(real.getInstalledCapacity()); |
|
|
|
device.setLoad(real.getActivePower()); |
|
|
|
device.setLoad(real.getActivePower()); |
|
|
|
return device; |
|
|
|
hydropowerDevices.add(device); |
|
|
|
}).sorted(Comparator.comparing(AppHydropowerDeviceVo::getOrd)).collect(Collectors.toList())); |
|
|
|
}; |
|
|
|
hydropower.setLoadUnit(hydropower.getDevices().get(0).getLoadUnit()); |
|
|
|
// 设备
|
|
|
|
|
|
|
|
hydropower.setDevices(hydropowerDevices.stream().sorted(Comparator.comparing(AppHydropowerDeviceVo::getOrd)).collect(Collectors.toList())); |
|
|
|
|
|
|
|
// 负荷
|
|
|
|
|
|
|
|
hydropower.setLoad(loadSum); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
hydropower.setLoad(0.0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 出力
|
|
|
|
|
|
|
|
if(Math.abs(hydropower.getLoad()) > 0 && Math.abs(hydropower.getCapacity()) > 0){ |
|
|
|
|
|
|
|
hydropower.setOutput(BigDecimal.valueOf(hydropower.getLoad() / hydropower.getCapacity() * 100).setScale(2, RoundingMode.HALF_UP).doubleValue()); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
hydropower.setOutput(0.0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 负荷单位
|
|
|
|
|
|
|
|
hydropower.setLoadUnit("kW"); |
|
|
|
return hydropower; |
|
|
|
return hydropower; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
} |
|
|
|