瀏覽代碼

首页修改

wangb 2 年之前
父節點
當前提交
371a67b04d
共有 1 個文件被更改,包括 67 次插入5 次删除
  1. 67 5
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/monitor/MonitorService.java

+ 67 - 5
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/monitor/MonitorService.java

@@ -49,15 +49,15 @@ public class MonitorService {
                 wplist = CacheContext.wpmapls.get(wpId);
             }
             for (ProBasicPowerstation wp : CacheContext.wpls) {
-                if (wpId.equals(FD)) {
+                if (wpId.contains(FD)) {
                     if (wp.getId().endsWith("FDC_STA")) {
                         wplist.add(wp);
                     }
-                } else if (wpId.equals(GF)) {
+                } else if (wpId.contains(GF)) {
                     if (wp.getId().endsWith("GDC_STA")) {
                         wplist.add(wp);
                     }
-                } else if (wpId.equals(QS)) {
+                } else if (wpId.contains(QS)) {
                     wplist.add(wp);
                 }
             }
@@ -292,16 +292,50 @@ public class MonitorService {
 
             /**********************************************首页安全天数、实时功率及节能减排等信息统计**********************************************************/
 
+            Double zjrl = 0.0;
+            Double zjts = 0.0;
+
             double aqts = 0.0;
             double sjgl = 0.0;
             double llgl = 0.0;
             double ssfs = 0.0;
             double gzzs = 0.0;
+            double yfdl = 0.0;
+            double nfdl = 0.0;
             double jys = 0.0;
             double jym = 0.0;
             double co2 = 0.0;
             double so2 = 0.0;
 
+
+            Map<String, Object> zjrlmap = new HashMap<>();
+
+            if (wpId.contains(QS) || wpId.contains(FD) || wpId.contains(GF)) {
+                for (ProBasicPowerstation wp : wplist) {
+                    zjrl += wp.getJrCapacity() + wp.getJrwindCapacity();
+                }
+            } else {
+                for (ProBasicPowerstation wp : CacheContext.wpls) {
+                    if (wpId.equals(wp.getId())) {
+                        zjrl += wp.getJrCapacity() + wp.getJrwindCapacity();
+                    }
+                }
+                for (ProBasicProject pj : CacheContext.pjls) {
+                    if (wpId.equals(pj.getId())) {
+                        zjrl += pj.getCapacity();
+                    }
+                }
+                for (ProBasicLine ln : CacheContext.lnls) {
+                    if (wpId.equals(ln.getId())) {
+                        zjrl += ln.getCapacity();
+                    }
+                }
+
+            }
+
+
+            zjrlmap.put("zjrl", zjrl);
+
             Map<String, Double> qt = new HashMap<>();
 
             if (wpId.contains(QS) || wpId.contains(FD) || wpId.contains(GF)) {
@@ -317,6 +351,14 @@ public class MonitorService {
                 ProBasicPowerstationPoint ssfsvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSPJFS);
                 ssfs = edosUtil.getRealData(ssfsvalue).getPointValueInDouble();
 
+                //月发电量
+                ProBasicPowerstationPoint yfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.YFDL);
+                yfdl = edosUtil.getRealData(yfdlvalue).getPointValueInDouble();
+
+                //年发电量
+                ProBasicPowerstationPoint nfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.NFDL);
+                nfdl = edosUtil.getRealData(nfdlvalue).getPointValueInDouble();
+
                 //光照指数
                 ProBasicPowerstationPoint gzzsvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.RPJGZD);
                 gzzs = edosUtil.getRealData(gzzsvalue).getPointValueInDouble();
@@ -354,12 +396,20 @@ public class MonitorService {
                     //实时风速
                     ProBasicPowerstationPoint ssfsvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSPJFS);
                     ssfs = edosUtil.getRealData(ssfsvalue).getPointValueInDouble();
-                }else if (wpId.contains("G")){
+                } else if (wpId.contains("G")) {
                     //光照指数
                     ProBasicPowerstationPoint gzzsvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.RPJGZD);
                     gzzs = edosUtil.getRealData(gzzsvalue).getPointValueInDouble();
                 }
 
+                //月发电量
+                ProBasicPowerstationPoint yfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.YFDL);
+                yfdl = edosUtil.getRealData(yfdlvalue).getPointValueInDouble();
+
+                //年发电量
+                ProBasicPowerstationPoint nfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.NFDL);
+                nfdl = edosUtil.getRealData(nfdlvalue).getPointValueInDouble();
+
                 //理论功率
                 ProBasicPowerstationPoint llglvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSZLLGL);
                 llgl = edosUtil.getRealData(llglvalue).getPointValueInDouble();
@@ -380,10 +430,12 @@ public class MonitorService {
                 ProBasicPowerstationPoint jymvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.JYM);
                 jym = edosUtil.getRealData(jymvalue).getPointValueInDouble();
 
-
             }
+
             qt.put("aqts", MathUtil.twoBit(aqts));
             qt.put("sjgl", MathUtil.twoBit(sjgl));
+            qt.put("yfdl", MathUtil.twoBit(yfdl));
+            qt.put("nfdl", MathUtil.twoBit(nfdl));
             qt.put("llgl", MathUtil.twoBit(llgl));
             qt.put("gzzs", MathUtil.twoBit(gzzs));
             qt.put("ssfs", MathUtil.twoBit(ssfs));
@@ -392,6 +444,9 @@ public class MonitorService {
             qt.put("co2", MathUtil.twoBit(co2));
             qt.put("so2", MathUtil.twoBit(so2));
 
+            qt.put("ylyxs", yfdl / (zjrl/1000));
+            qt.put("nlyxs", nfdl / (zjrl/1000));
+
             map.put("qt", qt);
             /**********************************************首页安全天数、实时功率及节能减排等信息统计**********************************************************/
 
@@ -481,6 +536,13 @@ public class MonitorService {
             proplanmap.put("gf_y_sjdl", StringUtils.round(gf_y_sjdl, 2));
             proplanmap.put("gf_n_sjdl", StringUtils.round(gf_n_sjdl, 2));
 
+            proplanmap.put("qy_r_jhdl", StringUtils.round(fd_r_jhdl + gf_r_jhdl, 0));
+            proplanmap.put("qy_y_jhdl", StringUtils.round(fd_y_jhdl + gf_y_jhdl, 0));
+            proplanmap.put("qy_n_jhdl", StringUtils.round(fd_n_jhdl + gf_n_jhdl, 0));
+            proplanmap.put("qy_r_sjdl", StringUtils.round(fd_r_sjdl + gf_r_sjdl, 2));
+            proplanmap.put("qy_y_sjdl", StringUtils.round(fd_y_sjdl + gf_y_sjdl, 2));
+            proplanmap.put("qy_n_sjdl", StringUtils.round(fd_n_sjdl + gf_n_sjdl, 2));
+
             map.put("proplanmap", proplanmap);
             /**********************************************首页电量统计**********************************************************/