Commit 6d90e989 authored by hezhuozhi's avatar hezhuozhi

优化电站监控

parent b01b5b18
......@@ -244,39 +244,61 @@ public class SunlightServiceImpl implements SunlightService {
jpStation.setSnCode(sunlightDto.getPs_id().toString());// sncode
try {
Map<String, String> map = sunlightDto.getTotal_capcity();
if (map != null && map.get("unit") != null && !map.get("unit").isEmpty()
&& !"--".equals(map.get("value"))) {
jpStation.setCapacity(SunlightUtil.zj.get(String.valueOf(map.get("unit")))
* Double.valueOf(String.valueOf(map.get("value"))));// 装机容量
try {
Map<String, String> map = sunlightDto.getTotal_capcity();
if (map != null && map.get("unit") != null && !map.get("unit").isEmpty()
&& !"--".equals(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();
if (map1 != null && map1.get("unit") != null && !map1.get("unit").isEmpty()
&& !"--".equals(map1.get("value"))) {
jpStation.setRealTimePower(SunlightUtil.GL.get(String.valueOf(map1.get("unit")))
* Double.valueOf(String.valueOf(map1.get("value"))));// 实时功率
try {
Map<String, String> map1 = sunlightDto.getCurr_power();
if (map1 != null && map1.get("unit") != null && !map1.get("unit").isEmpty()
&& !"--".equals(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();
if (map2 != null && map2.get("unit") != null && !map2.get("unit").isEmpty()
&& !"--".equals(map2.get("value"))) {
jpStation.setDayGenerate(SunlightUtil.fd.get(String.valueOf(map2.get("unit")))
* Double.valueOf(String.valueOf(map2.get("value"))));// 日发电量
try {
Map<String, String> map2 = sunlightDto.getToday_energy();
if (map2 != null && map2.get("unit") != null && !map2.get("unit").isEmpty()
&& !"--".equals(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()
&& !"--".equals(map3.get("value"))) {
jpStation.setAccumulatedPower(SunlightUtil.fd.get(String.valueOf(map3.get("unit")))
* Double.valueOf(String.valueOf(map3.get("value"))));// 累计发电量
try {
Map<String, String> map3 = sunlightDto.getTotal_energy();
if (map3 != null && map3.get("unit") != null && !map3.get("unit").isEmpty()
&& !"--".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();
if (map4 != null && map4.get("unit") != null && !map4.get("unit").isEmpty()
&& !"--".equals(map4.get("value"))) {
jpStation.setDayIncome(SunlightUtil.sy.get(String.valueOf(map4.get("unit")))
* Double.valueOf(String.valueOf(map4.get("value"))));// 日收益
try {
Map<String, String> map4 = sunlightDto.getToday_income();
if (map4 != null && map4.get("unit") != null && !map4.get("unit").isEmpty()
&& !"--".equals(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();
......
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