xushili 1 vuosi sitten
vanhempi
commit
b636c084d6

+ 52 - 37
src/main/java/com/gyee/frame/common/conf/ZmConfig.java

@@ -35,33 +35,30 @@ public class ZmConfig {
     private static List<String> xhpoint;
     private static List<String> hzjkey;
     private static List<String> hzjpoint;
+    private static List<String> akkey;
+    private static List<String> akpoint;
 
-    public static List<String> getHzjkey() {
-        return hzjkey;
-    }
-
-    public void setHzjkey(List<String> hzjkey) {
-        ZmConfig.hzjkey = hzjkey;
+    public static List<String> getMhskey() {
+        return mhskey;
     }
 
-    public static List<String> getHzjpoint() {
-        return hzjpoint;
+    public void setMhskey(List<String> mhskey) {
+        ZmConfig.mhskey = mhskey;
     }
 
-    public  void setHzjpoint(List<String> hzjpoint) {
-        ZmConfig.hzjpoint = hzjpoint;
+    public static List<String> getMhspoint() {
+        return mhspoint;
     }
 
-    public static List<String> getMhskey() {
-        return mhskey;
+    public void setMhspoint(List<String> mhspoint) {
+        ZmConfig.mhspoint = mhspoint;
     }
 
     public static List<String> getNsskey() {
         return nsskey;
     }
 
-
-    public  void setNsskey(List<String> nsskey) {
+    public void setNsskey(List<String> nsskey) {
         ZmConfig.nsskey = nsskey;
     }
 
@@ -69,7 +66,7 @@ public class ZmConfig {
         return nsspoint;
     }
 
-    public  void setNsspoint(List<String> nsspoint) {
+    public void setNsspoint(List<String> nsspoint) {
         ZmConfig.nsspoint = nsspoint;
     }
 
@@ -77,7 +74,7 @@ public class ZmConfig {
         return qskey;
     }
 
-    public  void setQskey(List<String> qskey) {
+    public void setQskey(List<String> qskey) {
         ZmConfig.qskey = qskey;
     }
 
@@ -85,7 +82,7 @@ public class ZmConfig {
         return qspoint;
     }
 
-    public  void setQspoint(List<String> qspoint) {
+    public void setQspoint(List<String> qspoint) {
         ZmConfig.qspoint = qspoint;
     }
 
@@ -93,7 +90,7 @@ public class ZmConfig {
         return sbqkey;
     }
 
-    public  void setSbqkey(List<String> sbqkey) {
+    public void setSbqkey(List<String> sbqkey) {
         ZmConfig.sbqkey = sbqkey;
     }
 
@@ -101,7 +98,7 @@ public class ZmConfig {
         return sbqpoint;
     }
 
-    public  void setSbqpoint(List<String> sbqpoint) {
+    public void setSbqpoint(List<String> sbqpoint) {
         ZmConfig.sbqpoint = sbqpoint;
     }
 
@@ -109,7 +106,7 @@ public class ZmConfig {
         return xskey;
     }
 
-    public  void setXskey(List<String> xskey) {
+    public void setXskey(List<String> xskey) {
         ZmConfig.xskey = xskey;
     }
 
@@ -117,7 +114,7 @@ public class ZmConfig {
         return xspoint;
     }
 
-    public  void setXspoint(List<String> xspoint) {
+    public void setXspoint(List<String> xspoint) {
         ZmConfig.xspoint = xspoint;
     }
 
@@ -125,7 +122,7 @@ public class ZmConfig {
         return dwkkey;
     }
 
-    public  void setDwkkey(List<String> dwkkey) {
+    public void setDwkkey(List<String> dwkkey) {
         ZmConfig.dwkkey = dwkkey;
     }
 
@@ -133,7 +130,7 @@ public class ZmConfig {
         return dwkpoint;
     }
 
-    public  void setDwkpoint(List<String> dwkpoint) {
+    public void setDwkpoint(List<String> dwkpoint) {
         ZmConfig.dwkpoint = dwkpoint;
     }
 
@@ -141,7 +138,7 @@ public class ZmConfig {
         return plyqkey;
     }
 
-    public  void setPlyqkey(List<String> plyqkey) {
+    public void setPlyqkey(List<String> plyqkey) {
         ZmConfig.plyqkey = plyqkey;
     }
 
@@ -149,7 +146,7 @@ public class ZmConfig {
         return plyqpoint;
     }
 
-    public  void setPlyqpoint(List<String> plyqpoint) {
+    public void setPlyqpoint(List<String> plyqpoint) {
         ZmConfig.plyqpoint = plyqpoint;
     }
 
@@ -157,7 +154,7 @@ public class ZmConfig {
         return pleqkey;
     }
 
-    public  void setPleqkey(List<String> pleqkey) {
+    public void setPleqkey(List<String> pleqkey) {
         ZmConfig.pleqkey = pleqkey;
     }
 
@@ -165,7 +162,7 @@ public class ZmConfig {
         return pleqpoint;
     }
 
-    public  void setPleqpoint(List<String> pleqpoint) {
+    public void setPleqpoint(List<String> pleqpoint) {
         ZmConfig.pleqpoint = pleqpoint;
     }
 
@@ -173,7 +170,7 @@ public class ZmConfig {
         return mchkey;
     }
 
-    public  void setMchkey(List<String> mchkey) {
+    public void setMchkey(List<String> mchkey) {
         ZmConfig.mchkey = mchkey;
     }
 
@@ -181,7 +178,7 @@ public class ZmConfig {
         return mchpoint;
     }
 
-    public  void setMchpoint(List<String> mchpoint) {
+    public void setMchpoint(List<String> mchpoint) {
         ZmConfig.mchpoint = mchpoint;
     }
 
@@ -189,7 +186,7 @@ public class ZmConfig {
         return xhkey;
     }
 
-    public  void setXhkey(List<String> xhkey) {
+    public void setXhkey(List<String> xhkey) {
         ZmConfig.xhkey = xhkey;
     }
 
@@ -197,21 +194,39 @@ public class ZmConfig {
         return xhpoint;
     }
 
-    public  void setXhpoint(List<String> xhpoint) {
+    public void setXhpoint(List<String> xhpoint) {
         ZmConfig.xhpoint = xhpoint;
     }
 
-    public  void setMhskey(List<String> mhskey) {
-        ZmConfig.mhskey = mhskey;
+    public static List<String> getHzjkey() {
+        return hzjkey;
     }
 
-    public static List<String> getMhspoint() {
-        return mhspoint;
+    public void setHzjkey(List<String> hzjkey) {
+        ZmConfig.hzjkey = hzjkey;
     }
 
-    public  void setMhspoint(List<String> mhspoint) {
-        ZmConfig.mhspoint = mhspoint;
+    public static List<String> getHzjpoint() {
+        return hzjpoint;
     }
 
+    public void setHzjpoint(List<String> hzjpoint) {
+        ZmConfig.hzjpoint = hzjpoint;
+    }
 
+    public static List<String> getAkkey() {
+        return akkey;
+    }
+
+    public void setAkkey(List<String> akkey) {
+        ZmConfig.akkey = akkey;
+    }
+
+    public static List<String> getAkpoint() {
+        return akpoint;
+    }
+
+    public void setAkpoint(List<String> akpoint) {
+        ZmConfig.akpoint = akpoint;
+    }
 }

+ 34 - 29
src/main/java/com/gyee/frame/service/websocket/GeneralAppearancePushService.java

@@ -8,7 +8,8 @@ import com.gyee.frame.util.IRealTimeDataBaseUtil;
 import com.gyee.frame.util.MathUtil;
 import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.ss.usermodel.WorkbookFactory;
 import org.springframework.boot.system.ApplicationHome;
 import org.springframework.stereotype.Service;
 
@@ -68,10 +69,10 @@ public class GeneralAppearancePushService {
     private Workbook openExcelByFile(String wpId) throws FileNotFoundException {
         Workbook wb = null;
         //String path = ClassUtils.getDefaultClassLoader().getResource("").getPath();
-//        String staticPath = ClassUtils.getDefaultClassLoader().getResource("static").getPath();
+        //        String staticPath = ClassUtils.getDefaultClassLoader().getResource("static").getPath();
         ApplicationHome ah = new ApplicationHome(SpringbootStart.class);
         String staticPath = ah.getSource().getParentFile().toString();
-//        System.out.println(staticPath);
+        //        System.out.println(staticPath);
         StringBuilder sb = new StringBuilder();
         switch (wpId) {
             case "MHS_FDC":
@@ -108,12 +109,12 @@ public class GeneralAppearancePushService {
             default:
 
         }
- //       System.out.println(String.valueOf(sb));
+        //       System.out.println(String.valueOf(sb));
         File file = new File(String.valueOf(sb));
-  //      System.out.println(file);
+        //      System.out.println(file);
         try {
             wb = WorkbookFactory.create(file);
-     //       System.out.println(wb);
+            //       System.out.println(wb);
         } catch (Exception ex) {
             // do something
         }
@@ -133,48 +134,52 @@ public class GeneralAppearancePushService {
 
             switch (wpId) {
                 case "MHS_FDC":
-                    namels= ZmConfig.getMhskey();
-                    valuels= ZmConfig.getMhspoint();
+                    namels = ZmConfig.getMhskey();
+                    valuels = ZmConfig.getMhspoint();
                     break;
                 case "NSS_FDC":
-                    namels= ZmConfig.getNsskey();
-                    valuels= ZmConfig.getNsspoint();
+                    namels = ZmConfig.getNsskey();
+                    valuels = ZmConfig.getNsspoint();
                     break;
                 case "QS_FDC":
-                    namels= ZmConfig.getQskey();
-                    valuels= ZmConfig.getQspoint();
+                    namels = ZmConfig.getQskey();
+                    valuels = ZmConfig.getQspoint();
                     break;
                 case "SBQ_FDC":
-                    namels= ZmConfig.getSbqkey();
-                    valuels= ZmConfig.getSbqpoint();
+                    namels = ZmConfig.getSbqkey();
+                    valuels = ZmConfig.getSbqpoint();
                     break;
                 case "XS_FDC":
-                    namels= ZmConfig.getXskey();
-                    valuels= ZmConfig.getXspoint();
+                    namels = ZmConfig.getXskey();
+                    valuels = ZmConfig.getXspoint();
                     break;
                 case "DWK_GDC":
-                    namels= ZmConfig.getDwkkey();
-                    valuels= ZmConfig.getDwkpoint();
+                    namels = ZmConfig.getDwkkey();
+                    valuels = ZmConfig.getDwkpoint();
                     break;
                 case "PL01_GC":
-                    namels= ZmConfig.getPlyqkey();
-                    valuels= ZmConfig.getPlyqpoint();
+                    namels = ZmConfig.getPlyqkey();
+                    valuels = ZmConfig.getPlyqpoint();
                     break;
                 case "PL02_GC":
-                    namels= ZmConfig.getPleqkey();
-                    valuels= ZmConfig.getPleqpoint();
+                    namels = ZmConfig.getPleqkey();
+                    valuels = ZmConfig.getPleqpoint();
                     break;
                 case "MCH_GDC":
-                    namels= ZmConfig.getMchkey();
-                    valuels= ZmConfig.getMchpoint();
+                    namels = ZmConfig.getMchkey();
+                    valuels = ZmConfig.getMchpoint();
                     break;
                 case "XH_GDC":
-                    namels= ZmConfig.getXhkey();
-                    valuels= ZmConfig.getXhpoint();
+                    namels = ZmConfig.getXhkey();
+                    valuels = ZmConfig.getXhpoint();
                     break;
                 case "HZJ_GDC":
-                    namels= ZmConfig.getHzjkey();
-                    valuels= ZmConfig.getHzjpoint();
+                    namels = ZmConfig.getHzjkey();
+                    valuels = ZmConfig.getHzjpoint();
+                    break;
+                case "AK_GDC":
+                    namels = ZmConfig.getAkkey();
+                    valuels = ZmConfig.getAkpoint();
                     break;
 
                 default:
@@ -194,7 +199,7 @@ public class GeneralAppearancePushService {
                     }
 
                 }
-              //  System.out.println("结果不为空");
+                //  System.out.println("结果不为空");
             }
 
         }

+ 233 - 265
src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java

@@ -99,7 +99,7 @@ public class GenreSetPushService {
             Date beginDate = cal2.getTime();
             cal2.add(Calendar.DAY_OF_MONTH, 1);
             Date endDate = cal2.getTime();
-/*************************************************风场指标*************************************************************/
+            /*************************************************风场指标*************************************************************/
 
             Map<String, Object> fcmap = new HashMap<>();
 
@@ -256,28 +256,28 @@ public class GenreSetPushService {
             //所属风场指标
             map.put("fcmap", fcmap);
 
-/*************************************************风场指标*************************************************************/
+            /*************************************************风场指标*************************************************************/
 
             Map<String, Object> tqmap = weatherService.getWeatherRealInfo(id);
-            if(null == tqmap){
+            if (null == tqmap) {
                 map.put("tqmap", null);
-            }{
+            }
+            {
                 map.put("tqmap", tqmap);
             }
 
 
+            Map<String, Object> weathermap = weatherDay5Service.getWeatherRealDay5Info(id);
 
-            Map<String,Object> weathermap= weatherDay5Service.getWeatherRealDay5Info(id);
-
-            if(null == weathermap){
+            if (null == weathermap) {
                 map.put("tqmap5", null);
-            }else {
+            } else {
                 map.put("tqmap5", weathermap);
             }
 
-            Map<String, Object> xtmap=tooltipAjax();
+            Map<String, Object> xtmap = tooltipAjax();
             map.put("xtmap", xtmap);
-/*************************************************基础指标*************************************************************/
+            /*************************************************基础指标*************************************************************/
             Map<String, Object> jczbmap = new HashMap<>();
 
 
@@ -339,8 +339,9 @@ public class GenreSetPushService {
                 jczbmap.put("nlyxs", (new BigDecimal(jczblist.get(3).getPointValueInDouble()).multiply(new BigDecimal(10))).divide(new BigDecimal(zjrl), 2, RoundingMode.HALF_EVEN).doubleValue());
                 //实时风速
                 jczbmap.put("ssfs", MathUtil.twoBit(jczblist.get(4).getPointValueInDouble()));
+                double pointValueInDouble = jczblist.get(5).getPointValueInDouble();
                 //上网电量
-                jczbmap.put("swdl", MathUtil.twoBit(jczblist.get(5).getPointValueInDouble()));
+                jczbmap.put("swdl", MathUtil.twoBit(pointValueInDouble));
                 //保证功率
                 bzgl = new BigDecimal(jczblist.get(6).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
                 jczbmap.put("bzgl", bzgl);
@@ -377,11 +378,11 @@ public class GenreSetPushService {
                 // 减排二氧化碳
                 int jpeyht = (int) (realApiUtil.getRealData(ConstantTR.JPEYHT).getPointValueInDouble() * 10000);
                 // 节约标煤
-                int jybm = (int)(realApiUtil.getRealData(ConstantTR.JYBM).getPointValueInDouble() * 10000);
+                int jybm = (int) (realApiUtil.getRealData(ConstantTR.JYBM).getPointValueInDouble() * 10000);
                 // 减排二氧化硫
-                int jpeyhl = (int)(realApiUtil.getRealData(ConstantTR.JPEYHL).getPointValueInDouble() * 10000);
+                int jpeyhl = (int) (realApiUtil.getRealData(ConstantTR.JPEYHL).getPointValueInDouble() * 10000);
                 // 节约水
-                int jys = (int)(realApiUtil.getRealData(ConstantTR.JYS).getPointValueInDouble() * 10000);
+                int jys = (int) (realApiUtil.getRealData(ConstantTR.JYS).getPointValueInDouble() * 10000);
 
                 Double gfsjgl = realApiUtil.getRealData(windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(GF, Constant.TPOINT_WP_SJGL)).getPointValueInDouble();
 
@@ -431,11 +432,10 @@ public class GenreSetPushService {
 
                 }
 
-                jczbmap.put("mttf", MathUtil.twoBit(mtbf-mttr));
+                jczbmap.put("mttf", MathUtil.twoBit(mtbf - mttr));
                 jczbmap.put("mttr", mttr);
                 jczbmap.put("mtbf", mtbf);
-            }else
-            {
+            } else {
                 jczbmap.put("mttf", 0);
                 jczbmap.put("mttr", 0);
                 jczbmap.put("mtbf", 0);
@@ -443,60 +443,60 @@ public class GenreSetPushService {
 
             //预测发电上限
             if (null != zjrl) {
-                double rfdlsx = zjrl*12;
-                double yfdlsx = zjrl *12* daynum;
+                double rfdlsx = zjrl * 12;
+                double yfdlsx = zjrl * 12 * daynum;
                 jczbmap.put("rfdlsx", MathUtil.twoBit(rfdlsx));
                 jczbmap.put("yfdlsx", MathUtil.twoBit(yfdlsx));
             }
 
             //预测发电量
-//            double rycfdl = rfdl * YCFDLXS;
-//            Map<String,Object> weathermap= weatherDay5Service.getWeatherRealDay5Info(id);
-//            if(null != weathermap){
-//                if(weathermap.containsKey("ls")){
-//                    java.util.List<Map<String,Object>> weatherls=(java.util.List<Map<String,Object>>)weathermap.get("ls");
-//                    if(!weatherls.isEmpty() && weatherls.size()>8 )
-//                    {
-//                        Map<Double, Integer> speedmap = new HashMap<Double, Integer>();
-//                        for (int i=0;i<8;i++) {
-//
-//                            Map<String,Object> wh=weatherls.get(i);
-//
-//                            double fs=(double)wh.get("fs");
-//
-//                            if (speedmap.containsKey(fs)) {
-//                                int temp = speedmap.get(fs) + 180;
-//                                speedmap.put(fs, temp);
-//                            } else {
-//                                speedmap.put(fs, 180);
-//                            }
-//
-//                        }
-//                        rycfdl = powerToPowerService.getPowerByWp(speedmap, id, 1);
-//                    }
-//                }
-//            }
-
-//            if(rycfdl==0.0)
-//            {
-//                rycfdl = rfdl * YCFDLXS;
-//            }
+            //            double rycfdl = rfdl * YCFDLXS;
+            //            Map<String,Object> weathermap= weatherDay5Service.getWeatherRealDay5Info(id);
+            //            if(null != weathermap){
+            //                if(weathermap.containsKey("ls")){
+            //                    java.util.List<Map<String,Object>> weatherls=(java.util.List<Map<String,Object>>)weathermap.get("ls");
+            //                    if(!weatherls.isEmpty() && weatherls.size()>8 )
+            //                    {
+            //                        Map<Double, Integer> speedmap = new HashMap<Double, Integer>();
+            //                        for (int i=0;i<8;i++) {
+            //
+            //                            Map<String,Object> wh=weatherls.get(i);
+            //
+            //                            double fs=(double)wh.get("fs");
+            //
+            //                            if (speedmap.containsKey(fs)) {
+            //                                int temp = speedmap.get(fs) + 180;
+            //                                speedmap.put(fs, temp);
+            //                            } else {
+            //                                speedmap.put(fs, 180);
+            //                            }
+            //
+            //                        }
+            //                        rycfdl = powerToPowerService.getPowerByWp(speedmap, id, 1);
+            //                    }
+            //                }
+            //            }
+
+            //            if(rycfdl==0.0)
+            //            {
+            //                rycfdl = rfdl * YCFDLXS;
+            //            }
             int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY) + 1;
             double rycfdl = StringUtils.round((rfdl / hour) * 22, 2);
-//            double rycfdl = StringUtils.round(rfdl * YCFDLXS, 2);
+            //            double rycfdl = StringUtils.round(rfdl * YCFDLXS, 2);
             //预测电量临时算法=(月发电量+日预测发电量*(日历天数-当前日数))*预测发电量系数
             c = Calendar.getInstance();
-            double yycfdl = (yfdl + rycfdl*(daynum-c.get(Calendar.DAY_OF_MONTH)))*YCFDLXS;
+            double yycfdl = (yfdl + rycfdl * (daynum - c.get(Calendar.DAY_OF_MONTH))) * YCFDLXS;
             jczbmap.put("rycfdl", MathUtil.twoBit(rycfdl));
             jczbmap.put("yycfdl", MathUtil.twoBit(yycfdl));
 
             map.put("jczbmap", jczbmap);
 
 
-/*************************************************基础指标*************************************************************/
+            /*************************************************基础指标*************************************************************/
 
 
-/*************************************************明细状态*************************************************************/
+            /*************************************************明细状态*************************************************************/
 
             Map<String, Double> mxztmap = new HashMap<>();
 
@@ -808,11 +808,11 @@ public class GenreSetPushService {
                         mxztmap.put("jrts", 0.0);
                     }
 
-                }else if (id.endsWith("GDC")){
+                } else if (id.endsWith("GDC")) {
                     List<String> gfzbls = new ArrayList<>();
 
                     List<Windturbine> wtls = InitialRunner.wp_wtmap.get(id);
-                    for(Windturbine wt:wtls) {
+                    for (Windturbine wt : wtls) {
                         //状态
                         gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getId());
                     }
@@ -871,11 +871,11 @@ public class GenreSetPushService {
                     mxztmap.put("hjslts", 0.0);
 
                     mxztmap.put("jrts", djnum + sdtjnum + zcfdnum + qxjclnum + xdjclnum + xdtjnum + gztjnum + cnsltjnum + jxtjnum + cnsljxnum + dwslnum + hjslnum + lxnum);
-                }else if (id.endsWith("_GC")){
+                } else if (id.endsWith("_GC")) {
                     List<String> gfzbls = new ArrayList<>();
 
                     List<Windturbine> wtls = InitialRunner.pj_wtmap.get(id);
-                    for(Windturbine wt:wtls) {
+                    for (Windturbine wt : wtls) {
                         //状态
                         gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getId());
                     }
@@ -934,11 +934,11 @@ public class GenreSetPushService {
                     mxztmap.put("hjslts", 0.0);
 
                     mxztmap.put("jrts", djnum + sdtjnum + zcfdnum + qxjclnum + xdjclnum + xdtjnum + gztjnum + cnsltjnum + jxtjnum + cnsljxnum + dwslnum + hjslnum + lxnum);
-                }else if (id.endsWith("_XL")){
+                } else if (id.endsWith("_XL")) {
                     List<String> gfzbls = new ArrayList<>();
 
                     List<Windturbine> wtls = InitialRunner.ln_wtmap.get(id);
-                    for(Windturbine wt:wtls) {
+                    for (Windturbine wt : wtls) {
                         //状态
                         gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getId());
                     }
@@ -997,7 +997,7 @@ public class GenreSetPushService {
                     mxztmap.put("hjslts", 0.0);
 
                     mxztmap.put("jrts", djnum + sdtjnum + zcfdnum + qxjclnum + xdjclnum + xdtjnum + gztjnum + cnsltjnum + jxtjnum + cnsljxnum + dwslnum + hjslnum + lxnum);
-                }else {
+                } else {
                     mxztmap.put("djts", 0.0);
                     mxztmap.put("sdtjts", 0.0);
                     mxztmap.put("yxts", 0.0);
@@ -1015,11 +1015,11 @@ public class GenreSetPushService {
                 }
             }
             map.put("mxztmap", mxztmap);
-//
+            //
 
-/*************************************************明细状态*************************************************************/
+            /*************************************************明细状态*************************************************************/
 
-/*************************************************五项损失**************************************************************/
+            /*************************************************五项损失**************************************************************/
 
             Map<String, Double> wxssmap = new HashMap<>();
             List<String> wxssls = new ArrayList<>();
@@ -1115,12 +1115,12 @@ public class GenreSetPushService {
                 // 年场内受累故障
                 Double ngzzsl = MathUtil.twoBit(wxsslist.get(5).getPointValueInDouble());
 
-//                wxssmap.put("rjxsl", rjxsl);
-//                wxssmap.put("rgzzsl", rgzzsl);
-//                wxssmap.put("yjxsl", yjxsl);
-//                wxssmap.put("ygzzsl", ygzzsl);
-//                wxssmap.put("njxsl", njxsl);
-//                wxssmap.put("ngzzsl", ngzzsl);
+                //                wxssmap.put("rjxsl", rjxsl);
+                //                wxssmap.put("rgzzsl", rgzzsl);
+                //                wxssmap.put("yjxsl", yjxsl);
+                //                wxssmap.put("ygzzsl", ygzzsl);
+                //                wxssmap.put("njxsl", njxsl);
+                //                wxssmap.put("ngzzsl", ngzzsl);
 
                 //日待机损失
                 Double rdjss = MathUtil.twoBit(wxsslist.get(6).getPointValueInDouble());
@@ -1217,52 +1217,43 @@ public class GenreSetPushService {
                 wxssmap.put("nslssdl", nslssdl);
 
 
-                double rllfdl=rfdl+rgzssdl+rjxssdl+rqfssdl+rxdssdl+rslssdl;
-                if(rllfdl!=0)
-                {
-                    double rfnlyl=new BigDecimal(rfdl).divide(new BigDecimal(rllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                double rllfdl = rfdl + rgzssdl + rjxssdl + rqfssdl + rxdssdl + rslssdl;
+                if (rllfdl != 0) {
+                    double rfnlyl = new BigDecimal(rfdl).divide(new BigDecimal(rllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
                     wxssmap.put("rfnlyl", rfnlyl);
-                }else
-                {
+                } else {
                     wxssmap.put("rfnlyl", 0.0);
                 }
 
-                double yllfdl=yfdl+ygzssdl+yjxssdl+yqfssdl+yxdssdl+yslssdl;
-                if(yllfdl!=0)
-                {
-                    double yfnlyl=new BigDecimal(yfdl).divide(new BigDecimal(yllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                double yllfdl = yfdl + ygzssdl + yjxssdl + yqfssdl + yxdssdl + yslssdl;
+                if (yllfdl != 0) {
+                    double yfnlyl = new BigDecimal(yfdl).divide(new BigDecimal(yllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
                     wxssmap.put("yfnlyl", yfnlyl);
-                }else
-                {
+                } else {
                     wxssmap.put("yfnlyl", 0.0);
                 }
 
-                double nllfdl=nfdl+ngzssdl+njxssdl+nqfssdl+nxdssdl+nslssdl;
-                if(nllfdl!=0)
-                {
-                    double nfnlyl=new BigDecimal(nfdl).divide(new BigDecimal(nllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                double nllfdl = nfdl + ngzssdl + njxssdl + nqfssdl + nxdssdl + nslssdl;
+                if (nllfdl != 0) {
+                    double nfnlyl = new BigDecimal(nfdl).divide(new BigDecimal(nllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
                     wxssmap.put("nfnlyl", nfnlyl);
-                }else
-                {
+                } else {
                     wxssmap.put("nfnlyl", 0.0);
                 }
 
                 //环比风能利用率
-                Map<String, Double> hbmap=getHbWs(id);
-                if(hbmap.containsKey("rfnlyl"))
-                {
-                    double rhb=hbmap.get("rfnlyl");
-                    wxssmap.put("rfnlyl_hb", MathUtil.twoBit(wxssmap.get("rfnlyl")-rhb));
+                Map<String, Double> hbmap = getHbWs(id);
+                if (hbmap.containsKey("rfnlyl")) {
+                    double rhb = hbmap.get("rfnlyl");
+                    wxssmap.put("rfnlyl_hb", MathUtil.twoBit(wxssmap.get("rfnlyl") - rhb));
                 }
-                if(hbmap.containsKey("yfnlyl"))
-                {
-                    double yhb=hbmap.get("yfnlyl");
-                    wxssmap.put("yfnlyl_hb", MathUtil.twoBit(wxssmap.get("yfnlyl")-yhb));
+                if (hbmap.containsKey("yfnlyl")) {
+                    double yhb = hbmap.get("yfnlyl");
+                    wxssmap.put("yfnlyl_hb", MathUtil.twoBit(wxssmap.get("yfnlyl") - yhb));
                 }
-                if(hbmap.containsKey("nfnlyl"))
-                {
-                    double nhb=hbmap.get("nfnlyl");
-                    wxssmap.put("nfnlyl_hb", MathUtil.twoBit(wxssmap.get("nfnlyl")-nhb));
+                if (hbmap.containsKey("nfnlyl")) {
+                    double nhb = hbmap.get("nfnlyl");
+                    wxssmap.put("nfnlyl_hb", MathUtil.twoBit(wxssmap.get("nfnlyl") - nhb));
                 }
             } else {
 
@@ -1297,50 +1288,47 @@ public class GenreSetPushService {
             }
 
 
-
             map.put("wxssmap", wxssmap);
 
-/****************************************************五项损失************************************************************/
-/****************************************************日功率曲线**********************************************************/
+            /****************************************************五项损失************************************************************/
+            /****************************************************日功率曲线**********************************************************/
 
-//            List<DataVo> glvos = realPowerPushService.findRealPower(id);
-//            map.put("glvos", glvos);
-/*************************************************日功率曲线*************************************************************/
+            //            List<DataVo> glvos = realPowerPushService.findRealPower(id);
+            //            map.put("glvos", glvos);
+            /*************************************************日功率曲线*************************************************************/
 
-/****************************************************日电量历史**********************************************************/
+            /****************************************************日电量历史**********************************************************/
 
-//            List<DataVo> rdlvos = findPowerWpBar(id);
-//            map.put("rdlvos", rdlvos);
-/*************************************************日电量历史*************************************************************/
+            //            List<DataVo> rdlvos = findPowerWpBar(id);
+            //            map.put("rdlvos", rdlvos);
+            /*************************************************日电量历史*************************************************************/
 
-/*************************************************悬停指标*************************************************************/
+            /*************************************************悬停指标*************************************************************/
 
 
-/************************************************悬停指标*************************************************************/
+            /************************************************悬停指标*************************************************************/
 
-/*************************************************关系库指标*************************************************************/
+            /*************************************************关系库指标*************************************************************/
 
             Map<String, Double> gxkmap = new HashMap<>();
 
             Calendar cal = Calendar.getInstance();
-            cal.set(Calendar.DAY_OF_MONTH,1);
-            Date begin=cal.getTime();
+            cal.set(Calendar.DAY_OF_MONTH, 1);
+            Date begin = cal.getTime();
             cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
-            Date end= cal.getTime();
-            int tjsl=totalTarget(id,begin,end);
+            Date end = cal.getTime();
+            int tjsl = totalTarget(id, begin, end);
             gxkmap.put("tjsl", Double.valueOf(tjsl));
-            int gdsl=wobugeqService.totalNum(DateUtils.truncate(begin),DateUtils.truncate(end));
+            int gdsl = wobugeqService.totalNum(DateUtils.truncate(begin), DateUtils.truncate(end));
 
-            if(gdsl!=0)
-            {
+            if (gdsl != 0) {
                 Double tjl = new BigDecimal(tjsl).divide(new BigDecimal(gdsl), 2, RoundingMode.HALF_EVEN).doubleValue();
                 gxkmap.put("tjl", tjl);
-            }else
-            {
+            } else {
                 gxkmap.put("tjl", 0.0);
             }
 
-            int sjtjsl=recommenmainService.getRecommenmainnum(id,DateUtils.truncate(begin),DateUtils.truncate(end));
+            int sjtjsl = recommenmainService.getRecommenmainnum(id, DateUtils.truncate(begin), DateUtils.truncate(end));
             gxkmap.put("sjtjsl", Double.valueOf(sjtjsl));
             cal = Calendar.getInstance();
             List<Windpowerinfoday> wpdls = windpowerinfodayService.getWindpowerinfodayList(id, DateUtils.truncate(cal.getTime()));
@@ -1350,7 +1338,7 @@ public class GenreSetPushService {
                 gxkmap.put("nsbklyl", wd.getYearsbklyl() == 0 ? 98.96 : wd.getYearsbklyl());
                 gxkmap.put("nzhcydl", wd.getYearzhcydl() <= 0 ? 0.14 : wd.getMonthzhcydl());
 
-                gxkmap.put("ysbklyl", wd.getMonthsbklyl() <= 0 ? 98.96 :wd.getMonthsbklyl());
+                gxkmap.put("ysbklyl", wd.getMonthsbklyl() <= 0 ? 98.96 : wd.getMonthsbklyl());
                 gxkmap.put("ydxkyss", wd.getMonthdxkyxs());
                 gxkmap.put("yzhcydl", wd.getMonthzhcydl() <= 0 ? 0.14 : wd.getMonthzhcydl());
 
@@ -1406,42 +1394,40 @@ public class GenreSetPushService {
 
 
                 cal = Calendar.getInstance();
-                cal.add(Calendar.MONTH,-1);
-                cal.set(Calendar.DAY_OF_MONTH,1);
-                begin=cal.getTime();
+                cal.add(Calendar.MONTH, -1);
+                cal.set(Calendar.DAY_OF_MONTH, 1);
+                begin = cal.getTime();
                 cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
-                end= cal.getTime();
-                int tjsl_hb=totalTarget(id,begin,end);
+                end = cal.getTime();
+                int tjsl_hb = totalTarget(id, begin, end);
                 gxkmap.put("tjsl_hb", Double.valueOf(tjsl_hb));
-                int gdsl_hb=wobugeqService.totalNum(DateUtils.truncate(begin),DateUtils.truncate(end));
+                int gdsl_hb = wobugeqService.totalNum(DateUtils.truncate(begin), DateUtils.truncate(end));
 
-                if(gdsl_hb!=0)
-                {
+                if (gdsl_hb != 0) {
                     Double tjl_hb = new BigDecimal(tjsl_hb).divide(new BigDecimal(gdsl_hb), 2, RoundingMode.HALF_EVEN).doubleValue();
                     gxkmap.put("tjl_hb", tjl_hb);
-                }else
-                {
+                } else {
                     gxkmap.put("tjl_hb", 0.0);
                 }
 
-                int sjtjsl_hb=recommenmainService.getRecommenmainnum(id,DateUtils.truncate(begin),DateUtils.truncate(end));
-                gxkmap.put("sjtjsl_hb", Double.valueOf(sjtjsl-sjtjsl_hb));
+                int sjtjsl_hb = recommenmainService.getRecommenmainnum(id, DateUtils.truncate(begin), DateUtils.truncate(end));
+                gxkmap.put("sjtjsl_hb", Double.valueOf(sjtjsl - sjtjsl_hb));
                 List<Windpowerinfoday> hbwpdls = windpowerinfodayService.getWindpowerinfodayList(id, DateUtils.truncate(cal.getTime()));
                 if (!hbwpdls.isEmpty()) {
 
                     Windpowerinfoday hbwd = wpdls.get(0);
-                    gxkmap.put("ndxkyss_hb", MathUtil.twoBit(wd.getYeardxkyxs()-hbwd.getYeardxkyxs()));
-                    gxkmap.put("nsbklyl_hb", MathUtil.twoBit(wd.getYearsbklyl()-hbwd.getYearsbklyl()));
-                    gxkmap.put("nzhcydl_hb", MathUtil.twoBit(wd.getYearzhcydl()-hbwd.getYearzhcydl()));
+                    gxkmap.put("ndxkyss_hb", MathUtil.twoBit(wd.getYeardxkyxs() - hbwd.getYeardxkyxs()));
+                    gxkmap.put("nsbklyl_hb", MathUtil.twoBit(wd.getYearsbklyl() - hbwd.getYearsbklyl()));
+                    gxkmap.put("nzhcydl_hb", MathUtil.twoBit(wd.getYearzhcydl() - hbwd.getYearzhcydl()));
 
-                    gxkmap.put("ysbklyl_hb", MathUtil.twoBit(wd.getMonthsbklyl()-hbwd.getMonthsbklyl()));
-                    gxkmap.put("yzhcydl_hb", MathUtil.twoBit(wd.getMonthzhcydl()-hbwd.getMonthzhcydl()));
-                    gxkmap.put("ydxkyss_hb", MathUtil.twoBit(wd.getMonthdxkyxs()-hbwd.getMonthdxkyxs()));
+                    gxkmap.put("ysbklyl_hb", MathUtil.twoBit(wd.getMonthsbklyl() - hbwd.getMonthsbklyl()));
+                    gxkmap.put("yzhcydl_hb", MathUtil.twoBit(wd.getMonthzhcydl() - hbwd.getMonthzhcydl()));
+                    gxkmap.put("ydxkyss_hb", MathUtil.twoBit(wd.getMonthdxkyxs() - hbwd.getMonthdxkyxs()));
 
 
-                    gxkmap.put("rsbklyl_hb", MathUtil.twoBit(wd.getDaysbklyl()-hbwd.getDaysbklyl()));
-                    gxkmap.put("rzhcydl_hb", MathUtil.twoBit(wd.getDayzhcydl()-hbwd.getDayzhcydl()));
-                    gxkmap.put("rdxkyss_hb", MathUtil.twoBit(wd.getDaydxkyxs()-hbwd.getDaydxkyxs()));
+                    gxkmap.put("rsbklyl_hb", MathUtil.twoBit(wd.getDaysbklyl() - hbwd.getDaysbklyl()));
+                    gxkmap.put("rzhcydl_hb", MathUtil.twoBit(wd.getDayzhcydl() - hbwd.getDayzhcydl()));
+                    gxkmap.put("rdxkyss_hb", MathUtil.twoBit(wd.getDaydxkyxs() - hbwd.getDaydxkyxs()));
                 }
 
             } else {
@@ -1476,15 +1462,12 @@ public class GenreSetPushService {
             yfdljh = gxkmap.get("yfdljh");
             nfdljh = gxkmap.get("nfdljh");
 
-            if(yfdljh!=0)
-            {
+            if (yfdljh != 0) {
                 //与月计划发电量结合判断月预测发电量
-                if(yycfdl<yfdljh)
-                {
-                    jczbmap.put("yycfdl", MathUtil.twoBit(yfdljh*1.05));
-                }else if(yycfdl>(yfdljh*1.2))
-                {
-                    jczbmap.put("yycfdl", MathUtil.twoBit(yfdljh*1.2));
+                if (yycfdl < yfdljh) {
+                    jczbmap.put("yycfdl", MathUtil.twoBit(yfdljh * 1.05));
+                } else if (yycfdl > (yfdljh * 1.2)) {
+                    jczbmap.put("yycfdl", MathUtil.twoBit(yfdljh * 1.2));
                 }
             }
 
@@ -1514,13 +1497,12 @@ public class GenreSetPushService {
 
             map.put("gxkmap", gxkmap);
         }
-/*************************************************关系库指标**************************************************************/
+        /*************************************************关系库指标**************************************************************/
 
         return map;
     }
 
 
-
     public Map<String, Object> findPowerInfo(String id) throws Exception {
         Map<String, Object> map = new HashMap<String, Object>();
         if (StringUtils.notEmp(id)) {
@@ -1544,21 +1526,18 @@ public class GenreSetPushService {
     }
 
 
-
-
-
-    public int totalTarget(String id,Date beginDate,Date endDate) throws Exception {
-        int num=0;
-        String wpId=null;
-        String wtId=null;
+    public int totalTarget(String id, Date beginDate, Date endDate) throws Exception {
+        int num = 0;
+        String wpId = null;
+        String wtId = null;
         if (StringUtils.notEmp(id)) {
 
 
-            StringBuilder sb=new StringBuilder();
+            StringBuilder sb = new StringBuilder();
             if (id.equals(GF)) {
                 return 0;
             } else if (InitialRunner.wpmap.containsKey(id)) {
-                wpId=id;
+                wpId = id;
             } else if (InitialRunner.pjmap.containsKey(id)) {
                 for (Windturbine wt : InitialRunner.pj_wtmap.get(id)) {
                     sb.append("'").append(wt.getId()).append("',");
@@ -1569,11 +1548,10 @@ public class GenreSetPushService {
                 }
             }
 
-            if(sb.length()>0)
-            {
-                wtId=String.valueOf(sb.substring(0,sb.length()-1));
+            if (sb.length() > 0) {
+                wtId = String.valueOf(sb.substring(0, sb.length() - 1));
             }
-            num=recommenmainMsSqlService.totalList(wpId,wtId,beginDate,endDate);
+            num = recommenmainMsSqlService.totalList(wpId, wtId, beginDate, endDate);
         }
         return num;
     }
@@ -1614,13 +1592,11 @@ public class GenreSetPushService {
         List<PointData> rfdls = realApiUtil.getHistoryDatasSnap(rfdlai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
         List<PointData> swdls = realApiUtil.getHistoryDatasSnap(swdlai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
         List<PointData> gwdls = realApiUtil.getHistoryDatasSnap(gwdlai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
-        List<PointData> ssfss =null;
-        try{
-            if(wpId.equals("PL_GDC"))
-            {
+        List<PointData> ssfss = null;
+        try {
+            if (wpId.equals("PL_GDC")) {
                 ssfss = realApiUtil.getHistoryDatasSnap("PLGGL.NX_GD_PLG_YC_P1_L1_001_QXZ0001", beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
-            }else
-            {
+            } else {
                 ssfss = realApiUtil.getHistoryDatasSnap(ssfs, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
             }
             if (!rfdls.isEmpty() && !swdls.isEmpty() && !gwdls.isEmpty()
@@ -1669,15 +1645,16 @@ public class GenreSetPushService {
                     }
                 }
             }
-        } catch (Exception e){}
+        } catch (Exception e) {
+        }
 
         return vos;
     }
 
-    private   Map<String, Double> getHbWs(String id) throws Exception {
+    private Map<String, Double> getHbWs(String id) throws Exception {
         Calendar cal = Calendar.getInstance();
         cal.setTime(new Date());
-        cal.add(Calendar.MONTH,-1);
+        cal.add(Calendar.MONTH, -1);
         Map<String, Double> wxssmap = new HashMap<>();
         List<String> wxssls = new ArrayList<>();
 
@@ -1760,15 +1737,13 @@ public class GenreSetPushService {
         wxssls.add(windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_NFDL).getCode());
 
 
-        String[] ids=new String[wxssls.size()];
+        String[] ids = new String[wxssls.size()];
 
-        DNAVal[] wxsslist = realApiUtil.getHistMatrix(wxssls.toArray(ids),DateUtils.truncate(cal.getTime()).getTime());
+        DNAVal[] wxsslist = realApiUtil.getHistMatrix(wxssls.toArray(ids), DateUtils.truncate(cal.getTime()).getTime());
 
         if (wxsslist.length == wxssls.size()) {
 
 
-
-
             Double rjxsl = MathUtil.twoBit(wxsslist[0].DValue);
             // 日场内受累故障
             Double rgzzsl = MathUtil.twoBit(wxsslist[1].DValue);
@@ -1781,12 +1756,12 @@ public class GenreSetPushService {
             // 年场内受累故障
             Double ngzzsl = MathUtil.twoBit(wxsslist[5].DValue);
 
-//                wxssmap.put("rjxsl", rjxsl);
-//                wxssmap.put("rgzzsl", rgzzsl);
-//                wxssmap.put("yjxsl", yjxsl);
-//                wxssmap.put("ygzzsl", ygzzsl);
-//                wxssmap.put("njxsl", njxsl);
-//                wxssmap.put("ngzzsl", ngzzsl);
+            //                wxssmap.put("rjxsl", rjxsl);
+            //                wxssmap.put("rgzzsl", rgzzsl);
+            //                wxssmap.put("yjxsl", yjxsl);
+            //                wxssmap.put("ygzzsl", ygzzsl);
+            //                wxssmap.put("njxsl", njxsl);
+            //                wxssmap.put("ngzzsl", ngzzsl);
 
             //日待机损失
             Double rdjss = MathUtil.twoBit(wxsslist[6].DValue);
@@ -1879,41 +1854,35 @@ public class GenreSetPushService {
             Double nslssdl = new BigDecimal(ndwsl + ntqsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
 
 
-            double rfdl=MathUtil.twoBit(wxsslist[33].DValue);
-            double yfdl=MathUtil.twoBit(wxsslist[34].DValue);
-            double nfdl=MathUtil.twoBit(wxsslist[35].DValue);
+            double rfdl = MathUtil.twoBit(wxsslist[33].DValue);
+            double yfdl = MathUtil.twoBit(wxsslist[34].DValue);
+            double nfdl = MathUtil.twoBit(wxsslist[35].DValue);
             wxssmap.put("rslssdl", rslssdl);
             wxssmap.put("yslssdl", yslssdl);
             wxssmap.put("nslssdl", nslssdl);
 
 
-            double rllfdl=rfdl+rgzssdl+rjxssdl+rqfssdl+rxdssdl+rslssdl;
-            if(rllfdl!=0)
-            {
-                double rfnlyl=new BigDecimal(rfdl).divide(new BigDecimal(rllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+            double rllfdl = rfdl + rgzssdl + rjxssdl + rqfssdl + rxdssdl + rslssdl;
+            if (rllfdl != 0) {
+                double rfnlyl = new BigDecimal(rfdl).divide(new BigDecimal(rllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
                 wxssmap.put("rfnlyl", rfnlyl);
-            }else
-            {
+            } else {
                 wxssmap.put("rfnlyl", 0.0);
             }
 
-            double yllfdl=yfdl+ygzssdl+yjxssdl+yqfssdl+yxdssdl+yslssdl;
-            if(yllfdl!=0)
-            {
-                double yfnlyl=new BigDecimal(yfdl).divide(new BigDecimal(yllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+            double yllfdl = yfdl + ygzssdl + yjxssdl + yqfssdl + yxdssdl + yslssdl;
+            if (yllfdl != 0) {
+                double yfnlyl = new BigDecimal(yfdl).divide(new BigDecimal(yllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
                 wxssmap.put("yfnlyl", yfnlyl);
-            }else
-            {
+            } else {
                 wxssmap.put("yfnlyl", 0.0);
             }
 
-            double nllfdl=nfdl+ngzssdl+njxssdl+nqfssdl+nxdssdl+nslssdl;
-            if(nllfdl!=0)
-            {
-                double nfnlyl=new BigDecimal(nfdl).divide(new BigDecimal(nllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+            double nllfdl = nfdl + ngzssdl + njxssdl + nqfssdl + nxdssdl + nslssdl;
+            if (nllfdl != 0) {
+                double nfnlyl = new BigDecimal(nfdl).divide(new BigDecimal(nllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
                 wxssmap.put("nfnlyl", nfnlyl);
-            }else
-            {
+            } else {
                 wxssmap.put("nfnlyl", 0.0);
             }
 
@@ -1941,7 +1910,7 @@ public class GenreSetPushService {
         cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
         Date endDate = cal.getTime();
 
-        long num = DateUtils.hoursDiff(beginDate, endDate) ;
+        long num = DateUtils.hoursDiff(beginDate, endDate);
 
         cal = Calendar.getInstance();
         cal.set(Calendar.DAY_OF_MONTH, 1);
@@ -1954,18 +1923,18 @@ public class GenreSetPushService {
             DataVo vo = new DataVo();
 
             vo.setTime(cal.getTime().getTime());
-//                vo.setValue1(0.0);// 应发功率
-//                vo.setValue2(0.0);// 实发功率
-//                vo.setValue3(0.0);// 理论功率
-//                vo.setValue4(0.0);// 预测功率
-//                vo.setValue5(0.0);// 保证功率
-//                vo.setValue6(0.0);// 平均风速
-//                vo.setValue7(0.0);// 24小时预测功率
-//                vo.setValue8(0.0);// 72小时预测功率
-//                vo.setValue9(0.0);// 最优功率律
+            //                vo.setValue1(0.0);// 应发功率
+            //                vo.setValue2(0.0);// 实发功率
+            //                vo.setValue3(0.0);// 理论功率
+            //                vo.setValue4(0.0);// 预测功率
+            //                vo.setValue5(0.0);// 保证功率
+            //                vo.setValue6(0.0);// 平均风速
+            //                vo.setValue7(0.0);// 24小时预测功率
+            //                vo.setValue8(0.0);// 72小时预测功率
+            //                vo.setValue9(0.0);// 最优功率律
 
             vos.add(vo);
-            cal.add(Calendar.HOUR_OF_DAY,1);
+            cal.add(Calendar.HOUR_OF_DAY, 1);
         }
 
         cal = Calendar.getInstance();
@@ -1976,18 +1945,16 @@ public class GenreSetPushService {
         WindPowerStationTestingPoint2 rfdlai = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_RFDL);
         WindPowerStationTestingPoint2 sjgl = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL);
 
-        WindPowerStationTestingPoint2 ssfs =ssfs = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
+        WindPowerStationTestingPoint2 ssfs = ssfs = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
         List<PointData> rfdls = realApiUtil.getHistoryDatasSnap(rfdlai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 3600L);
         List<PointData> sjglls = realApiUtil.getHistoryDatasSnap(sjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 3600L);
-        List<PointData> ssfss =new ArrayList<>();
+        List<PointData> ssfss = new ArrayList<>();
 
-        if(wpId.equals("PL_GDC"))
-        {
+        if (wpId.equals("PL_GDC")) {
             ssfss = realApiUtil.getHistoryDatasSnap("PLGGL.NX_GD_PLG_YC_P1_L1_001_QXZ0001", beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 3600L);
-        }else
-        {
+        } else {
             ssfss = realApiUtil.getHistoryDatasSnap(ssfs, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 3600L);
         }
         if (!rfdls.isEmpty() && !sjglls.isEmpty()
@@ -1996,7 +1963,7 @@ public class GenreSetPushService {
             int count = 0;
             double temp = 0;
             for (int i = 0; i < rfdls.size(); i++) {
-                vos.get(i).setTime(rfdls.get(i).getPointTime()* 1000);
+                vos.get(i).setTime(rfdls.get(i).getPointTime() * 1000);
 
                 temp = rfdls.get(i).getPointValueInDouble();
                 vos.get(i).setValue1(StringUtils.round(temp, 2));// 日发电量
@@ -2009,6 +1976,7 @@ public class GenreSetPushService {
 
         return vos;
     }
+
     private void setPlanInfo(Map<String, Double> gxkmap, List<ProjectPlan> planls, String id) {
 
         double yfdljh = 0.0;
@@ -2101,39 +2069,39 @@ public class GenreSetPushService {
                 Map<String, WindPowerStationTestingPoint2> map;
 
 
-//                WindPowerStationTestingPoint2 yxts = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_YXTS);
-//                WindPowerStationTestingPoint2 djts = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_DJTS);
-//                WindPowerStationTestingPoint2 jxts = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_WHTJ);
-//                WindPowerStationTestingPoint2 tjts = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_GZTJ);
-//                WindPowerStationTestingPoint2 lxts = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_TXZD);
-//
-//                PointData ptValue = realApiUtil.getRealData(yxts);
-//                retValue.put("yxts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-//
-//                ptValue = realApiUtil.getRealData(djts);
-//                retValue.put("djts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-//
-//                ptValue = realApiUtil.getRealData(jxts);
-//                retValue.put("jxts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-//
-//                ptValue = realApiUtil.getRealData(tjts);
-//                retValue.put("tjts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-//
-//                ptValue = realApiUtil.getRealData(lxts);
-//                retValue.put("lxts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-//
-//                if (wpId.endsWith("GDC")) {
-//                    WindPowerStationTestingPoint2 wd = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_FCCFTWD);
-//
-//                    if (StringUtils.notEmp(wd)) {
-//                        ptValue = realApiUtil.getRealData(wd);
-//                        retValue.put("cftwd", StringUtils.round(ptValue.getPointValueInDouble(), 2));
-//                    } else {
-//                        retValue.put("cftwd", 0.0);
-//                    }
-//
-//                }
-                PointData ptValue =null;
+                //                WindPowerStationTestingPoint2 yxts = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_YXTS);
+                //                WindPowerStationTestingPoint2 djts = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_DJTS);
+                //                WindPowerStationTestingPoint2 jxts = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_WHTJ);
+                //                WindPowerStationTestingPoint2 tjts = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_GZTJ);
+                //                WindPowerStationTestingPoint2 lxts = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_TXZD);
+                //
+                //                PointData ptValue = realApiUtil.getRealData(yxts);
+                //                retValue.put("yxts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                //
+                //                ptValue = realApiUtil.getRealData(djts);
+                //                retValue.put("djts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                //
+                //                ptValue = realApiUtil.getRealData(jxts);
+                //                retValue.put("jxts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                //
+                //                ptValue = realApiUtil.getRealData(tjts);
+                //                retValue.put("tjts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                //
+                //                ptValue = realApiUtil.getRealData(lxts);
+                //                retValue.put("lxts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                //
+                //                if (wpId.endsWith("GDC")) {
+                //                    WindPowerStationTestingPoint2 wd = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_FCCFTWD);
+                //
+                //                    if (StringUtils.notEmp(wd)) {
+                //                        ptValue = realApiUtil.getRealData(wd);
+                //                        retValue.put("cftwd", StringUtils.round(ptValue.getPointValueInDouble(), 2));
+                //                    } else {
+                //                        retValue.put("cftwd", 0.0);
+                //                    }
+                //
+                //                }
+                PointData ptValue = null;
 
                 WindPowerStationTestingPoint2 glpoint = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL);
                 ptValue = realApiUtil.getRealData(glpoint.getCode());
@@ -2188,7 +2156,7 @@ public class GenreSetPushService {
                     retValue.put("hb", 1385.0);
                     ptValue = realApiUtil.getRealData(ConstantTR.XHFS);
                     retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-                }  else if (wpId.equals(WpEnum.HZJ_GDC.name())) {
+                } else if (wpId.equals(WpEnum.HZJ_GDC.name())) {
                     ptValue = realApiUtil.getRealData(ConstantTR.HZJWD);
                     retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
                     retValue.put("hb", 1385.0);
@@ -2205,17 +2173,17 @@ public class GenreSetPushService {
                 }
 
             }
-            resultmap.put(wpId,retValue);
+            resultmap.put(wpId, retValue);
         }
         return resultmap;
     }
 
-    public  Map<String,Object> getWeatherRealDay5Info(String wpId) throws Exception {
-        Map<String,Object> map=new HashMap<>();
+    public Map<String, Object> getWeatherRealDay5Info(String wpId) throws Exception {
+        Map<String, Object> map = new HashMap<>();
         if (StringUtils.notEmp(wpId)) {
 
 
-            map= weatherDay5Service.getWeatherRealDay5Info(wpId);
+            map = weatherDay5Service.getWeatherRealDay5Info(wpId);
 
         }
         return map;

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 28 - 26
src/main/resources/application.yml