|
@@ -337,55 +337,55 @@ public class HealthMainService {
|
|
|
int lsl = 0;// 良数量
|
|
|
int csl = 0;// 差数量
|
|
|
double jkd = 0.0;
|
|
|
-// List<Weatherfh> wfhls = weatherfhService.findWeatherfh(beginDate, endDate, wp.getId());
|
|
|
-// if (!wfhls.isEmpty()) {
|
|
|
-//
|
|
|
-// Weatherfh wth = wfhls.get(wfhls.size() - 1);
|
|
|
-//
|
|
|
-// String temp = wth.getWeather();
|
|
|
-// if (StringUtils.notEmp(temp)) {
|
|
|
-// String strtemp = temp.substring(temp.length() - 6, temp.length() - 4);
|
|
|
-// if(StringUtils.isNumeric(strtemp))
|
|
|
-// {
|
|
|
-// tqyb = Double.valueOf(strtemp);
|
|
|
-// }else
|
|
|
-// {
|
|
|
-// temp = temp.substring(0, temp.length() - 2);
|
|
|
-// strtemp = temp.substring(temp.lastIndexOf("-")+1);
|
|
|
-// if(StringUtils.isNumeric(strtemp)) {
|
|
|
-// tqyb = Double.valueOf(strtemp);
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// } else {
|
|
|
-// tqyb = 1.0;
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-// ycfs = wth.getSpeed();
|
|
|
-//
|
|
|
-// ycfs = new BigDecimal(ycfs).multiply(new BigDecimal(XZNUM)).divide(new BigDecimal(NUM), 2, RoundingMode.HALF_EVEN).doubleValue();
|
|
|
-// wpmap.put("ycfs", ycfs);
|
|
|
-// wpmap.put("tqyb", tqyb);
|
|
|
-//
|
|
|
-// } else {
|
|
|
-// wpmap.put("ycfs", 6.0);
|
|
|
-// wpmap.put("tqyb", 1.0);
|
|
|
-// }
|
|
|
+ List<Weatherfh> wfhls = weatherfhService.findWeatherfh(beginDate, endDate, wp.getId());
|
|
|
+ if (!wfhls.isEmpty()) {
|
|
|
|
|
|
-// Map<String,Object> weathermap=weatherService.getWeatherRealInfo(wp.getId());
|
|
|
-// if(null!=weathermap && !weathermap.isEmpty())
|
|
|
-// {
|
|
|
-// if(weathermap.containsKey("tqtp"))
|
|
|
-// {
|
|
|
-// wpmap.put("tqyb", Double.valueOf(String.valueOf(weathermap.get("tqtp"))));
|
|
|
-// }
|
|
|
-// if(weathermap.containsKey("fs"))
|
|
|
-// {
|
|
|
-// wpmap.put("ycfs", weathermap.get("fs"));
|
|
|
-// }
|
|
|
-// }
|
|
|
+ Weatherfh wth = wfhls.get(wfhls.size() - 1);
|
|
|
+
|
|
|
+ String temp = wth.getWeather();
|
|
|
+ if (StringUtils.notEmp(temp)) {
|
|
|
+ String strtemp = temp.substring(temp.length() - 6, temp.length() - 4);
|
|
|
+ if(StringUtils.isNumeric(strtemp))
|
|
|
+ {
|
|
|
+ tqyb = Double.valueOf(strtemp);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ temp = temp.substring(0, temp.length() - 2);
|
|
|
+ strtemp = temp.substring(temp.lastIndexOf("-")+1);
|
|
|
+ if(StringUtils.isNumeric(strtemp)) {
|
|
|
+ tqyb = Double.valueOf(strtemp);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ tqyb = 1.0;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ ycfs = wth.getSpeed();
|
|
|
+
|
|
|
+ ycfs = new BigDecimal(ycfs).multiply(new BigDecimal(XZNUM)).divide(new BigDecimal(NUM), 2, RoundingMode.HALF_EVEN).doubleValue();
|
|
|
+ wpmap.put("ycfs", ycfs);
|
|
|
+ wpmap.put("tqyb", tqyb);
|
|
|
+
|
|
|
+ } else {
|
|
|
+ wpmap.put("ycfs", 6.0);
|
|
|
+ wpmap.put("tqyb", 1.0);
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String,Object> weathermap=weatherService.getWeatherRealInfo(wp.getId());
|
|
|
+ if(null!=weathermap && !weathermap.isEmpty())
|
|
|
+ {
|
|
|
+ if(weathermap.containsKey("tqtp"))
|
|
|
+ {
|
|
|
+ wpmap.put("tqyb", Double.valueOf(String.valueOf(weathermap.get("tqtp"))));
|
|
|
+ }
|
|
|
+ if(weathermap.containsKey("fs"))
|
|
|
+ {
|
|
|
+ wpmap.put("ycfs", weathermap.get("fs"));
|
|
|
+ }
|
|
|
+ }
|
|
|
// 获得实时风速测点编号
|
|
|
|
|
|
Windpowerstationpointnew point = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_SSFS);
|
|
@@ -477,11 +477,12 @@ public class HealthMainService {
|
|
|
stoptypemap.put("windTurbineId", vo.getWindTurbineId());
|
|
|
stoptypemap.put("stopTime", DateUtils.formatDateTime(vo.getStopTime()));
|
|
|
|
|
|
- if (StringUtils.notEmp(vo.getWarningId()) && InitialRunner.warningmap.containsKey(vo.getWarningId())) {
|
|
|
- stoptypemap.put("warningId", InitialRunner.warningmap.get(vo.getWarningId()).getChinesetext());
|
|
|
- } else {
|
|
|
- stoptypemap.put("warningId", " ");
|
|
|
- }
|
|
|
+// stoptypemap.put("warningId", vo.getWarnDesc());
|
|
|
+// if (StringUtils.notEmp(vo.getWarningId()) && InitialRunner.warningmap.containsKey(vo.getWarningId())) {
|
|
|
+// stoptypemap.put("warningId", InitialRunner.warningmap.get(vo.getWarningId()).getChinesetext());
|
|
|
+// } else {
|
|
|
+// stoptypemap.put("warningId", " ");
|
|
|
+// }
|
|
|
stoptypels.add(stoptypemap);
|
|
|
}
|
|
|
}
|
|
@@ -821,11 +822,13 @@ public class HealthMainService {
|
|
|
stoptypemap.put("windTurbineId", vo.getWindTurbineId());
|
|
|
stoptypemap.put("stopTime", DateUtils.formatDateTime(vo.getStopTime()));
|
|
|
|
|
|
- if (StringUtils.notEmp(vo.getWarningId()) && InitialRunner.warningmap.containsKey(vo.getWarningId())) {
|
|
|
- stoptypemap.put("warningId", InitialRunner.warningmap.get(vo.getWarningId()).getChinesetext());
|
|
|
- } else {
|
|
|
- stoptypemap.put("warningId", " ");
|
|
|
- }
|
|
|
+// if (StringUtils.notEmp(vo.getWarningId()) && InitialRunner.warningmap.containsKey(vo.getWarningId())) {
|
|
|
+// stoptypemap.put("warningId", InitialRunner.warningmap.get(vo.getWarningId()).getChinesetext());
|
|
|
+// } else {
|
|
|
+// stoptypemap.put("warningId", " ");
|
|
|
+// }
|
|
|
+
|
|
|
+ stoptypemap.put("warningId", vo.getWarnDesc());
|
|
|
gzls.add(stoptypemap);
|
|
|
}
|
|
|
}
|