|
@@ -97,65 +97,57 @@ public class NwpOneService extends BaseService {
|
|
|
List<BigDecimal> diffuseRadiationCollect= new ArrayList<>();
|
|
|
List<BigDecimal> directRadiationCollect= new ArrayList<>();
|
|
|
Map<String,String> map1 = new HashMap<>();
|
|
|
- if(electricField.getElectricFieldTypeEnum().getCode() == 1){
|
|
|
- swrCollect = checkList.stream().map(NwpOne::getSwr).collect(Collectors.toList());
|
|
|
- diffuseRadiationCollect = checkList.stream().map(NwpOne::getDiffuseRadiation).collect(Collectors.toList());
|
|
|
- directRadiationCollect = checkList.stream().map(NwpOne::getDirectRadiation).collect(Collectors.toList());
|
|
|
- datas.put("swr",swrCollect);
|
|
|
- datas.put("diffuseRadiation",diffuseRadiationCollect);
|
|
|
- datas.put("directRadiation",directRadiationCollect);
|
|
|
-
|
|
|
- }else{
|
|
|
- ws10Collect = checkList.stream().map(NwpOne::getWs10).collect(Collectors.toList());
|
|
|
- ws30Collect = checkList.stream().map(NwpOne::getWs30).collect(Collectors.toList());
|
|
|
- ws50Collect = checkList.stream().map(NwpOne::getWs50).collect(Collectors.toList());
|
|
|
- ws70Collect = checkList.stream().map(NwpOne::getWs70).collect(Collectors.toList());
|
|
|
- ws80Collect = checkList.stream().map(NwpOne::getWs80).collect(Collectors.toList());
|
|
|
- ws90Collect = checkList.stream().map(NwpOne::getWs90).collect(Collectors.toList());
|
|
|
- ws100Collect = checkList.stream().map(NwpOne::getWs100).collect(Collectors.toList());
|
|
|
- ws170Collect = checkList.stream().map(NwpOne::getWs170).collect(Collectors.toList());
|
|
|
- datas.put("ws10",ws10Collect);
|
|
|
- datas.put("ws30",ws30Collect);
|
|
|
- datas.put("ws50",ws50Collect);
|
|
|
- datas.put("ws70",ws70Collect);
|
|
|
- datas.put("ws80",ws80Collect);
|
|
|
- datas.put("ws90",ws90Collect);
|
|
|
- datas.put("ws100",ws100Collect);
|
|
|
- datas.put("ws170",ws170Collect);
|
|
|
- try {
|
|
|
- SysParameter sysParameter = sysParameterRepository.findBySysKeyEquals("NWP_CHANGE_WIND");
|
|
|
- if (sysParameter != null) {
|
|
|
- String nwpChangeWind = sysParameter.getSysValue();
|
|
|
- String[] windChangeName = nwpChangeWind.split(",");
|
|
|
- if (windChangeName.length == 16) {
|
|
|
- map1.put("ws10",windChangeName[0]+"米风速");
|
|
|
- map1.put("ws30",windChangeName[1]+"米风速");
|
|
|
- map1.put("ws50",windChangeName[2]+"米风速");
|
|
|
- map1.put("ws70",windChangeName[3]+"米风速");
|
|
|
- map1.put("ws80",windChangeName[4]+"米风速");
|
|
|
- map1.put("ws90",windChangeName[5]+"米风速");
|
|
|
- map1.put("ws100",windChangeName[6]+"米风速");
|
|
|
- map1.put("ws170",windChangeName[7]+"米风速");
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
- } catch (RuntimeException e) {
|
|
|
- String errorInfo = "NWP风速风向别名参数获取失败" + CommonUtil.printStackTraceToString(e);
|
|
|
- log.error(errorInfo, e);
|
|
|
- }
|
|
|
- if (map1.isEmpty()){
|
|
|
- map1.put("ws10","10米风速");
|
|
|
- map1.put("ws30","30米风速");
|
|
|
- map1.put("ws50","50米风速");
|
|
|
- map1.put("ws70","70米风速");
|
|
|
- map1.put("ws80","80米风速");
|
|
|
- map1.put("ws90","90米风速");
|
|
|
- map1.put("ws100","100米风速");
|
|
|
- map1.put("ws170","170米风速");
|
|
|
+ ws10Collect = checkList.stream().map(NwpOne::getWs10).collect(Collectors.toList());
|
|
|
+ ws30Collect = checkList.stream().map(NwpOne::getWs30).collect(Collectors.toList());
|
|
|
+ ws50Collect = checkList.stream().map(NwpOne::getWs50).collect(Collectors.toList());
|
|
|
+ ws70Collect = checkList.stream().map(NwpOne::getWs70).collect(Collectors.toList());
|
|
|
+ ws80Collect = checkList.stream().map(NwpOne::getWs80).collect(Collectors.toList());
|
|
|
+ ws90Collect = checkList.stream().map(NwpOne::getWs90).collect(Collectors.toList());
|
|
|
+ ws100Collect = checkList.stream().map(NwpOne::getWs100).collect(Collectors.toList());
|
|
|
+ ws170Collect = checkList.stream().map(NwpOne::getWs170).collect(Collectors.toList());
|
|
|
+ datas.put("ws10",ws10Collect);
|
|
|
+ datas.put("ws30",ws30Collect);
|
|
|
+ datas.put("ws50",ws50Collect);
|
|
|
+ datas.put("ws70",ws70Collect);
|
|
|
+ datas.put("ws80",ws80Collect);
|
|
|
+ datas.put("ws90",ws90Collect);
|
|
|
+ datas.put("ws100",ws100Collect);
|
|
|
+ datas.put("ws170",ws170Collect);
|
|
|
+ try {
|
|
|
+ SysParameter sysParameter = sysParameterRepository.findBySysKeyEquals("NWP_CHANGE_WIND");
|
|
|
+ if (sysParameter != null) {
|
|
|
+ String nwpChangeWind = sysParameter.getSysValue();
|
|
|
+ String[] windChangeName = nwpChangeWind.split(",");
|
|
|
+ if (windChangeName.length == 16) {
|
|
|
+ map1.put("ws10",windChangeName[0]+"米风速");
|
|
|
+ map1.put("ws30",windChangeName[1]+"米风速");
|
|
|
+ map1.put("ws50",windChangeName[2]+"米风速");
|
|
|
+ map1.put("ws70",windChangeName[3]+"米风速");
|
|
|
+ map1.put("ws80",windChangeName[4]+"米风速");
|
|
|
+ map1.put("ws90",windChangeName[5]+"米风速");
|
|
|
+ map1.put("ws100",windChangeName[6]+"米风速");
|
|
|
+ map1.put("ws170",windChangeName[7]+"米风速");
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+ } catch (RuntimeException e) {
|
|
|
+ String errorInfo = "NWP风速风向别名参数获取失败" + CommonUtil.printStackTraceToString(e);
|
|
|
+ log.error(errorInfo, e);
|
|
|
+ }
|
|
|
+ if (map1.isEmpty()){
|
|
|
+ map1.put("ws10","10米风速");
|
|
|
+ map1.put("ws30","30米风速");
|
|
|
+ map1.put("ws50","50米风速");
|
|
|
+ map1.put("ws70","70米风速");
|
|
|
+ map1.put("ws80","80米风速");
|
|
|
+ map1.put("ws90","90米风速");
|
|
|
+ map1.put("ws100","100米风速");
|
|
|
+ map1.put("ws170","170米风速");
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
map.put("cName",map1);
|
|
|
map.put("times",times);
|
|
|
map.put("datas",datas);
|
|
@@ -289,30 +281,30 @@ public class NwpOneService extends BaseService {
|
|
|
BigDecimal wd100 = new BigDecimal(0);
|
|
|
BigDecimal wd170 = new BigDecimal(0);
|
|
|
for(int j = 0; j < nwpOneList.size(); j++ ){
|
|
|
- t = t.add(nwpOneList.get(j).getT() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getT());
|
|
|
- rh = rh.add(nwpOneList.get(j).getRh() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getRh());
|
|
|
- pressure = pressure.add(nwpOneList.get(j).getPressure() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getPressure());
|
|
|
- swr = swr.add(nwpOneList.get(j).getSwr() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getSwr());
|
|
|
- lwr = lwr.add(nwpOneList.get(j).getLwr() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getLwr());
|
|
|
- directRadiation = directRadiation.add(nwpOneList.get(j).getDirectRadiation() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getDirectRadiation());
|
|
|
- diffuseRadiation = diffuseRadiation.add(nwpOneList.get(j).getDiffuseRadiation() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getDiffuseRadiation());
|
|
|
- senf = senf.add(nwpOneList.get(j).getSenf() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getSenf());
|
|
|
- ws10 = ws10.add(nwpOneList.get(j).getWs10() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWs10());
|
|
|
- ws30 = ws30.add(nwpOneList.get(j).getWs30() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWs30());
|
|
|
- ws50 = ws50.add(nwpOneList.get(j).getWs50() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWs50());
|
|
|
- ws70 = ws70.add(nwpOneList.get(j).getWs70() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWs70());
|
|
|
- ws80 = ws80.add(nwpOneList.get(j).getWs80() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWs80());
|
|
|
- ws90 = ws90.add(nwpOneList.get(j).getWs90() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWs90());
|
|
|
- ws100 = ws100.add(nwpOneList.get(j).getWs100() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWs100());
|
|
|
- ws170 = ws170.add(nwpOneList.get(j).getWs170() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWs170());
|
|
|
- wd10 = wd10.add(nwpOneList.get(j).getWd10() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWd10());
|
|
|
- wd30 = wd30.add(nwpOneList.get(j).getWd30() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWd30());
|
|
|
- wd50 = wd50.add(nwpOneList.get(j).getWd50() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWd50());
|
|
|
- wd70 = wd70.add(nwpOneList.get(j).getWd70() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWd70());
|
|
|
- wd80 = wd80.add(nwpOneList.get(j).getWd80() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWd80());
|
|
|
- wd90 = wd90.add(nwpOneList.get(j).getWd90() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWd90());
|
|
|
- wd100 = wd100.add(nwpOneList.get(j).getWd100() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWd100());
|
|
|
- wd170 = wd170.add(nwpOneList.get(j).getWd170() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWd170());
|
|
|
+ t = t.add(nwpOneList.get(j).getT() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getT());
|
|
|
+ rh = rh.add(nwpOneList.get(j).getRh() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getRh());
|
|
|
+ pressure = pressure.add(nwpOneList.get(j).getPressure() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getPressure());
|
|
|
+ swr = swr.add(nwpOneList.get(j).getSwr() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getSwr());
|
|
|
+ lwr = lwr.add(nwpOneList.get(j).getLwr() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getLwr());
|
|
|
+ directRadiation = directRadiation.add(nwpOneList.get(j).getDirectRadiation() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getDirectRadiation());
|
|
|
+ diffuseRadiation = diffuseRadiation.add(nwpOneList.get(j).getDiffuseRadiation() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getDiffuseRadiation());
|
|
|
+ senf = senf.add(nwpOneList.get(j).getSenf() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getSenf());
|
|
|
+ ws10 = ws10.add(nwpOneList.get(j).getWs10() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWs10());
|
|
|
+ ws30 = ws30.add(nwpOneList.get(j).getWs30() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWs30());
|
|
|
+ ws50 = ws50.add(nwpOneList.get(j).getWs50() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWs50());
|
|
|
+ ws70 = ws70.add(nwpOneList.get(j).getWs70() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWs70());
|
|
|
+ ws80 = ws80.add(nwpOneList.get(j).getWs80() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWs80());
|
|
|
+ ws90 = ws90.add(nwpOneList.get(j).getWs90() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWs90());
|
|
|
+ ws100 = ws100.add(nwpOneList.get(j).getWs100() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWs100());
|
|
|
+ ws170 = ws170.add(nwpOneList.get(j).getWs170() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWs170());
|
|
|
+ wd10 = wd10.add(nwpOneList.get(j).getWd10() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWd10());
|
|
|
+ wd30 = wd30.add(nwpOneList.get(j).getWd30() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWd30());
|
|
|
+ wd50 = wd50.add(nwpOneList.get(j).getWd50() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWd50());
|
|
|
+ wd70 = wd70.add(nwpOneList.get(j).getWd70() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWd70());
|
|
|
+ wd80 = wd80.add(nwpOneList.get(j).getWd80() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWd80());
|
|
|
+ wd90 = wd90.add(nwpOneList.get(j).getWd90() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWd90());
|
|
|
+ wd100 = wd100.add(nwpOneList.get(j).getWd100() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWd100());
|
|
|
+ wd170 = wd170.add(nwpOneList.get(j).getWd170() == null ? BigDecimal.valueOf(0) : nwpOneList.get(j).getWd170());
|
|
|
}
|
|
|
if(nwpOneList.size() > 0){
|
|
|
nwp.setScTime(nwpOneList.get(0).getScTime());
|