Quellcode durchsuchen

修正功率曲线

shilin vor 3 Jahren
Ursprung
Commit
d22b64170c
23 geänderte Dateien mit 814 neuen und 370 gelöschten Zeilen
  1. 195 0
      src/main/java/com/gyee/frame/common/conf/ZmConfig.java
  2. 7 4
      src/main/java/com/gyee/frame/common/spring/Constant.java
  3. 5 5
      src/main/java/com/gyee/frame/common/spring/InitialRunner.java
  4. 22 5
      src/main/java/com/gyee/frame/controller/health/StopAnalysisController.java
  5. 4 2
      src/main/java/com/gyee/frame/service/StopAnalysisDetailService.java
  6. 2 2
      src/main/java/com/gyee/frame/service/StopAnalysismainService.java
  7. 1 1
      src/main/java/com/gyee/frame/service/report/WtHealthReportService.java
  8. 110 50
      src/main/java/com/gyee/frame/service/stopanalysis/StopAnalysisStaticService.java
  9. 28 4
      src/main/java/com/gyee/frame/service/weather/WeatherService.java
  10. 51 19
      src/main/java/com/gyee/frame/service/websocket/GeneralAppearancePushService.java
  11. 2 2
      src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java
  12. 20 4
      src/main/java/com/gyee/frame/service/websocket/MatrixPushByWpService.java
  13. 3 3
      src/main/java/com/gyee/frame/service/websocket/MatrixPushService.java
  14. 285 261
      src/main/java/com/gyee/frame/service/websocket/RealPowerPushService.java
  15. 31 0
      src/main/java/com/gyee/frame/util/DateUtils.java
  16. 25 1
      src/main/resources/application.yml
  17. BIN
      src/main/resources/static/syz/dwk_zm.xls
  18. BIN
      src/main/resources/static/syz/pleq_zm.xls
  19. BIN
      src/main/resources/static/syz/plyq_zm.xls
  20. BIN
      src/main/resources/static/syz/xh_zm.xls
  21. 1 1
      src/test/java/test/HealthTest.java
  22. 13 3
      src/test/java/test/MatrixByWpPushTest.java
  23. 9 3
      src/test/java/test/StopAnalysisTest.java

+ 195 - 0
src/main/java/com/gyee/frame/common/conf/ZmConfig.java

@@ -0,0 +1,195 @@
+package com.gyee.frame.common.conf;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * 预警配置
+ */
+@Component
+@ConfigurationProperties(prefix = "zmconfig")
+public class ZmConfig {
+
+
+    private static List<String> mhskey;
+    private static List<String> mhspoint;
+    private static List<String> nsskey;
+    private static List<String> nsspoint;
+    private static List<String> qskey;
+    private static List<String> qspoint;
+    private static List<String> sbqkey;
+    private static List<String> sbqpoint;
+    private static List<String> xskey;
+    private static List<String> xspoint;
+    private static List<String> dwkkey;
+    private static List<String> dwkpoint;
+    private static List<String> plyqkey;
+    private static List<String> plyqpoint;
+    private static List<String> pleqkey;
+    private static List<String> pleqpoint;
+    private static List<String> mchkey;
+    private static List<String> mchpoint;
+    private static List<String> xhkey;
+    private static List<String> xhpoint;
+    public static List<String> getMhskey() {
+        return mhskey;
+    }
+
+    public static List<String> getNsskey() {
+        return nsskey;
+    }
+
+    public  void setNsskey(List<String> nsskey) {
+        ZmConfig.nsskey = nsskey;
+    }
+
+    public static List<String> getNsspoint() {
+        return nsspoint;
+    }
+
+    public  void setNsspoint(List<String> nsspoint) {
+        ZmConfig.nsspoint = nsspoint;
+    }
+
+    public static List<String> getQskey() {
+        return qskey;
+    }
+
+    public  void setQskey(List<String> qskey) {
+        ZmConfig.qskey = qskey;
+    }
+
+    public static List<String> getQspoint() {
+        return qspoint;
+    }
+
+    public  void setQspoint(List<String> qspoint) {
+        ZmConfig.qspoint = qspoint;
+    }
+
+    public static List<String> getSbqkey() {
+        return sbqkey;
+    }
+
+    public  void setSbqkey(List<String> sbqkey) {
+        ZmConfig.sbqkey = sbqkey;
+    }
+
+    public static List<String> getSbqpoint() {
+        return sbqpoint;
+    }
+
+    public  void setSbqpoint(List<String> sbqpoint) {
+        ZmConfig.sbqpoint = sbqpoint;
+    }
+
+    public static List<String> getXskey() {
+        return xskey;
+    }
+
+    public  void setXskey(List<String> xskey) {
+        ZmConfig.xskey = xskey;
+    }
+
+    public static List<String> getXspoint() {
+        return xspoint;
+    }
+
+    public  void setXspoint(List<String> xspoint) {
+        ZmConfig.xspoint = xspoint;
+    }
+
+    public static List<String> getDwkkey() {
+        return dwkkey;
+    }
+
+    public  void setDwkkey(List<String> dwkkey) {
+        ZmConfig.dwkkey = dwkkey;
+    }
+
+    public static List<String> getDwkpoint() {
+        return dwkpoint;
+    }
+
+    public  void setDwkpoint(List<String> dwkpoint) {
+        ZmConfig.dwkpoint = dwkpoint;
+    }
+
+    public static List<String> getPlyqkey() {
+        return plyqkey;
+    }
+
+    public  void setPlyqkey(List<String> plyqkey) {
+        ZmConfig.plyqkey = plyqkey;
+    }
+
+    public static List<String> getPlyqpoint() {
+        return plyqpoint;
+    }
+
+    public  void setPlyqpoint(List<String> plyqpoint) {
+        ZmConfig.plyqpoint = plyqpoint;
+    }
+
+    public static List<String> getPleqkey() {
+        return pleqkey;
+    }
+
+    public  void setPleqkey(List<String> pleqkey) {
+        ZmConfig.pleqkey = pleqkey;
+    }
+
+    public static List<String> getPleqpoint() {
+        return pleqpoint;
+    }
+
+    public  void setPleqpoint(List<String> pleqpoint) {
+        ZmConfig.pleqpoint = pleqpoint;
+    }
+
+    public static List<String> getMchkey() {
+        return mchkey;
+    }
+
+    public  void setMchkey(List<String> mchkey) {
+        ZmConfig.mchkey = mchkey;
+    }
+
+    public static List<String> getMchpoint() {
+        return mchpoint;
+    }
+
+    public  void setMchpoint(List<String> mchpoint) {
+        ZmConfig.mchpoint = mchpoint;
+    }
+
+    public static List<String> getXhkey() {
+        return xhkey;
+    }
+
+    public  void setXhkey(List<String> xhkey) {
+        ZmConfig.xhkey = xhkey;
+    }
+
+    public static List<String> getXhpoint() {
+        return xhpoint;
+    }
+
+    public  void setXhpoint(List<String> xhpoint) {
+        ZmConfig.xhpoint = xhpoint;
+    }
+
+    public  void setMhskey(List<String> mhskey) {
+        ZmConfig.mhskey = mhskey;
+    }
+
+    public static List<String> getMhspoint() {
+        return mhspoint;
+    }
+
+    public  void setMhspoint(List<String> mhspoint) {
+        ZmConfig.mhspoint = mhspoint;
+    }
+}

Datei-Diff unterdrückt, da er zu groß ist
+ 7 - 4
src/main/java/com/gyee/frame/common/spring/Constant.java


+ 5 - 5
src/main/java/com/gyee/frame/common/spring/InitialRunner.java

@@ -116,14 +116,14 @@ public class InitialRunner implements CommandLineRunner {
         //配置追加功率曲线测点
         Map<String, Object> ycmap = new HashMap<>();
 
-        String[] ycPoints3 = Constant.TPOINT_QS3_YGCL4.split(",");
-        String[] ycPoints72 = Constant.TPOINT_QS3_YGCL72.split(",");
+        String[] ycPoints4 = Constant.TPOINT_QS3_YGCL4.split(",");
+        String[] ycPoints24 = Constant.TPOINT_QS3_YGCL24.split(",");
         //添加预测风速第一个点,存储到当前的历史值
         ycmap.put("cdq1", "SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ001");
-        ycmap.put("dq1","SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ001");//SLFGL.NX_GD_QSF_YC_P1_L1_001_DQ0001
+        ycmap.put("dq1","SLFGL.NX_GD_QSF_YC_P1_L1_001_DQ0001");
         //添加预测功率后续预测点字符串数组,实时数据
-        ycmap.put("cdq2", ycPoints3);
-        ycmap.put("dq2", ycPoints72);
+        ycmap.put("cdq2", ycPoints4);
+        ycmap.put("dq2", ycPoints24);
 
         appendYcglMap.put("QS_FDC", ycmap);
 

+ 22 - 5
src/main/java/com/gyee/frame/controller/health/StopAnalysisController.java

@@ -25,7 +25,7 @@ import java.util.List;
 public class StopAnalysisController {
 
     @Resource
-    private StopAnalysisStaticService stopAnalysisService;
+    private StopAnalysisStaticService stopAnalysisStaticService;
 
 
     @PostMapping("/stopAnalysisList")
@@ -42,7 +42,7 @@ public class StopAnalysisController {
         if (StringUtils.notEmp(wpId) && StringUtils.notEmp(modelId)&& StringUtils.notEmp(typeId))
         {
 
-            vos=stopAnalysisService.stopAnalysisList(wpId, modelId, typeId);
+            vos=stopAnalysisStaticService.stopAnalysisList(wpId, modelId, typeId);
         }
 
         if (null!=vos) {
@@ -59,13 +59,13 @@ public class StopAnalysisController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "wtId", value = "风场编号", required = true, dataType = "string", paramType = "query")})
 
-    public AjaxResult stopAnalysisTree( String wtId) throws Exception {
+    public AjaxResult stopAnalysisTree( String mainId,String wtId, String values) throws Exception {
 
         List<StopAnalysisNodeVo> vos = new ArrayList<StopAnalysisNodeVo>();
-        if (StringUtils.notEmp(wtId))
+        if (StringUtils.notEmp(mainId) && StringUtils.notEmp(wtId) && StringUtils.notEmp(values))
         {
 
-            vos=stopAnalysisService.findLocationTreeByWtId(wtId);
+            vos=stopAnalysisStaticService.findLocationTreeByWtId(mainId,wtId,values);
         }
 
         if (null!=vos) {
@@ -76,4 +76,21 @@ public class StopAnalysisController {
 
     }
 
+    @PostMapping("/saveStopAnalysis")
+    @ResponseBody
+    @ApiOperation(value = "保存故障诊断结果", notes = "保存故障诊断结果")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "modelId", value = "模型编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "typeId", value = "时间类型", required = true, dataType = "string", paramType = "query")})
+
+        public AjaxResult saveStopAnalysis( String wpId, String modelId, String typeId) throws Exception {
+
+
+        stopAnalysisStaticService.saveStopAnalysis(wpId, modelId, typeId);
+
+        return AjaxResult.successData(AjaxStatus.success.code, "保存成功!");
+
+    }
+
 }

+ 4 - 2
src/main/java/com/gyee/frame/service/StopAnalysisDetailService.java

@@ -107,14 +107,16 @@ public class StopAnalysisDetailService implements BaseService<StopAnalysisDetail
 			{
 				StopAnalysisDetail po=new StopAnalysisDetail();
 
-				po.setId(vo.getId());
+
 				po.setMainid(mainId);
 				po.setPid(vo.getPid());
 				po.setName(vo.getName());
 				po.setJudegvulue(vo.getJudegvulue());
 				po.setUrl(vo.getUrl());
 				po.setIsparent(vo.getIsparent());
-				stopAnalysisDetailMapper.insert(po);
+				po.setWtid(vo.getWtid());
+				po.setRid(vo.getId());
+				insertSelective(po);
 			}
 		}
 

+ 2 - 2
src/main/java/com/gyee/frame/service/StopAnalysismainService.java

@@ -105,13 +105,13 @@ public class StopAnalysismainService implements BaseService<StopAnalysismain, St
 			{
 				StopAnalysismain po=new StopAnalysismain();
 
-				po.setId(vo.getId());
+//				po.setId(vo.getId());
 				po.setMainid(mainId);
 				po.setModelid(vo.getModelid());
 				po.setWtid(vo.getWtid());
 				po.setJudegvulue(vo.getJudegvulue());
 
-				stopAnalysismainMapper.insert(po);
+				insertSelective(po);
 			}
 		}
 

+ 1 - 1
src/main/java/com/gyee/frame/service/report/WtHealthReportService.java

@@ -53,7 +53,7 @@ public class WtHealthReportService{
 			{
 				WtReportMain wtrm=wtrmls.get(0);
 				map.put("main",wtrm);
-				List<WtReportSub>  wtrmsubls=wtReportSubService.healthReportsub(wtrm.getId());
+				List<WtReportSub>  wtrmsubls=wtReportSubService.findWtReportSubList(wtrm.getId());
 
 				map.put("sub",wtrmsubls);
 

+ 110 - 50
src/main/java/com/gyee/frame/service/stopanalysis/StopAnalysisStaticService.java

@@ -60,11 +60,22 @@ public class StopAnalysisStaticService {
             if (typeId.equals("1")) {
                 List<String> wtidls = new ArrayList<String>();
                 List<String> codejkls = new ArrayList<String>();
+                List<String> clxjkls = new ArrayList<String>();
+                List<String> fdjjkls = new ArrayList<String>();
+                List<String> bjjkls = new ArrayList<String>();
+                List<String> zkjkls = new ArrayList<String>();
                 List<String> codeztls = new ArrayList<String>();
                 for (Windturbine wt : wtls) {
-
+//                    public static final String CLXJKZT = "JKZT002";// 齿轮箱健康状态
+//                    public static final String FDJJKZT = "JKZT003";// 发电机健康状态
+//                    public static final String BJJKZT = "JKZT004";// 变桨健康
+//                    public static final String ZKJKZT = "JKZT005";// 主控健康状态
                     wtidls.add(wt.getId());
-                    codejkls.add(Constant.FJJKZZ);
+                    codejkls.add(Constant.FJJKZT);
+                    clxjkls.add(Constant.CLXJKZT);
+                    fdjjkls.add(Constant.FDJJKZT);
+                    bjjkls.add(Constant.BJJKZT);
+                    zkjkls.add(Constant.ZKJKZT);
                     codeztls.add(Constant.FJZT);
 
                 }
@@ -72,6 +83,11 @@ public class StopAnalysisStaticService {
                 String[] jkpoints = new String[wtidls.size()];
                 String[] ztpoints = new String[wtidls.size()];
 
+                String[] clxpoints = new String[wtidls.size()];
+                String[] fdjpoints = new String[wtidls.size()];
+                String[] bjpoints = new String[wtidls.size()];
+                String[] zkpoints = new String[wtidls.size()];
+
                 // 获得训练参数对象
                 for (int x = 0; x < wtidls.size(); x++) {
 
@@ -79,6 +95,14 @@ public class StopAnalysisStaticService {
                     jkpoints[x] = ai1.getId();
                     WindTurbineTestingPointAi2 ai2 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtidls.get(x), codeztls.get(x));
                     ztpoints[x] = ai2.getId();
+                    WindTurbineTestingPointAi2 ai3 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtidls.get(x), clxjkls.get(x));
+                    clxpoints[x] = ai3.getId();
+                    WindTurbineTestingPointAi2 ai4 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtidls.get(x), fdjjkls.get(x));
+                    fdjpoints[x] = ai4.getId();
+                    WindTurbineTestingPointAi2 ai5 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtidls.get(x), bjjkls.get(x));
+                    bjpoints[x] = ai5.getId();
+                    WindTurbineTestingPointAi2 ai6 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtidls.get(x), zkjkls.get(x));
+                    zkpoints[x] = ai6.getId();
 
                 }
 
@@ -87,25 +111,34 @@ public class StopAnalysisStaticService {
                 // 获得风机实时状态结果数组
                 DNAVal[] ztvalues = realApiUtil.getRealtimeTagValues(ztpoints);
 
+                DNAVal[] clxvalues = realApiUtil.getRealtimeTagValues(clxpoints);
+                DNAVal[] fdjvalues = realApiUtil.getRealtimeTagValues(fdjpoints);
+                DNAVal[] bjvalues = realApiUtil.getRealtimeTagValues(bjpoints);
+                DNAVal[] zkvalues = realApiUtil.getRealtimeTagValues(zkpoints);
+
+
                 for (int x = 0; x < wtls.size(); x++) {
                     Windturbine wt = wtls.get(x);
                     String wtId = wt.getId();
                     double jk = jkvalues[x].DValue;
                     double zt = ztvalues[x].DValue;
+                    double clx = clxvalues[x].DValue;
+                    double fdj = fdjvalues[x].DValue;
+                    double bj = bjvalues[x].DValue;
+                    double zk = zkvalues[x].DValue;
                     StopAnalysismainVo vo = new StopAnalysismainVo();
                     vo.setWtid(wt.getId());
                     vo.setModelid(wt.getModelid());
                     if (zt == 2.0) {
                         vo.setModelid(GZ);
                     } else {
-                        vo.setJudegvulue(getJudgeVaue(jk));
+                        vo.setJudegvulue(getJudgeVaue(clx,fdj,bj,zk));
                     }
                     //添加雪花主键id
                     String id=SnowflakeIdWorker.getUUID();
                     vo.setId(id);
                     stopAnalysismainVoService.insertSelective(vo);
 
-                    saveLocationTreeByWtId(id,wtId,vo.getJudegvulue());
                     vos.add(vo);
                 }
 
@@ -124,36 +157,49 @@ public class StopAnalysisStaticService {
                     StopAnalysismainVo vo = new StopAnalysismainVo();
                     vo.setWtid(wt.getId());
                     vo.setModelid(wt.getModelid());
-
-                    WindTurbineTestingPointAi2 ai1 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.FJJKZZ);
-                    List<PointData> pointls = realApiUtil.getHistoryDatasSnap(ai1, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) 10, 60L);
-
-                    if (!pointls.isEmpty()) {
+//                    public static final String CLXJKZT = "JKZT002";// 齿轮箱健康状态
+//                    public static final String FDJJKZT = "JKZT003";// 发电机健康状态
+//                    public static final String BJJKZT = "JKZT004";// 变桨健康
+//                    public static final String ZKJKZT = "JKZT005";// 主控健康状态
+                    WindTurbineTestingPointAi2 ai1 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.CLXJKZT);
+                    List<PointData> pointls1 = realApiUtil.getHistoryDatasSnap(ai1, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) 10, 60L);
+                    WindTurbineTestingPointAi2 ai2 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.FDJJKZT);
+                    List<PointData> pointls2 = realApiUtil.getHistoryDatasSnap(ai1, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) 10, 60L);
+                    WindTurbineTestingPointAi2 ai3 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.BJJKZT);
+                    List<PointData> pointls3 = realApiUtil.getHistoryDatasSnap(ai1, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) 10, 60L);
+                    WindTurbineTestingPointAi2 ai4 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.ZKJKZT);
+                    List<PointData> pointls4 = realApiUtil.getHistoryDatasSnap(ai1, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) 10, 60L);
+
+
+                    if (!pointls1.isEmpty() && !pointls2.isEmpty() && !pointls3.isEmpty() &&!pointls4.isEmpty()) {
                         double csl = 0.0;
                         double lsl = 0.0;
                         double ysl = 0.0;
-                        for (PointData point : pointls) {
-                            double jk = point.getPointValueInDouble();
+                        for (int i=0;i<pointls1.size();i++) {
 
-                            if (jk == 4.0) {
+                            PointData point1=pointls1.get(i);
+                            PointData point2=pointls2.get(i);
+                            PointData point3=pointls3.get(i);
+                            PointData point4=pointls4.get(i);
 
-                                csl++;
-                                break;
-                            } else if (jk == 3.0) {
+                            double clx = point1.getPointValueInDouble();
+                            double fdj = point2.getPointValueInDouble();
+                            double bj = point3.getPointValueInDouble();
+                            double zk = point4.getPointValueInDouble();
 
+                            String state=getJudgeVaue(clx,fdj,bj,zk);
+                            if (state.equals(GZ)) {
+                                csl++;
+                            } else if (state.equals(ZY)) {
                                 lsl++;
-                            } else if (jk == 2.0 || jk == 1.0) {
-
-                                ysl++;
                             } else {
-
                                 ysl++;
                             }
                         }
 
-                        if (csl != 0) {
+                        if (csl >=2) {
                             vo.setJudegvulue(GZ);
-                        } else if (lsl >= ysl) {
+                        } else if (lsl>= 4) {
                             vo.setJudegvulue(ZY);
                         } else {
                             vo.setJudegvulue(ZC);
@@ -166,7 +212,7 @@ public class StopAnalysisStaticService {
                     String id=SnowflakeIdWorker.getUUID();
                     vo.setId(id);
                     stopAnalysismainVoService.insertSelective(vo);
-                    saveLocationTreeByWtId(id,wtId,vo.getJudegvulue());
+
                     vos.add(vo);
                 }
 
@@ -176,27 +222,38 @@ public class StopAnalysisStaticService {
         return vos;
     }
 
+    private String getJudgeVaue(double clx,double fdj,double bj,double zk) {
+        double total=clx+fdj+bj+zk;
+        if (clx==4|| fdj==4|| bj==4|| zk==4) {
+            return GZ;
+        } else if (clx==3|| fdj==3|| bj==3|| zk==3) {
+            return ZY;
+        } else {
+            return ZC;
+        }
+    }
+
     private String getJudgeVaue(double values) {
-        if (values >= 60) {
+        if (values<=2.0) {
             return ZC;
-        } else if (values < 60 && values >= 30) {
+        } else if (values== 3) {
             return ZY;
         } else {
             return GZ;
         }
-
-
     }
 
 
 
-    private List<StopAnalysisNodeVo> saveLocationTreeByWtId(String mainId,String wtId, String values) throws Exception {
+    private List<StopAnalysisDetailVo> saveLocationTreeByWtId(String mainId,String wtId, String values) throws Exception {
 
-        List<StopAnalysisNodeVo> vos = new ArrayList<>();
+        List<StopAnalysisDetailVo> nodes = new ArrayList<StopAnalysisDetailVo>();
         if (StringUtils.notEmp(wtId)) {
 
 
             List<String> codels = new ArrayList<String>();
+
+
             codels.add(Constant.CLXJKZT);
             codels.add(Constant.FDJJKZT);
             codels.add(Constant.BJJKZT);
@@ -216,14 +273,14 @@ public class StopAnalysisStaticService {
 
 
             //随机生成诊断等级
-            if (values.equals(2)) {
+            if (values.equals(ZY)) {
                 Random random = new SecureRandom();
                 int index = random.nextInt(4);
-                jkvalues[index].DValue = 50.0;
-            } else if (values.equals(3)) {
+                jkvalues[index].DValue = 3;
+            } else if (values.equals(GZ)) {
                 Random random = new SecureRandom();
                 int index = random.nextInt(4);
-                jkvalues[index].DValue = 20.0;
+                jkvalues[index].DValue = 4;
             }
 
             String clxzt = getJudgeVaue(jkvalues[0].DValue);
@@ -240,7 +297,7 @@ public class StopAnalysisStaticService {
 
                 List<EquipmentSql> eqls = equipmentSqlService.getEquipmentListByLocation(wt.getLocation());
                 if (!eqls.isEmpty()) {
-                    List<StopAnalysisDetailVo> nodes = new ArrayList<StopAnalysisDetailVo>();
+
                     for (EquipmentSql eq : eqls) {
                         StopAnalysisDetailVo node = new StopAnalysisDetailVo();
                         node.setId(eq.getLocation());
@@ -267,7 +324,7 @@ public class StopAnalysisStaticService {
             }
         }
 
-        return vos;
+        return nodes;
     }
 
 
@@ -278,36 +335,39 @@ public class StopAnalysisStaticService {
      *
      * @return
      */
-    public List<StopAnalysisNodeVo> findLocationTreeByWtId(String wtId) throws Exception {
+    public List<StopAnalysisNodeVo> findLocationTreeByWtId(String mainId,String wtId, String values) throws Exception {
 
         List<StopAnalysisNodeVo> vos = new ArrayList<>();
         if (StringUtils.notEmp(wtId)) {
 
             List<StopAnalysisDetailVo> list=stopAnalysisDetailVoService.findStopAnalysisDetailVoList(wtId);
-            if(!list.isEmpty())
+            if(list.isEmpty())
             {
-                List<StopAnalysisNodeVo> nodes = new ArrayList<StopAnalysisNodeVo>();
-                for(StopAnalysisDetailVo eq:list)
-                {
-                    StopAnalysisNodeVo node=new StopAnalysisNodeVo();
-                    node.setId(eq.getId());
-                    node.setPid(eq.getPid());
-                    node.setName(eq.getName());
-                    node.setJudegVulue(eq.getJudegvulue());
-                    //	node.setOpen(true);
-                    nodes.add(node);
-                }
+                list=saveLocationTreeByWtId(mainId,wtId, values);
 
-                StopAnalysisTreeUtil treeUtil=new StopAnalysisTreeUtil(nodes);
-                vos=treeUtil.buildJSONTree();
             }
 
+            List<StopAnalysisNodeVo> nodes = new ArrayList<StopAnalysisNodeVo>();
+            for(StopAnalysisDetailVo eq:list)
+            {
+                StopAnalysisNodeVo node=new StopAnalysisNodeVo();
+                node.setId(eq.getId());
+                node.setPid(eq.getPid());
+                node.setName(eq.getName());
+                node.setJudegVulue(eq.getJudegvulue());
+                //	node.setOpen(true);
+                nodes.add(node);
+            }
+
+            StopAnalysisTreeUtil treeUtil=new StopAnalysisTreeUtil(nodes);
+            vos=treeUtil.buildJSONTree();
+
         }
 
         return vos;
     }
 
-    public void saveAnalysisList(String wpId, String modelId, String typeId)
+    public void saveStopAnalysis(String wpId, String modelId, String typeId)
     {
         StopAnalysis stopAnalysis=new StopAnalysis();
        //添加雪花主键id

+ 28 - 4
src/main/java/com/gyee/frame/service/weather/WeatherService.java

@@ -7,10 +7,8 @@ import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.auto.Line;
 import com.gyee.frame.model.auto.Project;
 import com.gyee.frame.model.auto.Windpowerstation;
-import com.gyee.frame.model.custom.weather.Main;
-import com.gyee.frame.model.custom.weather.Weather;
-import com.gyee.frame.model.custom.weather.WeatherReal;
-import com.gyee.frame.model.custom.weather.Wind;
+import com.gyee.frame.model.custom.weather.*;
+import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.MathUtil;
 import com.gyee.frame.util.StringUtils;
 import org.springframework.stereotype.Service;
@@ -131,6 +129,32 @@ public class WeatherService  {
 
 					}
 
+					if(null!=weatherReal.getCoord())
+					{
+						Coord coord=weatherReal.getCoord();
+						map.put("jingdu",coord.getLon());
+						map.put("weidu",coord.getLat());
+					}
+
+					if(null!=weatherReal.getClouds())
+					{
+						Clouds clouds=weatherReal.getClouds();
+
+						map.put("yunliang",clouds.getAll());
+					}
+
+					if(null!=weatherReal.getSys())
+					{
+						Sys sys=weatherReal.getSys();
+						if(StringUtils.notEmp(sys.getSunrise()))
+						{
+							map.put("richushijian", DateUtils.utcToLocal(String.valueOf(sys.getSunrise())));
+						}
+						if(StringUtils.notEmp(sys.getSunset()))
+						{
+							map.put("riluoshijian",DateUtils.utcToLocal(String.valueOf(sys.getSunset())));
+						}
+					}
 
 					if(null!=weatherReal.getWind())
 					{

+ 51 - 19
src/main/java/com/gyee/frame/service/websocket/GeneralAppearancePushService.java

@@ -2,8 +2,10 @@ package com.gyee.frame.service.websocket;
 
 
 import com.gyee.SpringbootStart;
+import com.gyee.frame.common.conf.ZmConfig;
 import com.gyee.frame.model.custom.PointData;
 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.*;
@@ -122,30 +124,60 @@ public class GeneralAppearancePushService {
     public Map<String, Object> findPowerMap(String wpId) throws Exception {
 
         Map<String, Object> map = new HashMap<>();
+
+
         List<String> namels = new ArrayList<>();
         List<String> valuels = new ArrayList<>();
-        Workbook wb = openExcelByFile(wpId);
 
-        if (StringUtils.notEmp(wb)) {
-            Sheet sheet = wb.getSheetAt(0);//第一个
+        if (StringUtils.notEmp(wpId)) {
+
+            switch (wpId) {
+                case "MHS_FDC":
+                    namels= ZmConfig.getMhskey();
+                    valuels= ZmConfig.getMhspoint();
+                    break;
+                case "NSS_FDC":
+                    namels= ZmConfig.getNsskey();
+                    valuels= ZmConfig.getNsspoint();
+                    break;
+                case "QS_FDC":
+                    namels= ZmConfig.getQskey();
+                    valuels= ZmConfig.getQspoint();
+                    break;
+                case "SBQ_FDC":
+                    namels= ZmConfig.getSbqkey();
+                    valuels= ZmConfig.getSbqpoint();
+                    break;
+                case "XS_FDC":
+                    namels= ZmConfig.getXskey();
+                    valuels= ZmConfig.getXspoint();
+                    break;
+                case "DWK_GDC":
+                    namels= ZmConfig.getDwkkey();
+                    valuels= ZmConfig.getDwkpoint();
+                    break;
+                case "PL01_GC":
+                    namels= ZmConfig.getPlyqkey();
+                    valuels= ZmConfig.getPlyqpoint();
+                    break;
+                case "PL02_GC":
+                    namels= ZmConfig.getPleqkey();
+                    valuels= ZmConfig.getPleqpoint();
+                    break;
+                case "MCH_GDC":
+                    namels= ZmConfig.getMchkey();
+                    valuels= ZmConfig.getMchpoint();
+                    break;
+                case "XH_GDC":
+                    namels= ZmConfig.getXhkey();
+                    valuels= ZmConfig.getXhpoint();
+                    break;
+
+                default:
 
-            boolean firstRow = true;
-            for (int i = sheet.getFirstRowNum(); i <= sheet.getLastRowNum(); i++) {
-                if (i == 0) {
-                    continue;
-                }
-                Row row = sheet.getRow(i);
-                Cell cell0 = row.getCell(0);
-                Cell cell1 = row.getCell(1);
-                if (StringUtils.notEmp(cell0) && StringUtils.notEmp(cell1)) {
-                    String pointName = cell0.getStringCellValue(); //点名
-                    String pointValue = cell1.getStringCellValue(); //点值
-                   // System.out.println(pointName + "*********" + pointValue);
-                    namels.add(pointName);
-                    valuels.add(pointValue);
-                }
             }
 
+
             if (!valuels.isEmpty()) {
                 List<PointData> pointlist = realApiUtil.getRealData(valuels);
 
@@ -154,7 +186,7 @@ public class GeneralAppearancePushService {
 
                     for (int i = 0; i < pointlist.size(); i++) {
 
-                        map.put(namels.get(i), pointlist.get(i).getPointValueInDouble());
+                        map.put(namels.get(i), MathUtil.twoBit(pointlist.get(i).getPointValueInDouble()));
                     }
 
                 }

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

@@ -436,10 +436,10 @@ public class GenreSetPushService {
                         double fs=(double)wh.get("fs");
 
                         if (speedmap.containsKey(fs)) {
-                            int temp = speedmap.get(fs) + 4;
+                            int temp = speedmap.get(fs) + 6;
                             speedmap.put(fs, temp);
                         } else {
-                            speedmap.put(fs, 4);
+                            speedmap.put(fs, 6);
                         }
 
                     }

+ 20 - 4
src/main/java/com/gyee/frame/service/websocket/MatrixPushByWpService.java

@@ -367,8 +367,18 @@ public class MatrixPushByWpService {
             {
                 Map<String, Object> jczbmap = new HashMap<>();
 
-                Windpowerstation wp= InitialRunner.wpmap.get(wpId);
-                jczbmap.put("name",wp.getName());
+
+                if(InitialRunner.wpmap.containsKey(wpId))
+                {
+                    Windpowerstation wp= InitialRunner.wpmap.get(wpId);
+                    jczbmap.put("name",wp.getName());
+                }else if(InitialRunner.pjmap.containsKey(wpId))
+                {
+                    Project wp= InitialRunner.pjmap.get(wpId);
+                    jczbmap.put("name",wp.getName());
+                }
+
+
                 /*************************************************风场指标统计*************************************************************/
 
 
@@ -719,8 +729,14 @@ public class MatrixPushByWpService {
 
 /*************************************************风机指标统计*************************************************************/
                 List<String> fjzbls = new ArrayList<>();
-
-                List<Windturbine> wtls=InitialRunner.wp_wtmap.get(wpId);
+                List<Windturbine> wtls=new ArrayList<>();
+                if(InitialRunner.wp_wtmap.containsKey(wpId))
+                {
+                    wtls=InitialRunner.wp_wtmap.get(wpId);
+                }else
+                {
+                    wtls=InitialRunner.pj_wtmap.get(wpId);
+                }
 
                 // Map<String, MatrixVo> vomap = new HashMap<>();
                 List<MatrixVo> vos = new ArrayList<>();

+ 3 - 3
src/main/java/com/gyee/frame/service/websocket/MatrixPushService.java

@@ -243,9 +243,9 @@ public class MatrixPushService {
 
 
                     double fjzt = MathUtil.twoBit(fjzblist.get(i * step).getPointValueInDouble());
-                    if (fjzt == 6) {
-                        slts++;
-                    }
+//                    if (fjzt == 6) {
+//                        slts++;
+//                    }
                     vo.setFjzt(fjzt);
                     vo.setFs(MathUtil.twoBit(fjzblist.get(i * step + 1).getPointValueInDouble()));
                     vo.setGl(MathUtil.twoBit(fjzblist.get(i * step + 2).getPointValueInDouble()));

+ 285 - 261
src/main/java/com/gyee/frame/service/websocket/RealPowerPushService.java

@@ -6,10 +6,8 @@ import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.auto.*;
 import com.gyee.frame.model.custom.DataVo;
 import com.gyee.frame.model.custom.PointData;
-import com.gyee.frame.service.ProjectPlanService;
 import com.gyee.frame.service.WindPowerstationTestingPointService;
 import com.gyee.frame.service.WindTurbineTestingPointAiService;
-import com.gyee.frame.service.WindpowerinfodayService;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
 import com.gyee.frame.util.RealTimeDataBaseFactory;
@@ -28,10 +26,6 @@ public class RealPowerPushService {
     @Resource
     private WindPowerstationTestingPointService windPowerstationTestingPointService;
     @Resource
-    private WindpowerinfodayService windpowerinfodayService;
-    @Resource
-    private ProjectPlanService projectPlanService;
-    @Resource
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
 
     private final String QS = "0";
@@ -50,9 +44,9 @@ public class RealPowerPushService {
         map.put(QS, findRealPower(QS));
         map.put(FD, findRealPower(FD));
         map.put(GF, findRealPower(GF));
-//        map.put("QS_FDC",findRealPower("QS_FDC"));
-//        map.put("QSQ02_GC",findRealPower("QSQ02_GC"));
-//        map.put("QSQ05_XL",findRealPower("QSQ05_XL"));
+        map.put("QS_FDC",findRealPower("QS_FDC"));
+        map.put("QSQ02_GC",findRealPower("QSQ02_GC"));
+        map.put("QSQ05_XL",findRealPower("QSQ05_XL"));
 
         return map;
 
@@ -106,7 +100,7 @@ public class RealPowerPushService {
 
             cal.setTime(currentDate);
 
-            if (cal.get(Calendar.MINUTE) > 45) {
+            if (cal.get(Calendar.MINUTE) > 30) {
                 cal.set(Calendar.MINUTE, 0);
                 cal.add(Calendar.HOUR_OF_DAY, 1);
             } else {
@@ -116,21 +110,22 @@ public class RealPowerPushService {
             Date endDate = cal.getTime();
 
             long pried = 3600l;
-            long pried72 = 3600l;
-            long num = DateUtils.hoursDiff(beginDate, endDate);
+            long num = DateUtils.hoursDiff(beginDate, endDate) ;
             int cdqyc = 4; //未来4小时超短期预测
-            String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
-            String[] ycPoints2 = Constant.TPOINT_WP_FGLYC2.split(",");
-
-            String[] ycPoints4 = Constant.TPOINT_WP_FGLYC4.split(",");
-            String[] ycPoints5 = Constant.TPOINT_WP_FGLYC5.split(",");
+            String[] ycPoints1 = Constant.TPOINT_WP_FGLCDQ1.split(",");
+            String[] ycPoints2 = Constant.TPOINT_WP_FGLCDQ2.split(",");
+            int dqyc = 24; //未来24小时超短期预测
+            String[] ycDqPoints1 = Constant.TPOINT_WP_FGLDQ1.split(",");
+            String[] ycDqPoints2 = Constant.TPOINT_WP_FGLDQ2.split(",");
             //String[] ycPoints3 = Constant.TPOINT_QS3_YGCL.split(",");
 
             int length = 72;
-
+            Calendar c = Calendar.getInstance();
+            cal.setTime(beginDate);
             for (int i = 0; i < length; i++) {
 
                 DataVo vo = new DataVo();
+                vo.setTime(c.getTime().getTime());
 
 //                vo.setValue1(0.0);// 应发功率
 //                vo.setValue2(0.0);// 实发功率
@@ -138,10 +133,12 @@ public class RealPowerPushService {
 //                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);
+                c.add(Calendar.HOUR_OF_DAY,1);
             }
 
             if (id.equals(QS) || id.equals(FD) || id.equals(GF)) {
@@ -170,182 +167,201 @@ public class RealPowerPushService {
 
 
                     if (num > 0) {
+
+/***************************************************************超短期功率预测***************************************************************************/
                         WindPowerStationTestingPoint2 ycgl1 = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(station.getId(), ycPoints1[0]);
-                        WindPowerStationTestingPoint2 dqycgl1 = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(station.getId(), ycPoints4[0]);
 
-                        List<PointData> ycgl1Datas = null;
-                        List<PointData> dqycglDatas = null;
                         if (null != ycgl1) {
-                           ycgl1Datas = realApiUtil.getHistoryDatasSnap(ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried);
-                        }
-                        if (null != dqycgl1) {
-                            dqycglDatas = realApiUtil.getHistoryDatasSnap(ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried72);
-                        }
+                            List<PointData> datas = realApiUtil.getHistoryDatasSnap(ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried);
+                            if (!datas.isEmpty()) {
 
+                                if (InitialRunner.appendYcglMap.containsKey(station.getId())) {
+                                    Map<String, Object> ycmap = InitialRunner.appendYcglMap.get(station.getId());
+                                    if (ycmap.containsKey("cdq1")) {
+                                        String qs3_ycgl1 = (String) ycmap.get("cdq1");
 
-                        if (!dqycglDatas.isEmpty()){
-                            if (InitialRunner.appendYcglMap.containsKey(station.getId())){
-                                Map<String, Object> ycmap = InitialRunner.appendYcglMap.get(station.getId());
-                                if (ycmap.containsKey("dq1")) {
-                                    String qs3_dq_ycgl1 = (String) ycmap.get("dq1");
-
-                                    List<PointData> qs3_datas = realApiUtil.getHistoryDatasSnap(qs3_dq_ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried72);
+                                        List<PointData> qs3_datas = realApiUtil.getHistoryDatasSnap(qs3_ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried);
 
-                                    for (int j = 0; j < dqycglDatas.size(); j++) {
+                                        for (int j = 0; j < datas.size(); j++) {
 
-                                        vos.get(j).setTime(dqycglDatas.get(j).getPointTime() * 1000);
-                                        vos.get(j).setValue8(StringUtils.round(dqycglDatas.get(j).getPointValueInDouble() + qs3_datas.get(j).getPointValueInDouble(), 2));
-                                        if (j == dqycglDatas.size() - 1) {
-                                            cal.setTime(new Date(dqycglDatas.get(j).getPointTime() * 1000));
+//                                            vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
+                                            vos.get(j).setValue4(StringUtils.round(datas.get(j).getPointValueInDouble() + qs3_datas.get(j).getPointValueInDouble(), 2));
+                                            if (j == datas.size() - 1) {
+                                                cal.setTime(new Date(datas.get(j).getPointTime() * 1000));
+                                            }
                                         }
                                     }
-                                }
 
-                            }else {
-                                for (int j = 0; j < dqycglDatas.size(); j++) {
 
-                                    vos.get(j).setTime(dqycglDatas.get(j).getPointTime() * 1000);
+                                } else {
+                                    for (int j = 0; j < datas.size(); j++) {
 
-                                    double ycgl = (vos.get(j).getValue4() == null ? 0.0 : vos.get(j).getValue4()) + (dqycglDatas.get(j) == null ? 0.0 : dqycglDatas.get(j).getPointValueInDouble());
+//                                        vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
 
-                                    vos.get(j).setValue8(StringUtils.round(ycgl, 2));
+                                        double ycgl = (vos.get(j).getValue4() == null ? 0.0 : vos.get(j).getValue4()) + (datas.get(j) == null ? 0.0 : datas.get(j).getPointValueInDouble());
 
-                                    if (j == dqycglDatas.size() - 1) {
-                                        cal.setTime(new Date(dqycglDatas.get(j).getPointTime() * 1000));
+                                        vos.get(j).setValue4(StringUtils.round(ycgl, 2));
+
+                                        if (j == datas.size() - 1) {
+                                            cal.setTime(new Date(datas.get(j).getPointTime() * 1000));
+                                        }
                                     }
                                 }
-                            }
 
-                            int dqsubresult = 0;
-                            int dqtotal = 0;
+                                int subresult = 0;
+                                int total = 0;
 
-                            if (length > dqycglDatas.size()) {
-                                dqsubresult = length - dqycglDatas.size();
+                                if (length > datas.size()) {
+                                    subresult = length - datas.size();
+                                    if (subresult >= cdqyc) {
+                                        subresult = cdqyc;
+                                    }
 
-                                if (InitialRunner.appendYcglMap.containsKey(station.getId())) {
-                                    Map<String, Object> ycmap = InitialRunner.appendYcglMap.get(station.getId());
-                                    if (ycmap.containsKey("dq2")) {
-                                        String[] ycPoints3 = (String[]) ycmap.get("dq2");
-                                        for (int i = 0; i < dqsubresult; i++) {
-                                            cal.add(Calendar.HOUR, 1);
-                                            vos.get(dqycglDatas.size() + i).setTime(cal.getTime().getTime());
-                                            String qs3_ycgl = ycPoints3[i];
-                                            WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(station.getId(), ycPoints5[i]);
-                                            vos.get(dqycglDatas.size() + i).setValue8(StringUtils.round(realApiUtil.getRealData(ycglpoint).getPointValueInDouble() + realApiUtil.getRealData(qs3_ycgl).getPointValueInDouble(), 2));
+                                    if (InitialRunner.appendYcglMap.containsKey(station.getId())) {
+                                        Map<String, Object> ycmap = InitialRunner.appendYcglMap.get(station.getId());
+                                        if (ycmap.containsKey("cdq2")) {
+                                            String[] ycPoints3 = (String[]) ycmap.get("cdq2");
+                                            for (int i = 0; i < subresult; i++) {
+                                                cal.add(Calendar.HOUR_OF_DAY, 1);
+                                                vos.get(datas.size() + i).setTime(cal.getTime().getTime());
+                                                String qs3_ycgl = ycPoints3[i];
+                                                WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(station.getId(), ycPoints2[i]);
+
+                                                vos.get(datas.size() + i).setValue4(StringUtils.round(realApiUtil.getRealData(ycglpoint).getPointValueInDouble() + realApiUtil.getRealData(qs3_ycgl).getPointValueInDouble(), 2));
+                                            }
                                         }
-                                    }
 
-                                }else {
-                                    for (int i = 0; i < dqsubresult; i++) {
-                                        cal.add(Calendar.HOUR, 1);
-                                        vos.get(dqycglDatas.size() + i).setTime(cal.getTime().getTime());
 
-                                        WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(station.getId(), ycPoints5[i]);
+                                    } else {
+                                        for (int i = 0; i < subresult; i++) {
+                                            cal.add(Calendar.HOUR_OF_DAY, 1);
+                                            vos.get(datas.size() + i).setTime(cal.getTime().getTime());
+
+                                            WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(station.getId(), ycPoints2[i]);
 
-                                        double ycgl = realApiUtil.getRealData(ycglpoint).getPointValueInDouble();
+                                            double ycgl = realApiUtil.getRealData(ycglpoint).getPointValueInDouble();
 
-                                        ycgl = (vos.get(dqycglDatas.size() + i).getValue8() == null ? 0.0 : vos.get(dqycglDatas.size() + i).getValue8()) + ycgl;
+                                            ycgl = (vos.get(datas.size() + i).getValue4() == null ? 0.0 : vos.get(datas.size() + i).getValue4()) + ycgl;
 
-                                        vos.get(dqycglDatas.size() + i).setValue8(StringUtils.round(ycgl, 2));
+                                            vos.get(datas.size() + i).setValue4(StringUtils.round(ycgl, 2));
+                                        }
                                     }
+
+
+//                                    total = datas.size() + subresult;
+//                                    subresult = length - (total);
+//
+//                                    if (subresult > 0)
+//                                        for (int i = 0; i < subresult; i++) {
+//                                            cal.add(Calendar.HOUR_OF_DAY, 1);
+//                                            vos.get(total + i).setTime(cal.getTime().getTime());
+//                                            vos.get(total + i).setValue4(null);
+//                                        }
                                 }
-                                dqtotal = dqycglDatas.size() + dqsubresult;
-                                dqsubresult = length - dqtotal;
-
-                                if (dqsubresult > 0)
-                                    for (int i = 0; i < dqsubresult; i++) {
-                                        cal.add(Calendar.HOUR, 1);
-                                        vos.get(dqtotal + i).setTime(cal.getTime().getTime());
-                                        vos.get(dqtotal + i).setValue8(null);
-                                    }
+
                             }
+
                         }
+/***************************************************************超短期功率预测***************************************************************************/
+
 
-                        if (!ycgl1Datas.isEmpty()) {
+/***************************************************************短期功率预测***************************************************************************/
+                        WindPowerStationTestingPoint2 dqgl1 = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(station.getId(), ycDqPoints1[0]);
 
-                            if (InitialRunner.appendYcglMap.containsKey(station.getId())) {
-                                Map<String, Object> ycmap = InitialRunner.appendYcglMap.get(station.getId());
-                                if (ycmap.containsKey("cdq1")) {
-                                    String qs3_ycgl1 = (String) ycmap.get("cdq1");
+                        if (null != dqgl1) {
+                            List<PointData> datas = realApiUtil.getHistoryDatasSnap(dqgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried);
+                            if (!datas.isEmpty()) {
+
+                                if (InitialRunner.appendYcglMap.containsKey(station.getId())) {
+                                    Map<String, Object> ycmap = InitialRunner.appendYcglMap.get(station.getId());
+                                    if (ycmap.containsKey("dq1")) {
+                                        String qs3_ycgl1 = (String) ycmap.get("dq1");
 
-                                    List<PointData> qs3_datas = realApiUtil.getHistoryDatasSnap(qs3_ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried);
+                                        List<PointData> qs3_datas = realApiUtil.getHistoryDatasSnap(qs3_ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried);
 
-                                    for (int j = 0; j < ycgl1Datas.size(); j++) {
+                                        for (int j = 0; j < datas.size(); j++) {
 
-                                        vos.get(j).setTime(ycgl1Datas.get(j).getPointTime() * 1000);
-                                        vos.get(j).setValue4(StringUtils.round(ycgl1Datas.get(j).getPointValueInDouble() + qs3_datas.get(j).getPointValueInDouble(), 2));
-                                        if (j == ycgl1Datas.size() - 1) {
-                                            cal.setTime(new Date(ycgl1Datas.get(j).getPointTime() * 1000));
+//                                            vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
+                                            vos.get(j).setValue7(StringUtils.round(datas.get(j).getPointValueInDouble() + qs3_datas.get(j).getPointValueInDouble(), 2));
+                                            if (j == datas.size() - 1) {
+                                                cal.setTime(new Date(datas.get(j).getPointTime() * 1000));
+                                            }
                                         }
                                     }
-                                }
 
-                            } else {
-                                for (int j = 0; j < ycgl1Datas.size(); j++) {
 
-                                    vos.get(j).setTime(ycgl1Datas.get(j).getPointTime() * 1000);
+                                } else {
+                                    for (int j = 0; j < datas.size(); j++) {
+
+//                                        vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
 
-                                    double ycgl = (vos.get(j).getValue4() == null ? 0.0 : vos.get(j).getValue4()) + (ycgl1Datas.get(j) == null ? 0.0 : ycgl1Datas.get(j).getPointValueInDouble());
+                                        double ycgl = (vos.get(j).getValue7() == null ? 0.0 : vos.get(j).getValue7()) + (datas.get(j) == null ? 0.0 : datas.get(j).getPointValueInDouble());
 
-                                    vos.get(j).setValue4(StringUtils.round(ycgl, 2));
+                                        vos.get(j).setValue7(StringUtils.round(ycgl, 2));
 
-                                    if (j == ycgl1Datas.size() - 1) {
-                                        cal.setTime(new Date(ycgl1Datas.get(j).getPointTime() * 1000));
+                                        if (j == datas.size() - 1) {
+                                            cal.setTime(new Date(datas.get(j).getPointTime() * 1000));
+                                        }
                                     }
                                 }
-                            }
-
-                            int subresult = 0;
-                            int total = 0;
 
-                            if (length > ycgl1Datas.size()) {
-                                subresult = length - ycgl1Datas.size();
-                                if (subresult >= cdqyc) {
-                                    subresult = cdqyc;
-                                }
+                                int subresult = 0;
+                                int total = 0;
 
-                                if (InitialRunner.appendYcglMap.containsKey(station.getId())) {
-                                    Map<String, Object> ycmap = InitialRunner.appendYcglMap.get(station.getId());
-                                    if (ycmap.containsKey("cdq2")) {
-                                        String[] ycPoints3 = (String[]) ycmap.get("cdq2");
-                                        for (int i = 0; i < subresult; i++) {
-                                            cal.add(Calendar.HOUR, 1);
-                                            vos.get(ycgl1Datas.size() + i).setTime(cal.getTime().getTime());
-                                            String qs3_ycgl = ycPoints3[i];
-                                            WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(station.getId(), ycPoints2[i]);
+                                if (length > datas.size()) {
+                                    subresult = length - datas.size();
+                                    if (subresult >= dqyc) {
+                                        subresult = dqyc;
+                                    }
 
-                                            vos.get(ycgl1Datas.size() + i).setValue4(StringUtils.round(realApiUtil.getRealData(ycglpoint).getPointValueInDouble() + realApiUtil.getRealData(qs3_ycgl).getPointValueInDouble(), 2));
+                                    if (InitialRunner.appendYcglMap.containsKey(station.getId())) {
+                                        Map<String, Object> ycmap = InitialRunner.appendYcglMap.get(station.getId());
+                                        if (ycmap.containsKey("dq2")) {
+                                            String[] ycPoints3 = (String[]) ycmap.get("dq2");
+                                            for (int i = 0; i < subresult; i++) {
+                                                cal.add(Calendar.HOUR_OF_DAY, 1);
+                                                //vos.get(datas.size() + i).setTime(cal.getTime().getTime());
+                                                String qs3_ycgl = ycPoints3[i];
+                                                WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(station.getId(), ycDqPoints2[i]);
+
+                                                vos.get(datas.size() + i).setValue7(StringUtils.round(realApiUtil.getRealData(ycglpoint).getPointValueInDouble() + realApiUtil.getRealData(qs3_ycgl).getPointValueInDouble(), 2));
+                                            }
                                         }
-                                    }
 
-                                } else {
-                                    for (int i = 0; i < subresult; i++) {
-                                        cal.add(Calendar.HOUR, 1);
-                                        vos.get(ycgl1Datas.size() + i).setTime(cal.getTime().getTime());
 
-                                        WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(station.getId(), ycPoints2[i]);
+                                    } else {
+                                        for (int i = 0; i < subresult; i++) {
+                                            cal.add(Calendar.HOUR_OF_DAY, 1);
+                                            //vos.get(datas.size() + i).setTime(cal.getTime().getTime());
+
+                                            WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(station.getId(), ycDqPoints2[i]);
 
-                                        double ycgl = realApiUtil.getRealData(ycglpoint).getPointValueInDouble();
+                                            double ycgl = realApiUtil.getRealData(ycglpoint).getPointValueInDouble();
 
-                                        ycgl = (vos.get(ycgl1Datas.size() + i).getValue4() == null ? 0.0 : vos.get(ycgl1Datas.size() + i).getValue4()) + ycgl;
+                                            ycgl = (vos.get(datas.size() + i).getValue7() == null ? 0.0 : vos.get(datas.size() + i).getValue7()) + ycgl;
 
-                                        vos.get(ycgl1Datas.size() + i).setValue4(StringUtils.round(ycgl, 2));
+                                            vos.get(datas.size() + i).setValue7(StringUtils.round(ycgl, 2));
+                                        }
                                     }
-                                }
 
 
-                                total = ycgl1Datas.size() + subresult;
-                                subresult = length - (total);
+//                                    total = datas.size() + subresult;
+//                                    subresult = length - (total);
+//
+//                                    if (subresult > 0)
+//                                        for (int i = 0; i < subresult; i++) {
+//                                            cal.add(Calendar.HOUR_OF_DAY, 1);
+//                                            vos.get(total + i).setTime(cal.getTime().getTime());
+//                                            vos.get(total + i).setValue4(null);
+//                                        }
+                                }
 
-                                if (subresult > 0)
-                                    for (int i = 0; i < subresult; i++) {
-                                        cal.add(Calendar.HOUR, 1);
-                                        vos.get(total + i).setTime(cal.getTime().getTime());
-                                        vos.get(total + i).setValue4(null);
-                                    }
                             }
 
                         }
+/***************************************************************短期功率预测***************************************************************************/
+
+
                     }
 
                 }
@@ -566,185 +582,196 @@ public class RealPowerPushService {
 
                 if (InitialRunner.wpmap.containsKey(id)) {
                     if (num > 0) {
+ /***************************************************************超短期功率预测***************************************************************************/
                         WindPowerStationTestingPoint2 ycgl1 = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, ycPoints1[0]);
 
-                        WindPowerStationTestingPoint2 dqycgl1 = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, ycPoints4[0]);
-
-                        List<PointData> ycgl1Datas = null;
-                        List<PointData> dqycglDatas = null;
                         if (null != ycgl1) {
-                            ycgl1Datas = realApiUtil.getHistoryDatasSnap(ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried);
-                        }
-                        if (null != dqycgl1) {
-                            dqycglDatas = realApiUtil.getHistoryDatasSnap(ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried72);
-                        }
+                            List<PointData> datas = realApiUtil.getHistoryDatasSnap(ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried);
+                            if (!datas.isEmpty()) {
 
-                        if (!dqycglDatas.isEmpty()){
-                            if (InitialRunner.appendYcglMap.containsKey(id)) {
-                                Map<String, Object> ycmap = InitialRunner.appendYcglMap.get(id);
-                                if (ycmap.containsKey("dq1")) {
-                                    String qs3_dq_ycgl1 = (String) ycmap.get("dq1");
+                                if (InitialRunner.appendYcglMap.containsKey(id)) {
+                                    Map<String, Object> ycmap = InitialRunner.appendYcglMap.get(id);
+                                    if (ycmap.containsKey("cdq1")) {
+                                        String qs3_ycgl1 = (String) ycmap.get("cdq1");
 
-                                    List<PointData> qs3_datas = realApiUtil.getHistoryDatasSnap(qs3_dq_ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num/2, pried72);
+                                        List<PointData> qs3_datas = realApiUtil.getHistoryDatasSnap(qs3_ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried);
 
-                                    for (int j = 0; j < dqycglDatas.size(); j++) {
+                                        for (int j = 0; j < datas.size(); j++) {
 
-                                        vos.get(j).setTime(dqycglDatas.get(j).getPointTime() * 1000);
-                                        vos.get(j).setValue8(StringUtils.round(dqycglDatas.get(j).getPointValueInDouble() + qs3_datas.get(j).getPointValueInDouble(), 2));
-                                        if (j == dqycglDatas.size() - 1) {
-                                            cal.setTime(new Date(dqycglDatas.get(j).getPointTime() * 1000));
+//                                            vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
+                                            vos.get(j).setValue4(StringUtils.round(datas.get(j).getPointValueInDouble() + qs3_datas.get(j).getPointValueInDouble(), 2));
+                                            if (j == datas.size() - 1) {
+                                                cal.setTime(new Date(datas.get(j).getPointTime() * 1000));
+                                            }
                                         }
                                     }
-                                }
 
-                            }else {
-                                for (int j = 0; j < dqycglDatas.size(); j++) {
+                                } else {
+                                    for (int j = 0; j < datas.size(); j++) {
 
-                                    vos.get(j).setTime(dqycglDatas.get(j).getPointTime() * 1000);
+//                                        vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
 
-                                    double ycgl = (vos.get(j).getValue4() == null ? 0.0 : vos.get(j).getValue4()) + (dqycglDatas.get(j) == null ? 0.0 : dqycglDatas.get(j).getPointValueInDouble());
+                                        double ycgl = (vos.get(j).getValue4() == null ? 0.0 : vos.get(j).getValue4()) + (datas.get(j) == null ? 0.0 : datas.get(j).getPointValueInDouble());
 
-                                    vos.get(j).setValue8(StringUtils.round(ycgl, 2));
+                                        vos.get(j).setValue4(StringUtils.round(ycgl, 2));
 
-                                    if (j == dqycglDatas.size() - 1) {
-                                        cal.setTime(new Date(dqycglDatas.get(j).getPointTime() * 1000));
+                                        if (j == datas.size() - 1) {
+                                            cal.setTime(new Date(datas.get(j).getPointTime() * 1000));
+                                        }
                                     }
                                 }
-                            }
 
-                            int dqsubresult = 0;
-                            int dqtotal = 0;
+                                int subresult = 0;
+                                int total = 0;
 
-                            if (length > dqycglDatas.size()) {
-                                dqsubresult = length - dqycglDatas.size();
+                                if (length > datas.size()) {
+                                    subresult = length - datas.size();
+                                    if (subresult >= cdqyc) {
+                                        subresult = cdqyc;
+                                    }
 
-                                if (InitialRunner.appendYcglMap.containsKey(id)) {
-                                    Map<String, Object> ycmap = InitialRunner.appendYcglMap.get(id);
-                                    if (ycmap.containsKey("dq2")) {
-                                        String[] ycPoints3 = (String[]) ycmap.get("dq2");
-                                        for (int i = 0; i < dqsubresult; i++) {
-                                            cal.add(Calendar.HOUR, 1);
-                                            vos.get(dqycglDatas.size() + i).setTime(cal.getTime().getTime());
-                                            String qs3_ycgl = ycPoints3[i];
-                                            WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, ycPoints5[i]);
-                                            vos.get(dqycglDatas.size() + i).setValue8(StringUtils.round(realApiUtil.getRealData(ycglpoint).getPointValueInDouble() + realApiUtil.getRealData(qs3_ycgl).getPointValueInDouble(), 2));
+                                    if (InitialRunner.appendYcglMap.containsKey(id)) {
+                                        Map<String, Object> ycmap = InitialRunner.appendYcglMap.get(id);
+                                        if (ycmap.containsKey("cdq2")) {
+                                            String[] ycPoints3 = (String[]) ycmap.get("cdq2");
+                                            for (int i = 0; i < subresult; i++) {
+                                                cal.add(Calendar.HOUR_OF_DAY, 1);
+                                                vos.get(datas.size() + i).setTime(cal.getTime().getTime());
+                                                String qs3_ycgl = ycPoints3[i];
+                                                WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, ycPoints2[i]);
+
+                                                vos.get(datas.size() + i).setValue4(StringUtils.round(realApiUtil.getRealData(ycglpoint).getPointValueInDouble() + realApiUtil.getRealData(qs3_ycgl).getPointValueInDouble(), 2));
+                                            }
                                         }
-                                    }
 
-                                }else {
-                                    for (int i = 0; i < dqsubresult; i++) {
-                                        cal.add(Calendar.HOUR, 1);
-                                        vos.get(dqycglDatas.size() + i).setTime(cal.getTime().getTime());
+                                    } else {
+                                        for (int i = 0; i < subresult; i++) {
+                                            cal.add(Calendar.HOUR_OF_DAY, 1);
 
-                                        WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, ycPoints5[i]);
+                                            vos.get(datas.size() + i).setTime(cal.getTime().getTime());
 
-                                        double ycgl = realApiUtil.getRealData(ycglpoint).getPointValueInDouble();
+                                            WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, ycPoints2[i]);
 
-                                        ycgl = (vos.get(dqycglDatas.size() + i).getValue8() == null ? 0.0 : vos.get(dqycglDatas.size() + i).getValue8()) + ycgl;
+                                            double ycgl = realApiUtil.getRealData(ycglpoint).getPointValueInDouble();
 
-                                        vos.get(dqycglDatas.size() + i).setValue8(StringUtils.round(ycgl, 2));
+                                            ycgl = (vos.get(datas.size() + i).getValue4() == null ? 0.0 : vos.get(datas.size() + i).getValue4()) + ycgl;
+
+                                            vos.get(datas.size() + i).setValue4(StringUtils.round(ycgl, 2));
+                                        }
                                     }
+
+
+                                    total = datas.size() + subresult;
+                                    subresult = length - (total);
+
+                                    if (subresult > 0)
+                                        for (int i = 0; i < subresult; i++) {
+                                            cal.add(Calendar.HOUR_OF_DAY, 1);
+                                            vos.get(total + i).setTime(cal.getTime().getTime());
+                                            vos.get(total + i).setValue4(null);
+                                        }
                                 }
-                                dqtotal = dqycglDatas.size() + dqsubresult;
-                                dqsubresult = length - dqtotal;
-
-                                if (dqsubresult > 0)
-                                    for (int i = 0; i < dqsubresult; i++) {
-                                        cal.add(Calendar.HOUR, 1);
-                                        vos.get(dqtotal + i).setTime(cal.getTime().getTime());
-                                        vos.get(dqtotal + i).setValue8(null);
-                                    }
+
                             }
+
                         }
+/***************************************************************超短期功率预测***************************************************************************/
 
 
+/***************************************************************短期功率预测***************************************************************************/
+                        WindPowerStationTestingPoint2 dqgl1 = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, ycDqPoints1[0]);
 
-                        if (!ycgl1Datas.isEmpty()) {
+                        if (null != dqgl1) {
+                            List<PointData> datas = realApiUtil.getHistoryDatasSnap(dqgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried);
+                            if (!datas.isEmpty()) {
 
-                            if (InitialRunner.appendYcglMap.containsKey(id)) {
-                                Map<String, Object> ycmap = InitialRunner.appendYcglMap.get(id);
-                                if (ycmap.containsKey("cdq1")) {
-                                    String qs3_ycgl1 = (String) ycmap.get("cdq1");
+                                if (InitialRunner.appendYcglMap.containsKey(id)) {
+                                    Map<String, Object> ycmap = InitialRunner.appendYcglMap.get(id);
+                                    if (ycmap.containsKey("dq1")) {
+                                        String qs3_ycgl1 = (String) ycmap.get("dq1");
 
-                                    List<PointData> qs3_datas = realApiUtil.getHistoryDatasSnap(qs3_ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried);
+                                        List<PointData> qs3_datas = realApiUtil.getHistoryDatasSnap(qs3_ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried);
 
-                                    for (int j = 0; j < ycgl1Datas.size(); j++) {
+                                        for (int j = 0; j < datas.size(); j++) {
 
-                                        vos.get(j).setTime(ycgl1Datas.get(j).getPointTime() * 1000);
-                                        vos.get(j).setValue4(StringUtils.round(ycgl1Datas.get(j).getPointValueInDouble() + qs3_datas.get(j).getPointValueInDouble(), 2));
-                                        if (j == ycgl1Datas.size() - 1) {
-                                            cal.setTime(new Date(ycgl1Datas.get(j).getPointTime() * 1000));
+//                                            vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
+                                            vos.get(j).setValue7(StringUtils.round(datas.get(j).getPointValueInDouble() + qs3_datas.get(j).getPointValueInDouble(), 2));
+                                            if (j == datas.size() - 1) {
+                                                cal.setTime(new Date(datas.get(j).getPointTime() * 1000));
+                                            }
                                         }
                                     }
-                                }
 
-                            } else {
-                                for (int j = 0; j < ycgl1Datas.size(); j++) {
+                                } else {
+                                    for (int j = 0; j < datas.size(); j++) {
 
-                                    vos.get(j).setTime(ycgl1Datas.get(j).getPointTime() * 1000);
+//                                        vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
 
-                                    double ycgl = (vos.get(j).getValue4() == null ? 0.0 : vos.get(j).getValue4()) + (ycgl1Datas.get(j) == null ? 0.0 : ycgl1Datas.get(j).getPointValueInDouble());
+                                        double ycgl = (vos.get(j).getValue7() == null ? 0.0 : vos.get(j).getValue7()) + (datas.get(j) == null ? 0.0 : datas.get(j).getPointValueInDouble());
 
-                                    vos.get(j).setValue4(StringUtils.round(ycgl, 2));
+                                        vos.get(j).setValue7(StringUtils.round(ycgl, 2));
 
-                                    if (j == ycgl1Datas.size() - 1) {
-                                        cal.setTime(new Date(ycgl1Datas.get(j).getPointTime() * 1000));
+                                        if (j == datas.size() - 1) {
+                                            cal.setTime(new Date(datas.get(j).getPointTime() * 1000));
+                                        }
                                     }
                                 }
-                            }
 
-                            int subresult = 0;
-                            int total = 0;
+                                int subresult = 0;
+                                int total = 0;
 
-                            if (length > ycgl1Datas.size()) {
-                                subresult = length - ycgl1Datas.size();
-                                if (subresult >= cdqyc) {
-                                    subresult = cdqyc;
-                                }
-
-                                if (InitialRunner.appendYcglMap.containsKey(id)) {
-                                    Map<String, Object> ycmap = InitialRunner.appendYcglMap.get(id);
-                                    if (ycmap.containsKey("cdq2")) {
-                                        String[] ycPoints3 = (String[]) ycmap.get("cdq2");
-                                        for (int i = 0; i < subresult; i++) {
-                                            cal.add(Calendar.HOUR, 1);
-                                            vos.get(ycgl1Datas.size() + i).setTime(cal.getTime().getTime());
-                                            String qs3_ycgl = ycPoints3[i];
-                                            WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, ycPoints2[i]);
+                                if (length > datas.size()) {
+                                    subresult = length - datas.size();
+                                    if (subresult >= dqyc) {
+                                        subresult = dqyc;
+                                    }
 
-                                            vos.get(ycgl1Datas.size() + i).setValue4(StringUtils.round(realApiUtil.getRealData(ycglpoint).getPointValueInDouble() + realApiUtil.getRealData(qs3_ycgl).getPointValueInDouble(), 2));
+                                    if (InitialRunner.appendYcglMap.containsKey(id)) {
+                                        Map<String, Object> ycmap = InitialRunner.appendYcglMap.get(id);
+                                        if (ycmap.containsKey("dq2")) {
+                                            String[] ycPoints3 = (String[]) ycmap.get("dq2");
+                                            for (int i = 0; i < subresult; i++) {
+                                                cal.add(Calendar.HOUR_OF_DAY, 1);
+                                                vos.get(datas.size() + i).setTime(cal.getTime().getTime());
+                                                String qs3_ycgl = ycPoints3[i];
+                                                WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, ycDqPoints2[i]);
+
+                                                vos.get(datas.size() + i).setValue7(StringUtils.round(realApiUtil.getRealData(ycglpoint).getPointValueInDouble() + realApiUtil.getRealData(qs3_ycgl).getPointValueInDouble(), 2));
+                                            }
                                         }
-                                    }
 
-                                } else {
-                                    for (int i = 0; i < subresult; i++) {
-                                        cal.add(Calendar.HOUR, 1);
+                                    } else {
+                                        for (int i = 0; i < subresult; i++) {
+                                            cal.add(Calendar.HOUR_OF_DAY, 1);
 
-                                        vos.get(ycgl1Datas.size() + i).setTime(cal.getTime().getTime());
+                                            vos.get(datas.size() + i).setTime(cal.getTime().getTime());
 
-                                        WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, ycPoints2[i]);
+                                            WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, ycDqPoints2[i]);
 
-                                        double ycgl = realApiUtil.getRealData(ycglpoint).getPointValueInDouble();
+                                            double ycgl = realApiUtil.getRealData(ycglpoint).getPointValueInDouble();
 
-                                        ycgl = (vos.get(ycgl1Datas.size() + i).getValue4() == null ? 0.0 : vos.get(ycgl1Datas.size() + i).getValue4()) + ycgl;
+                                            ycgl = (vos.get(datas.size() + i).getValue7() == null ? 0.0 : vos.get(datas.size() + i).getValue7()) + ycgl;
 
-                                        vos.get(ycgl1Datas.size() + i).setValue4(StringUtils.round(ycgl, 2));
+                                            vos.get(datas.size() + i).setValue7(StringUtils.round(ycgl, 2));
+                                        }
                                     }
-                                }
-
 
-                                total = ycgl1Datas.size() + subresult;
-                                subresult = length - (total);
+//
+//                                    total = datas.size() + subresult;
+//                                    subresult = length - (total);
+//
+//                                    if (subresult > 0)
+//                                        for (int i = 0; i < subresult; i++) {
+//                                            cal.add(Calendar.HOUR_OF_DAY, 1);
+//                                            vos.get(total + i).setTime(cal.getTime().getTime());
+//                                            vos.get(total + i).setValue7(null);
+//                                        }
+                                }
 
-                                if (subresult > 0)
-                                    for (int i = 0; i < subresult; i++) {
-                                        cal.add(Calendar.HOUR, 1);
-                                        vos.get(total + i).setTime(cal.getTime().getTime());
-                                        vos.get(total + i).setValue4(null);
-                                    }
                             }
 
                         }
+/***************************************************************短期功率预测***************************************************************************/
                     }
                 }
 
@@ -797,7 +824,7 @@ public class RealPowerPushService {
                             }
 
                             if (!InitialRunner.wpmap.containsKey(id)) {
-                                cal.add(Calendar.HOUR, 1);
+                                cal.add(Calendar.HOUR_OF_DAY, 1);
                             }
                         }
 
@@ -959,9 +986,6 @@ public class RealPowerPushService {
     }
 
 
-
-
-
     public List<Object> findGLDetail(String id, String gltype) throws Exception {
 
         List<DataVo> vols = new ArrayList<DataVo>();
@@ -981,7 +1005,7 @@ public class RealPowerPushService {
 
         int type = 0;
 
-       // Map<String, List> resultMap = new HashMap<String, List>();
+        // Map<String, List> resultMap = new HashMap<String, List>();
 
         List<Object> resultls = new ArrayList<Object>();
         if (StringUtils.notEmp(id)) {
@@ -1075,7 +1099,7 @@ public class RealPowerPushService {
                             }
                             break;
                         case "yfgl":
-                              // 总应发功率
+                            // 总应发功率
                             WindPowerStationTestingPoint2 yfgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(vo.getId(), Constant.TPOINT_WP_ZZSGL);
                             if(null!=yfgl && null!=yfgl.getCode())
                             {
@@ -1083,7 +1107,7 @@ public class RealPowerPushService {
                             }
                             break;
                         case "ssfs":
-                              //实时平均风速
+                            //实时平均风速
                             WindPowerStationTestingPoint2 ssfs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(vo.getId(), Constant.TPOINT_WP_SSFS);
                             if(null!=ssfs && null!=ssfs.getCode())
                             {
@@ -1162,7 +1186,7 @@ public class RealPowerPushService {
                     }
 
                     // resultMap.put(vo.getId(), vos);
-                   resultls.add(vos);
+                    resultls.add(vos);
                 }
 
             }

+ 31 - 0
src/main/java/com/gyee/frame/util/DateUtils.java

@@ -7,6 +7,7 @@ import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Date;
+import java.util.TimeZone;
 
 /**
  * 日期处理
@@ -322,5 +323,35 @@ public class DateUtils  extends org.apache.commons.lang3.time.DateUtils {
         return date;
     }
 
+    //普通时间转为UTC
+    public static String localToUTC(String localTimeStr) {
+        try {
+            Date localDate = getLocalSDF().parse(localTimeStr);
+            return getUTCSDF().format(localDate);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+    //UTC转为普通时间
+    public static String utcToLocal(String utcTimeStr) {
+        try {
+            Date date = getUTCSDF().parse(utcTimeStr);
+            return getLocalSDF().format(date);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    private static SimpleDateFormat getLocalSDF() {
+        return new SimpleDateFormat(YYYY_MM_DD_HH_MM_SS);
+    }
+
+    private static SimpleDateFormat getUTCSDF() {
+        SimpleDateFormat utcSDF = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+        utcSDF.setTimeZone(TimeZone.getTimeZone("UTC"));
+        return utcSDF;
+    }
 
 }

Datei-Diff unterdrückt, da er zu groß ist
+ 25 - 1
src/main/resources/application.yml


BIN
src/main/resources/static/syz/dwk_zm.xls


BIN
src/main/resources/static/syz/pleq_zm.xls


BIN
src/main/resources/static/syz/plyq_zm.xls


BIN
src/main/resources/static/syz/xh_zm.xls


+ 1 - 1
src/test/java/test/HealthTest.java

@@ -86,7 +86,7 @@ public class HealthTest {
 //        System.out.println(map1.size());
 
 
-        Map<String, Object> map1 =healthSubController.findPowerChar("NG01_79");
+        Map<String, Object> map1 =healthSubController.findWtHealthInfo("NG01_79");
         System.out.println(map1.size());
 
 

+ 13 - 3
src/test/java/test/MatrixByWpPushTest.java

@@ -7,6 +7,8 @@ import com.gyee.frame.service.websocket.MatrixPushByWpService;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 
+import java.util.Map;
+
 public class MatrixByWpPushTest {
 
     @SneakyThrows
@@ -70,8 +72,16 @@ public class MatrixByWpPushTest {
 //
 
 
-//        Map<String, Object> map=monitorPushController.findGeneralAppearance(wpId);
-//
-//        System.out.println(map.size());
+        Map<String, Object> map1=monitorPushController.findGeneralAppearance("MHS_FDC");
+        Map<String, Object> map2=monitorPushController.findGeneralAppearance("NSS_FDC");
+        Map<String, Object> map3=monitorPushController.findGeneralAppearance("QS_FDC");
+        Map<String, Object> map4=monitorPushController.findGeneralAppearance("SBQ_FDC");
+        Map<String, Object> map5=monitorPushController.findGeneralAppearance("XS_FDC");
+        Map<String, Object> map6=monitorPushController.findGeneralAppearance("DWK_GDC");
+        Map<String, Object> map7=monitorPushController.findGeneralAppearance("PL01_GC");
+        Map<String, Object> map8=monitorPushController.findGeneralAppearance("PL02_GC");
+        Map<String, Object> map9=monitorPushController.findGeneralAppearance("MCH_GDC");
+        Map<String, Object> map10=monitorPushController.findGeneralAppearance("XH_GDC");
+        System.out.println(map1.size());
     }
 }

+ 9 - 3
src/test/java/test/StopAnalysisTest.java

@@ -1,14 +1,16 @@
 package test;
 
 import com.gyee.SpringbootStart;
+import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.controller.health.StopAnalysisController;
+import com.gyee.frame.model.auto.StopAnalysismainVo;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 
 import java.util.Calendar;
 import java.util.Date;
-import java.util.Map;
+import java.util.List;
 
 public class StopAnalysisTest {
 
@@ -32,10 +34,14 @@ public class StopAnalysisTest {
 
         String wtid="MG01_07";
         StopAnalysisController stopAnalysisController= SpringUtils.getBean("stopAnalysisController");
-        Map<String, Object> map =stopAnalysisController.stopAnalysisList("SBQ_FDC","1","2");
+        AjaxResult ajax1 =stopAnalysisController.stopAnalysisList("SBQ_FDC","1","1");
+
+        List<StopAnalysismainVo> vos = (List<StopAnalysismainVo>)ajax1.get("data");
+        AjaxResult ajax2  =stopAnalysisController.stopAnalysisTree(vos.get(11).getId(),vos.get(11).getWtid(),vos.get(11).getJudegvulue());
 //
 //
-        System.out.println(map);
+        stopAnalysisController.saveStopAnalysis("SBQ_FDC","1","2");
+        System.out.println(ajax1);
 
         System.out.println("***************************************************************************************");