Commit 6d90e989 authored by hezhuozhi's avatar hezhuozhi

优化电站监控

parent b01b5b18
...@@ -244,39 +244,61 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -244,39 +244,61 @@ public class SunlightServiceImpl implements SunlightService {
jpStation.setSnCode(sunlightDto.getPs_id().toString());// sncode jpStation.setSnCode(sunlightDto.getPs_id().toString());// sncode
try { try {
Map<String, String> map = sunlightDto.getTotal_capcity(); try {
if (map != null && map.get("unit") != null && !map.get("unit").isEmpty() Map<String, String> map = sunlightDto.getTotal_capcity();
&& !"--".equals(map.get("value"))) { if (map != null && map.get("unit") != null && !map.get("unit").isEmpty()
jpStation.setCapacity(SunlightUtil.zj.get(String.valueOf(map.get("unit"))) && !"--".equals(map.get("value"))) {
* Double.valueOf(String.valueOf(map.get("value"))));// 装机容量 jpStation.setCapacity(SunlightUtil.zj.get(String.valueOf(map.get("unit")))
* Double.valueOf(String.valueOf(map.get("value"))));// 装机容量
}
}catch (Exception e){
jpStation.setCapacity(0.0);
} }
Map<String, String> map1 = sunlightDto.getCurr_power(); try {
if (map1 != null && map1.get("unit") != null && !map1.get("unit").isEmpty() Map<String, String> map1 = sunlightDto.getCurr_power();
&& !"--".equals(map1.get("value"))) { if (map1 != null && map1.get("unit") != null && !map1.get("unit").isEmpty()
jpStation.setRealTimePower(SunlightUtil.GL.get(String.valueOf(map1.get("unit"))) && !"--".equals(map1.get("value"))) {
* Double.valueOf(String.valueOf(map1.get("value"))));// 实时功率 jpStation.setRealTimePower(SunlightUtil.GL.get(String.valueOf(map1.get("unit")))
* Double.valueOf(String.valueOf(map1.get("value"))));// 实时功率
}
}catch (Exception e){
jpStation.setRealTimePower(0.0);
} }
Map<String, String> map2 = sunlightDto.getToday_energy(); try {
if (map2 != null && map2.get("unit") != null && !map2.get("unit").isEmpty() Map<String, String> map2 = sunlightDto.getToday_energy();
&& !"--".equals(map2.get("value"))) { if (map2 != null && map2.get("unit") != null && !map2.get("unit").isEmpty()
jpStation.setDayGenerate(SunlightUtil.fd.get(String.valueOf(map2.get("unit"))) && !"--".equals(map2.get("value"))) {
* Double.valueOf(String.valueOf(map2.get("value"))));// 日发电量 jpStation.setDayGenerate(SunlightUtil.fd.get(String.valueOf(map2.get("unit")))
* Double.valueOf(String.valueOf(map2.get("value"))));// 日发电量
}
}catch (Exception e){
jpStation.setDayGenerate(0.0);
} }
Map<String, String> map3 = sunlightDto.getTotal_energy();
if (map3 != null && map3.get("unit") != null && !map3.get("unit").isEmpty() try {
&& !"--".equals(map3.get("value"))) { Map<String, String> map3 = sunlightDto.getTotal_energy();
jpStation.setAccumulatedPower(SunlightUtil.fd.get(String.valueOf(map3.get("unit"))) if (map3 != null && map3.get("unit") != null && !map3.get("unit").isEmpty()
* Double.valueOf(String.valueOf(map3.get("value"))));// 累计发电量 && !"--".equals(map3.get("value"))) {
jpStation.setAccumulatedPower(SunlightUtil.fd.get(String.valueOf(map3.get("unit")))
* Double.valueOf(String.valueOf(map3.get("value"))));// 累计发电量
}
}catch (Exception e){
jpStation.setAccumulatedPower(0.0);
} }
Map<String, String> map4 = sunlightDto.getToday_income(); try {
if (map4 != null && map4.get("unit") != null && !map4.get("unit").isEmpty() Map<String, String> map4 = sunlightDto.getToday_income();
&& !"--".equals(map4.get("value"))) { if (map4 != null && map4.get("unit") != null && !map4.get("unit").isEmpty()
jpStation.setDayIncome(SunlightUtil.sy.get(String.valueOf(map4.get("unit"))) && !"--".equals(map4.get("value"))) {
* Double.valueOf(String.valueOf(map4.get("value"))));// 日收益 jpStation.setDayIncome(SunlightUtil.sy.get(String.valueOf(map4.get("unit")))
* Double.valueOf(String.valueOf(map4.get("value"))));// 日收益
}
}catch (Exception e){
jpStation.setDayIncome(0.0);
} }
Map<String, String> map5 = sunlightDto.getTotal_income(); Map<String, String> map5 = sunlightDto.getTotal_income();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment