|
@@ -29,13 +29,22 @@ public class PowerStationStatusDataServiceImpl extends ServiceImpl<PowerStationS
|
|
private final ForecastManufactorService forecastManufactorService;
|
|
private final ForecastManufactorService forecastManufactorService;
|
|
private final ForecastPowerShortTermHisService forecastPowerShortTermHisService;
|
|
private final ForecastPowerShortTermHisService forecastPowerShortTermHisService;
|
|
|
|
|
|
- public PowerStationStatusDataServiceImpl(ForecastPowerShortTermHisService forecastPowerShortTermHisService, ForecastPowerUltraShortTermHisService forecastPowerUltraShortTermHisService, ForecastPowerUltraShortTermService forecastPowerUltraShortTermService, ForecastPowerShortTermService forecastPowerShortTermService, ElectricFieldServiceImpl electricFieldService, ForecastManufactorService forecastManufactorService) {
|
|
|
|
|
|
+ private final WindTowerStatusDataService windTowerStatusDataService;
|
|
|
|
+
|
|
|
|
+ private final SysParameterService sysParameterService;
|
|
|
|
+
|
|
|
|
+ private final NwpService nwpService;
|
|
|
|
+
|
|
|
|
+ public PowerStationStatusDataServiceImpl(ForecastPowerShortTermHisService forecastPowerShortTermHisService, ForecastPowerUltraShortTermHisService forecastPowerUltraShortTermHisService, ForecastPowerUltraShortTermService forecastPowerUltraShortTermService, ForecastPowerShortTermService forecastPowerShortTermService, ElectricFieldServiceImpl electricFieldService, ForecastManufactorService forecastManufactorService, WindTowerStatusDataService windTowerStatusDataService, SysParameterService sysParameterService, NwpService nwpService) {
|
|
this.forecastPowerUltraShortTermHisService = forecastPowerUltraShortTermHisService;
|
|
this.forecastPowerUltraShortTermHisService = forecastPowerUltraShortTermHisService;
|
|
this.forecastPowerUltraShortTermService = forecastPowerUltraShortTermService;
|
|
this.forecastPowerUltraShortTermService = forecastPowerUltraShortTermService;
|
|
this.forecastPowerShortTermService = forecastPowerShortTermService;
|
|
this.forecastPowerShortTermService = forecastPowerShortTermService;
|
|
this.electricFieldService = electricFieldService;
|
|
this.electricFieldService = electricFieldService;
|
|
this.forecastManufactorService = forecastManufactorService;
|
|
this.forecastManufactorService = forecastManufactorService;
|
|
this.forecastPowerShortTermHisService = forecastPowerShortTermHisService;
|
|
this.forecastPowerShortTermHisService = forecastPowerShortTermHisService;
|
|
|
|
+ this.windTowerStatusDataService = windTowerStatusDataService;
|
|
|
|
+ this.sysParameterService = sysParameterService;
|
|
|
|
+ this.nwpService = nwpService;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -265,9 +274,55 @@ public class PowerStationStatusDataServiceImpl extends ServiceImpl<PowerStationS
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // 获取云端nwp
|
|
|
|
+ Map<Long, String> nwpMap = new HashMap<>();
|
|
|
|
+ QueryWrapper<Nwp> nwpWrapper = new QueryWrapper<>();
|
|
|
|
+ nwpWrapper.between("pre_time", startTime, endTime);
|
|
|
|
+ nwpWrapper.eq("station_code",stationCode);
|
|
|
|
+ List<Nwp> nwpDataList = nwpService.list(nwpWrapper);
|
|
|
|
+ int nwpHubHeight = Integer.parseInt(sysParameterService.getSysParameterAndStationCode("NWP_HubHeight", "100", stationCode));
|
|
|
|
+ for (Nwp nwp : nwpDataList) {
|
|
|
|
+ // 获取nwp轮毂风速
|
|
|
|
+ if (nwpHubHeight==170){
|
|
|
|
+ nwpMap.put(nwp.getPreTime().getTime(), nwp.getWs170().toString());
|
|
|
|
+ }
|
|
|
|
+ else if (nwpHubHeight==100){
|
|
|
|
+ nwpMap.put(nwp.getPreTime().getTime(), nwp.getWs100().toString());
|
|
|
|
+ }
|
|
|
|
+ else if (nwpHubHeight==90){
|
|
|
|
+ nwpMap.put(nwp.getPreTime().getTime(), nwp.getWs90().toString());
|
|
|
|
+ }
|
|
|
|
+ else if (nwpHubHeight==80){
|
|
|
|
+ nwpMap.put(nwp.getPreTime().getTime(), nwp.getWs80().toString());
|
|
|
|
+ }
|
|
|
|
+ else if (nwpHubHeight==70){
|
|
|
|
+ nwpMap.put(nwp.getPreTime().getTime(), nwp.getWs70().toString());
|
|
|
|
+ }
|
|
|
|
+ else if (nwpHubHeight==50){
|
|
|
|
+ nwpMap.put(nwp.getPreTime().getTime(), nwp.getWs50().toString());
|
|
|
|
+ }
|
|
|
|
+ else if (nwpHubHeight==30){
|
|
|
|
+ nwpMap.put(nwp.getPreTime().getTime(), nwp.getWs30().toString());
|
|
|
|
+ }
|
|
|
|
+ else if (nwpHubHeight==10){
|
|
|
|
+ nwpMap.put(nwp.getPreTime().getTime(), nwp.getWs10().toString());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 获取测风塔轮毂风速
|
|
|
|
+ Map<Long, String> cftMap = new HashMap<>();
|
|
|
|
+ QueryWrapper<WindTowerStatusData> cftWrapper = new QueryWrapper<>();
|
|
|
|
+ cftWrapper.between("time", startTime, endTime);
|
|
|
|
+ cftWrapper.eq("station_code",stationCode);
|
|
|
|
+ List<WindTowerStatusData> cftDataList = windTowerStatusDataService.list(cftWrapper);
|
|
|
|
+ for (WindTowerStatusData windTowerStatusData : cftDataList) {
|
|
|
|
+ cftMap.put(windTowerStatusData.getTime().getTime(), windTowerStatusData.getWsInstHubHeight().toString());
|
|
|
|
+ }
|
|
|
|
|
|
List<String> timeList = new ArrayList<>();
|
|
List<String> timeList = new ArrayList<>();
|
|
List<String> sjList = new ArrayList();
|
|
List<String> sjList = new ArrayList();
|
|
|
|
+ List<String> nwpList = new ArrayList();
|
|
|
|
+ List<String> cftList = new ArrayList();
|
|
List<Map> dqList = new ArrayList();
|
|
List<Map> dqList = new ArrayList();
|
|
dqList.add(tempDqMap);
|
|
dqList.add(tempDqMap);
|
|
List<Map> cdqList = new ArrayList();
|
|
List<Map> cdqList = new ArrayList();
|
|
@@ -293,6 +348,7 @@ public class PowerStationStatusDataServiceImpl extends ServiceImpl<PowerStationS
|
|
} else {
|
|
} else {
|
|
sjList.add(null);
|
|
sjList.add(null);
|
|
}
|
|
}
|
|
|
|
+
|
|
// 封装时间轴list
|
|
// 封装时间轴list
|
|
String time = format.format(tempDateTime);
|
|
String time = format.format(tempDateTime);
|
|
timeList.add(time);
|
|
timeList.add(time);
|
|
@@ -311,16 +367,55 @@ public class PowerStationStatusDataServiceImpl extends ServiceImpl<PowerStationS
|
|
List tempcdqList = entry.getValue();
|
|
List tempcdqList = entry.getValue();
|
|
map1.put(entry.getKey()+"CDQ",tempcdqList.get(i));
|
|
map1.put(entry.getKey()+"CDQ",tempcdqList.get(i));
|
|
}
|
|
}
|
|
|
|
+ // 封装nwplist
|
|
|
|
+ if (nwpMap.get(tempDateTime) != null) {
|
|
|
|
+ if (Double.parseDouble(nwpMap.get(tempDateTime))==-99) {
|
|
|
|
+ nwpList.add(null);
|
|
|
|
+ map1.put("ZXCNWPWS","");
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ nwpList.add(nwpMap.get(tempDateTime).toString());
|
|
|
|
+ map1.put("ZXCNWPWS",nwpMap.get(tempDateTime).toString());
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ nwpList.add(null);
|
|
|
|
+ map1.put("ZXCNWPWS","");
|
|
|
|
+ }
|
|
|
|
+ // 封装cftlist
|
|
|
|
+ if (cftMap.get(tempDateTime) != null) {
|
|
|
|
+ if (Double.parseDouble(cftMap.get(tempDateTime))==-99) {
|
|
|
|
+ cftList.add(null);
|
|
|
|
+ map1.put("CFTWS","");
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ cftList.add(cftMap.get(tempDateTime).toString());
|
|
|
|
+ map1.put("CFTWS",cftMap.get(tempDateTime).toString());
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ cftList.add(null);
|
|
|
|
+ map1.put("CFTWS","");
|
|
|
|
+ }
|
|
|
|
|
|
i++;
|
|
i++;
|
|
tableList.add(map1);
|
|
tableList.add(map1);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ Map<String,String> nwpHeadMap = new HashMap<>();
|
|
|
|
+ nwpHeadMap.put("field", "ZXCNWPWS");
|
|
|
|
+ nwpHeadMap.put("label", "中心侧NWP轮毂风速");
|
|
|
|
+ headList.add(nwpHeadMap);
|
|
|
|
+
|
|
|
|
+ Map<String,String> cftHeadMap = new HashMap<>();
|
|
|
|
+ cftHeadMap.put("field", "CFTWS");
|
|
|
|
+ cftHeadMap.put("label", "测风塔轮毂风速");
|
|
|
|
+ headList.add(cftHeadMap);
|
|
|
|
|
|
Map<String, List> map = new HashMap<>();
|
|
Map<String, List> map = new HashMap<>();
|
|
map.put("dq", dqList);
|
|
map.put("dq", dqList);
|
|
map.put("cdq", cdqList);
|
|
map.put("cdq", cdqList);
|
|
map.put("sj", sjList);
|
|
map.put("sj", sjList);
|
|
|
|
+ map.put("nwp", nwpList);
|
|
|
|
+ map.put("cft", cftList);
|
|
map.put("time", timeList);
|
|
map.put("time", timeList);
|
|
map.put("fromHead", headList);
|
|
map.put("fromHead", headList);
|
|
map.put("tableList", tableList);
|
|
map.put("tableList", tableList);
|