Parcourir la source

监视模块后台接口

shilin il y a 3 ans
Parent
commit
5d96c4c821
28 fichiers modifiés avec 4699 ajouts et 1589 suppressions
  1. 0 18
      src/main/java/com/gyee/frame/common/quartz/task/BraceletPushTask.java
  2. 35 0
      src/main/java/com/gyee/frame/common/quartz/task/GenreSetPushTask.java
  3. 31 1
      src/main/java/com/gyee/frame/common/spring/Constant.java
  4. 5 5
      src/main/java/com/gyee/frame/common/spring/InitialRunner.java
  5. 14 1077
      src/main/java/com/gyee/frame/controller/goodness/WindpowerDetailChartController.java
  6. 10 11
      src/main/java/com/gyee/frame/model/auto/Line.java
  7. 36 37
      src/main/java/com/gyee/frame/model/auto/LineExample.java
  8. 51 0
      src/main/java/com/gyee/frame/model/custom/MatrixVo.java
  9. 21 0
      src/main/java/com/gyee/frame/service/ProjectPlanService.java
  10. 3 3
      src/main/java/com/gyee/frame/service/WindPowerstationTestingPointService.java
  11. 1 1
      src/main/java/com/gyee/frame/service/WindTurbineTestingPointAiService.java
  12. 25 1
      src/main/java/com/gyee/frame/service/WindpowerinfodayService.java
  13. 1136 6
      src/main/java/com/gyee/frame/service/WindpowerstationthewindinfoService.java
  14. 0 429
      src/main/java/com/gyee/frame/service/websocket/BasicDataPushService.java
  15. 122 0
      src/main/java/com/gyee/frame/service/websocket/CftInfoPushService.java
  16. 801 0
      src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java
  17. 387 0
      src/main/java/com/gyee/frame/service/websocket/MatrixDetialPushService.java
  18. 303 0
      src/main/java/com/gyee/frame/service/websocket/MatrixPushService.java
  19. 702 0
      src/main/java/com/gyee/frame/service/websocket/RealPowerPushService.java
  20. 541 0
      src/main/java/com/gyee/frame/service/websocket/WpInfoPushService.java
  21. 10 0
      src/main/java/com/gyee/frame/util/DateUtils.java
  22. 24 0
      src/main/java/com/gyee/frame/util/StringUtils.java
  23. 73 0
      src/test/java/test/CftInfoPushTest.java
  24. 76 0
      src/test/java/test/GenreSetPushTest.java
  25. 73 0
      src/test/java/test/MatrixDetialPushTest.java
  26. 73 0
      src/test/java/test/MatrixPushTest.java
  27. 73 0
      src/test/java/test/RealPowerPushTest.java
  28. 73 0
      src/test/java/test/WpInfoPushTest.java

+ 0 - 18
src/main/java/com/gyee/frame/common/quartz/task/BraceletPushTask.java

@@ -1,18 +0,0 @@
-package com.gyee.frame.common.quartz.task;
-
-
-import com.gyee.frame.service.websocket.BraceletService;
-import javax.annotation.Resource;
-import org.springframework.stereotype.Component;
-
-@Component("braceletPushTask")
-public class BraceletPushTask {
-    @Resource
-    private BraceletService braceletService;
-
-
-    public void braceletPushTask(String destination) throws Exception {
-
-        braceletService.braceletPushTask(destination);
-    }
-}

+ 35 - 0
src/main/java/com/gyee/frame/common/quartz/task/GenreSetPushTask.java

@@ -0,0 +1,35 @@
+package com.gyee.frame.common.quartz.task;
+
+
+import com.gyee.frame.common.websocket.WebsocketMessageService;
+import com.gyee.frame.service.websocket.GenreSetPushService;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+
+@Component("genreSetPushTask")
+public class GenreSetPushTask {
+    @Resource
+    private GenreSetPushService genreSetPushService;
+    @Resource
+    private WebsocketMessageService websocketMessageService;
+
+    private final String QS = "0";
+    private final String FD = "-1";
+    private final String GF = "-2";
+
+    public void genreSetTask(String destination) throws Exception {
+
+        Map<String, Object> map = new HashMap<>();
+
+
+        map.put(QS, genreSetPushService.findBasicDataInfo(QS));
+        map.put(FD, genreSetPushService.findBasicDataInfo(FD));
+        map.put(GF, genreSetPushService.findBasicDataInfo(GF));
+
+        websocketMessageService.SendAlertToAll(destination, map);
+
+    }
+}

+ 31 - 1
src/main/java/com/gyee/frame/common/spring/Constant.java

@@ -26,6 +26,7 @@ public class Constant {
 			"AGC004", "AGC005", "AGC006", "AGC007", "AGC008", "AGC011",
 			"AGC014", "AGC015", "AGC021", "AGC022", "AGC023", "AGC024",
 			"AGC025", "AGC026", "AGC031" };
+
 	public static final String[] TPOINT_WP_AGCYCGL = { "FCFGCDQ0001",
 			"FCFGCDQ0002", "FCFGCDQ0003", "FCFGCDQ0004", "FCFGCDQ0005",
 			"FCFGCDQ0006", "FCFGCDQ0007", "FCFGCDQ0008", "FCFGCDQ0009",
@@ -33,6 +34,9 @@ public class Constant {
 			"FCFGCDQ0014", "FCFGCDQ0015", "FCFGCDQ0016" };
 	public static final String TPOINT_WP_FGLYC = "FCFGCDQ0001,FCFGCDQ0003,FCFGCDQ0005,FCFGCDQ0007,FCFGCDQ0009,FCFGCDQ0011,FCFGCDQ0013,FCFGCDQ0015";
 	public static final String TPOINT_WP_FGLYC2 = "FCFGCDQ0002,FCFGCDQ0004,FCFGCDQ0006,FCFGCDQ0008,FCFGCDQ0010,FCFGCDQ0012,FCFGCDQ0014,FCFGCDQ0016";
+	public static final String TPOINT_WP_FGLYC1HOUR2 = "FCFGCDQ0004,FCFGCDQ0008,FCFGCDQ0012,FCFGCDQ0016";
+	public static final String TPOINT_QS3_YGCL = "SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ002,SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ004,SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ006,SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ008,SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ010,SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ012,SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ014,SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ016";
+
 	public static final String TPOINT_WP_FGLYCDT = "FCFGDQDT00";
 	public static final String TPOINT_WP_FGLYCST = "FCFGDQST00";
 
@@ -45,6 +49,10 @@ public class Constant {
 	public static final String TPOINT_WP_GWDL = "GWGWB"; // 风场购网电量
 	public static final String TPOINT_WP_NWGWDL = "NWGWB"; // 农网购网电量
 
+	public static final String AGC001 = "AGC001"; //AGC出线有功
+	public static final String AGC002 = "AGC002"; //AGC有功设定
+
+
 	public static final String TPOINT_AQTS = "AQTS"; // 安全天数
 	public static final String TPOINT_JPEYHT = "JPEYHT"; // 减排二氧化碳
 	public static final String TPOINT_JPEYHL = "JPEYHL"; // 减排二氧化硫
@@ -70,6 +78,8 @@ public class Constant {
 	public static final String TPOINT_WP_SFDL = "SFDL";// 总发电量(升压站)
 	public static final String TPOINT_WP_SSFS = "SSFS"; // 实时平均风速
 
+	public static final String TPOINT_WP_ZZYGL = "ZZYGL"; // 最优功率
+
 	public static final String TPOINT_WP_RFDL = "RFDLB"; // 日发电量
 	public static final String TPOINT_WP_YFDL = "YFDLB"; // 月发电量
 	public static final String TPOINT_WP_NFDL = "NFDLB"; // 年发电量
@@ -99,6 +109,21 @@ public class Constant {
 	public static final String TPOINT_WT_GZTJ = "GZTJ";// 故障台数
 	public static final String TPOINT_WT_TXZD = "TXZD";// 离线台数
 
+	public static final String DJNUM = "DJNUM";// 待机台数
+	public static final String TJNUM = "TJNUM";// 手动停机台数
+	public static final String FDNUM = "FDNUM"; // 正常发电台数
+	public static final String FDJCLNUM = "FDJCLNUM";// 缺陷降出力台数
+	public static final String XDJCLNUM = "XDJCLNUM";// 限电降出力台数
+	public static final String XDTJNUM = "XDTJNUM";// 限电停机台数
+	public static final String GZNUM = "GZNUM";// 故障停机台数
+	public static final String CNGZNUM = "CNGZNUM";// 场内受累停机台数
+	public static final String JXNUM = "JXNUM"; // 检修停机台数
+	public static final String CNJXNUM = "CNJXNUM";// 场内受累检修台数
+	public static final String DWSLNUM = "DWSLNUM";// 电网受累台数
+	public static final String HJSLNUM = "HJSLNUM";// 环境受累台数
+	public static final String LXNUM = "LXNUM";// 风机离线台数
+
+
 	public static final String TPOINT_WT_U1YZDL = "AI061";// U1项绕组电流
 	public static final String TPOINT_WT_U2YZDL = "AI062";// U2项绕组电流
 	public static final String TPOINT_WT_U3YZDL = "AI063";// U3项绕组电流
@@ -177,7 +202,7 @@ public class Constant {
 	public static final String RFDLE = "RFDLE"; // 日应发发电量
 	public static final String FJZT = "FJZT"; // 风场状态
 
-	public static final String ZBZGL = "ZBZGL";// 理论功率
+	public static final String ZBZGL = "ZBZGL";// 总保证功率
 	public static final String ZSGLZZSGL = "ZZSGL";// 应发功率
 
 	public static final String RLZSSDL = "RLZSSDL"; // 日场内受累检修
@@ -300,6 +325,11 @@ public class Constant {
 	public static final String NWZZSDL = "NWZZSDL";
 	public static final String NTZZSDL = "NTZZSDL";
 	/********************************* end ***********************************/
+
+	public static final String[] TPOINT_WP_CFT = { "FCCFTFS10", "FCCFTFS30",
+			"FCCFTFS50", "FCCFTFS60", "FCCFTFS70", "FCCFTFS80", "FCCFTFX10", "FCCFTFX30",
+			"FCCFTFX50", "FCCFTFX60", "FCCFTFX70", "FCCFTFX80", "FCCFTWD", "FCCFTSD",
+			"FCCFTYQ", "FCCFTMD" };
 	public static final String FCCFTFS10 = "FCCFTFS10";// 测风塔10米风速
 	public static final String FCCFTFS30 = "FCCFTFS30";// 测风塔30米风速
 	public static final String FCCFTFS50 = "FCCFTFS50";// 测风塔50米风速

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

@@ -189,8 +189,8 @@ public class InitialRunner implements CommandLineRunner {
         }
 
         WindturbineExample windturbineExample=new WindturbineExample();
-        windturbineExample.setOrderByClause("id ASC");
-        windturbineExample.createCriteria().andWindpowerstationidNotLike("%GDC");
+        windturbineExample.setOrderByClause("status ASC");
+
         wtallls= windturbineService.selectByExample(windturbineExample);
 
         if(!wtallls.isEmpty())
@@ -234,11 +234,11 @@ public class InitialRunner implements CommandLineRunner {
                 warningmap.put(warning.getId(),warning);
             }
         }
-            if(wtls!=null && !wtls.isEmpty()){
+            if(wtallls!=null && !wtallls.isEmpty()){
 
-            for(int i=0;i<wtls.size();i++){
+            for(int i=0;i<wtallls.size();i++){
 
-                Windturbine point=wtls.get(i);
+                Windturbine point=wtallls.get(i);
                 if(wp_wtmap.containsKey(point.getWindpowerstationid())){
                     List<Windturbine> ls=wp_wtmap.get(point.getWindpowerstationid());
                     ls.add(point);

Fichier diff supprimé car celui-ci est trop grand
+ 14 - 1077
src/main/java/com/gyee/frame/controller/goodness/WindpowerDetailChartController.java


+ 10 - 11
src/main/java/com/gyee/frame/model/auto/Line.java

@@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
-import java.math.BigDecimal;
 
 /**
  * 线路 Line 
@@ -40,11 +39,11 @@ private String projectid;
 		
 	/** 顺序号 **/
 	@ApiModelProperty(value = "顺序号")
-private BigDecimal ordernum;
+private Double ordernum;
 		
 	/** 容量 **/
 	@ApiModelProperty(value = "容量")
-private BigDecimal capacity;
+private Double capacity;
 		
 	/** 容量单位 **/
 	@ApiModelProperty(value = "容量单位")
@@ -52,7 +51,7 @@ private String capacityunit;
 		
 	/** 数量 **/
 	@ApiModelProperty(value = "数量")
-private BigDecimal quantity;
+private Double quantity;
 		
 		
 	public String getId() {
@@ -100,20 +99,20 @@ private BigDecimal quantity;
     }
 	 
 			
-	public BigDecimal getOrdernum() {
+	public Double getOrdernum() {
         return ordernum;
     }
 
-    public void setOrdernum(BigDecimal ordernum) {
+    public void setOrdernum(Double ordernum) {
         this.ordernum = ordernum;
     }
 	 
 			
-	public BigDecimal getCapacity() {
+	public Double getCapacity() {
         return capacity;
     }
 
-    public void setCapacity(BigDecimal capacity) {
+    public void setCapacity(Double capacity) {
         this.capacity = capacity;
     }
 	 
@@ -127,11 +126,11 @@ private BigDecimal quantity;
     }
 	 
 			
-	public BigDecimal getQuantity() {
+	public Double getQuantity() {
         return quantity;
     }
 
-    public void setQuantity(BigDecimal quantity) {
+    public void setQuantity(Double quantity) {
         this.quantity = quantity;
     }
 	 
@@ -141,7 +140,7 @@ private BigDecimal quantity;
     }
     
 																																															
-	public Line(String id, String code, String name, String aname, String projectid, BigDecimal ordernum, BigDecimal capacity, String capacityunit, BigDecimal quantity) {
+	public Line(String id, String code, String name, String aname, String projectid, Double ordernum, Double capacity, String capacityunit, Double quantity) {
 	
 		this.id = id;
 		this.code = code;

+ 36 - 37
src/main/java/com/gyee/frame/model/auto/LineExample.java

@@ -1,6 +1,5 @@
 package com.gyee.frame.model.auto;
 
-import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -477,62 +476,62 @@ public class LineExample {
             return (Criteria) this;
         }
 
-        public Criteria andOrdernumEqualTo(BigDecimal value) {
+        public Criteria andOrdernumEqualTo(Double value) {
             addCriterion("ordernum =", value, "ordernum");
             return (Criteria) this;
         }
 
-        public Criteria andOrdernumNotEqualTo(BigDecimal value) {
+        public Criteria andOrdernumNotEqualTo(Double value) {
             addCriterion("ordernum <>", value, "ordernum");
             return (Criteria) this;
         }
 
-        public Criteria andOrdernumGreaterThan(BigDecimal value) {
+        public Criteria andOrdernumGreaterThan(Double value) {
             addCriterion("ordernum >", value, "ordernum");
             return (Criteria) this;
         }
 
-        public Criteria andOrdernumGreaterThanOrEqualTo(BigDecimal value) {
+        public Criteria andOrdernumGreaterThanOrEqualTo(Double value) {
             addCriterion("ordernum >=", value, "ordernum");
             return (Criteria) this;
         }
 
-        public Criteria andOrdernumLessThan(BigDecimal value) {
+        public Criteria andOrdernumLessThan(Double value) {
             addCriterion("ordernum <", value, "ordernum");
             return (Criteria) this;
         }
 
-        public Criteria andOrdernumLessThanOrEqualTo(BigDecimal value) {
+        public Criteria andOrdernumLessThanOrEqualTo(Double value) {
             addCriterion("ordernum <=", value, "ordernum");
             return (Criteria) this;
         }
 
-        public Criteria andOrdernumLike(BigDecimal value) {
+        public Criteria andOrdernumLike(Double value) {
             addCriterion("ordernum like", value, "ordernum");
             return (Criteria) this;
         }
 
-        public Criteria andOrdernumNotLike(BigDecimal value) {
+        public Criteria andOrdernumNotLike(Double value) {
             addCriterion("ordernum not like", value, "ordernum");
             return (Criteria) this;
         }
 
-        public Criteria andOrdernumIn(List<BigDecimal> values) {
+        public Criteria andOrdernumIn(List<Double> values) {
             addCriterion("ordernum in", values, "ordernum");
             return (Criteria) this;
         }
 
-        public Criteria andOrdernumNotIn(List<BigDecimal> values) {
+        public Criteria andOrdernumNotIn(List<Double> values) {
             addCriterion("ordernum not in", values, "ordernum");
             return (Criteria) this;
         }
 
-        public Criteria andOrdernumBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andOrdernumBetween(Double value1, Double value2) {
             addCriterion("ordernum between", value1, value2, "ordernum");
             return (Criteria) this;
         }
 
-        public Criteria andOrdernumNotBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andOrdernumNotBetween(Double value1, Double value2) {
             addCriterion("ordernum not between", value1, value2, "ordernum");
             return (Criteria) this;
         }
@@ -548,62 +547,62 @@ public class LineExample {
             return (Criteria) this;
         }
 
-        public Criteria andCapacityEqualTo(BigDecimal value) {
+        public Criteria andCapacityEqualTo(Double value) {
             addCriterion("capacity =", value, "capacity");
             return (Criteria) this;
         }
 
-        public Criteria andCapacityNotEqualTo(BigDecimal value) {
+        public Criteria andCapacityNotEqualTo(Double value) {
             addCriterion("capacity <>", value, "capacity");
             return (Criteria) this;
         }
 
-        public Criteria andCapacityGreaterThan(BigDecimal value) {
+        public Criteria andCapacityGreaterThan(Double value) {
             addCriterion("capacity >", value, "capacity");
             return (Criteria) this;
         }
 
-        public Criteria andCapacityGreaterThanOrEqualTo(BigDecimal value) {
+        public Criteria andCapacityGreaterThanOrEqualTo(Double value) {
             addCriterion("capacity >=", value, "capacity");
             return (Criteria) this;
         }
 
-        public Criteria andCapacityLessThan(BigDecimal value) {
+        public Criteria andCapacityLessThan(Double value) {
             addCriterion("capacity <", value, "capacity");
             return (Criteria) this;
         }
 
-        public Criteria andCapacityLessThanOrEqualTo(BigDecimal value) {
+        public Criteria andCapacityLessThanOrEqualTo(Double value) {
             addCriterion("capacity <=", value, "capacity");
             return (Criteria) this;
         }
 
-        public Criteria andCapacityLike(BigDecimal value) {
+        public Criteria andCapacityLike(Double value) {
             addCriterion("capacity like", value, "capacity");
             return (Criteria) this;
         }
 
-        public Criteria andCapacityNotLike(BigDecimal value) {
+        public Criteria andCapacityNotLike(Double value) {
             addCriterion("capacity not like", value, "capacity");
             return (Criteria) this;
         }
 
-        public Criteria andCapacityIn(List<BigDecimal> values) {
+        public Criteria andCapacityIn(List<Double> values) {
             addCriterion("capacity in", values, "capacity");
             return (Criteria) this;
         }
 
-        public Criteria andCapacityNotIn(List<BigDecimal> values) {
+        public Criteria andCapacityNotIn(List<Double> values) {
             addCriterion("capacity not in", values, "capacity");
             return (Criteria) this;
         }
 
-        public Criteria andCapacityBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andCapacityBetween(Double value1, Double value2) {
             addCriterion("capacity between", value1, value2, "capacity");
             return (Criteria) this;
         }
 
-        public Criteria andCapacityNotBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andCapacityNotBetween(Double value1, Double value2) {
             addCriterion("capacity not between", value1, value2, "capacity");
             return (Criteria) this;
         }
@@ -690,62 +689,62 @@ public class LineExample {
             return (Criteria) this;
         }
 
-        public Criteria andQuantityEqualTo(BigDecimal value) {
+        public Criteria andQuantityEqualTo(Double value) {
             addCriterion("quantity =", value, "quantity");
             return (Criteria) this;
         }
 
-        public Criteria andQuantityNotEqualTo(BigDecimal value) {
+        public Criteria andQuantityNotEqualTo(Double value) {
             addCriterion("quantity <>", value, "quantity");
             return (Criteria) this;
         }
 
-        public Criteria andQuantityGreaterThan(BigDecimal value) {
+        public Criteria andQuantityGreaterThan(Double value) {
             addCriterion("quantity >", value, "quantity");
             return (Criteria) this;
         }
 
-        public Criteria andQuantityGreaterThanOrEqualTo(BigDecimal value) {
+        public Criteria andQuantityGreaterThanOrEqualTo(Double value) {
             addCriterion("quantity >=", value, "quantity");
             return (Criteria) this;
         }
 
-        public Criteria andQuantityLessThan(BigDecimal value) {
+        public Criteria andQuantityLessThan(Double value) {
             addCriterion("quantity <", value, "quantity");
             return (Criteria) this;
         }
 
-        public Criteria andQuantityLessThanOrEqualTo(BigDecimal value) {
+        public Criteria andQuantityLessThanOrEqualTo(Double value) {
             addCriterion("quantity <=", value, "quantity");
             return (Criteria) this;
         }
 
-        public Criteria andQuantityLike(BigDecimal value) {
+        public Criteria andQuantityLike(Double value) {
             addCriterion("quantity like", value, "quantity");
             return (Criteria) this;
         }
 
-        public Criteria andQuantityNotLike(BigDecimal value) {
+        public Criteria andQuantityNotLike(Double value) {
             addCriterion("quantity not like", value, "quantity");
             return (Criteria) this;
         }
 
-        public Criteria andQuantityIn(List<BigDecimal> values) {
+        public Criteria andQuantityIn(List<Double> values) {
             addCriterion("quantity in", values, "quantity");
             return (Criteria) this;
         }
 
-        public Criteria andQuantityNotIn(List<BigDecimal> values) {
+        public Criteria andQuantityNotIn(List<Double> values) {
             addCriterion("quantity not in", values, "quantity");
             return (Criteria) this;
         }
 
-        public Criteria andQuantityBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andQuantityBetween(Double value1, Double value2) {
             addCriterion("quantity between", value1, value2, "quantity");
             return (Criteria) this;
         }
 
-        public Criteria andQuantityNotBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andQuantityNotBetween(Double value1, Double value2) {
             addCriterion("quantity not between", value1, value2, "quantity");
             return (Criteria) this;
         }

+ 51 - 0
src/main/java/com/gyee/frame/model/custom/MatrixVo.java

@@ -0,0 +1,51 @@
+package com.gyee.frame.model.custom;
+
+public class MatrixVo {
+
+	private String wtId;
+	private Integer wtnum;
+	private Double fjzt;
+	private Double fs;
+    private Double gl;
+
+
+	public String getWtId() {
+		return wtId;
+	}
+
+	public void setWtId(String wtId) {
+		this.wtId = wtId;
+	}
+
+	public Double getFjzt() {
+		return fjzt;
+	}
+
+	public void setFjzt(Double fjzt) {
+		this.fjzt = fjzt;
+	}
+
+	public Double getFs() {
+		return fs;
+	}
+
+	public void setFs(Double fs) {
+		this.fs = fs;
+	}
+
+	public Double getGl() {
+		return gl;
+	}
+
+	public void setGl(Double gl) {
+		this.gl = gl;
+	}
+
+	public Integer getWtnum() {
+		return wtnum;
+	}
+
+	public void setWtnum(Integer wtnum) {
+		this.wtnum = wtnum;
+	}
+}

+ 21 - 0
src/main/java/com/gyee/frame/service/ProjectPlanService.java

@@ -98,6 +98,27 @@ public class ProjectPlanService implements BaseService<ProjectPlan, ProjectPlanE
         return projectPlanMapper.deleteByExample(example);
     }
 
+	public List<ProjectPlan> getProjectPlanList(String year) {
+
+
+		List<ProjectPlan> list=new ArrayList<>();
+
+		if (StringUtils.notEmp(year)  ) {
+
+			ProjectPlanExample example=new ProjectPlanExample();
+			example.setOrderByClause("projectid DESC");
+
+			ProjectPlanExample.Criteria criteria =example.createCriteria();
+
+			criteria.andYearEqualTo(year);
+			criteria.andMonthIsNotNull();
+
+			list= projectPlanMapper.selectByExample(example);
+
+		}
+		return list;
+
+	}
     public List<ProjectPlanVo> getProjectPlanVo(String wpId, String pjId, String year) {
 
 		List<ProjectPlanVo> result=new ArrayList<>();

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

@@ -147,7 +147,7 @@ public class WindPowerstationTestingPointService implements BaseService<WindPowe
 					Map<String, WindPowerStationTestingPoint2> map=InitialRunner.wpPointmap.get(wpId);
 					if(map.containsKey(unicode))
 					{
-						point=map.get(wpId);
+						point=map.get(unicode);
 					}
 				}
 			}else if(InitialRunner.pjmap.containsKey(wpId))
@@ -157,7 +157,7 @@ public class WindPowerstationTestingPointService implements BaseService<WindPowe
 					Map<String, WindPowerStationTestingPoint2> map=InitialRunner.pjPointmap.get(wpId);
 					if(map.containsKey(unicode))
 					{
-						point=map.get(wpId);
+						point=map.get(unicode);
 					}
 				}
 			}else if(InitialRunner.lnmap.containsKey(wpId))
@@ -167,7 +167,7 @@ public class WindPowerstationTestingPointService implements BaseService<WindPowe
 					Map<String, WindPowerStationTestingPoint2> map=InitialRunner.lnPointmap.get(wpId);
 					if(map.containsKey(unicode))
 					{
-						point=map.get(wpId);
+						point=map.get(unicode);
 					}
 				}
 			}

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

@@ -147,7 +147,7 @@ public class WindTurbineTestingPointAiService implements BaseService<WindTurbine
 					Map<String, WindTurbineTestingPointAi2> map=InitialRunner.wtPointmap.get(wtId);
 					if(map.containsKey(unicode))
 					{
-						point=map.get(wtId);
+						point=map.get(unicode);
 					}
 				}
 			}

+ 25 - 1
src/main/java/com/gyee/frame/service/WindpowerinfodayService.java

@@ -5,10 +5,11 @@ import com.gyee.frame.common.support.Convert;
 import com.gyee.frame.mapper.auto.WindpowerinfodayMapper;
 import com.gyee.frame.model.auto.Windpowerinfoday;
 import com.gyee.frame.model.auto.WindpowerinfodayExample;
+import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.StringUtils;
-import javax.annotation.Resource;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -117,5 +118,28 @@ public class WindpowerinfodayService implements BaseService<Windpowerinfoday, Wi
 
 	}
 
+	public List<Windpowerinfoday> getWindpowerinfodayList(String wpId, Date recorddate) {
+
+
+		List<Windpowerinfoday> list=new ArrayList<>();
+
+		if (StringUtils.notEmp(wpId) && StringUtils.notEmp(recorddate)  ) {
+
+			WindpowerinfodayExample example=new WindpowerinfodayExample();
+			example.setOrderByClause("recorddate DESC");
+
+			WindpowerinfodayExample.Criteria criteria =example.createCriteria();
+
+
+			Date endDate= DateUtils.addDays(recorddate,1);
+			criteria.andRecorddateGreaterThanOrEqualTo(recorddate).andRecorddateLessThan(endDate);
+
+			criteria.andForeignkeyidEqualTo(wpId);
+
+			list= windpowerinfodayMapper.selectByExample(example);
 
+		}
+		return list;
+
+	}
 }

Fichier diff supprimé car celui-ci est trop grand
+ 1136 - 6
src/main/java/com/gyee/frame/service/WindpowerstationthewindinfoService.java


+ 0 - 429
src/main/java/com/gyee/frame/service/websocket/BasicDataPushService.java

@@ -1,429 +0,0 @@
-package com.gyee.frame.service.websocket;
-
-
-import com.gyee.frame.common.spring.Constant;
-import com.gyee.frame.common.spring.ConstantTR;
-import com.gyee.frame.common.spring.InitialRunner;
-import com.gyee.frame.common.websocket.WebsocketMessageService;
-import com.gyee.frame.model.auto.WindPowerStationTestingPoint2;
-import com.gyee.frame.model.auto.Windpowerstation;
-import com.gyee.frame.service.WindPowerstationTestingPointService;
-import com.gyee.frame.util.IRealTimeDataBaseUtil;
-import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.math.BigDecimal;
-import java.math.RoundingMode;
-import java.util.HashMap;
-import java.util.Map;
-
-@Service
-public class BasicDataPushService {
-
-    @Resource
-    private WebsocketMessageService websocketMessageService;
-    @Resource
-    private WindPowerstationTestingPointService windPowerstationTestingPointService;
-
-
-    private final String QS = "0.0";
-    private final String FD = "-1";
-    private final String GF = "-2";
-
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
-
-    public void basicDataPushTask(String destination) throws Exception {
-
-        Map<String, Object> map = new HashMap<>();
-
-
-        map.put(QS, findBasicDataInfo(QS));
-        map.put(QS, findBasicDataInfo(FD));
-        map.put(QS, findBasicDataInfo(GF));
-
-        websocketMessageService.SendAlertToAll(destination, map);
-
-    }
-
-
-    private Map<String, Object> findBasicDataInfo(String id) throws Exception {
-        Map<String, Object> map = new HashMap<String, Object>();
-        if (StringUtils.notEmp(id)) {
-
-
-            Double sjgl = 0.0;
-            Double ssfs = 0.0;
-
-            Double rfdl = 0.0;
-            Double yfdl = 0.0;
-            Double nfdl = 0.0;
-
-            Double zjts = 0.0;
-            Double zjrl = 0.0;
-/*************************************************基础指标*************************************************************/
-            Map<String, Double> fcmap = new HashMap<>();
-            //初始化场站信息
-            setWpInfo(zjts, zjrl, fcmap, id);
-            //所属风场指标
-            map.put("fcmap", fcmap);
-            //实际功率
-            sjgl = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_SJGL)).getPointValueInDouble();
-            //日发电量
-            rfdl = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_RFDL)).getPointValueInDouble();
-            //月发电量
-            yfdl = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_YFDL)).getPointValueInDouble();
-            //年发电量
-            nfdl = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_NFDL)).getPointValueInDouble();
-
-            ssfs = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_SSFS)).getPointValueInDouble();
-
-            double temp = 0.0;
-            //月利用小时
-            temp = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_YFDL)).getPointValueInDouble();
-            Double ylyxs = (new BigDecimal(temp).multiply(new BigDecimal(10))).divide(new BigDecimal(zjrl), 2, RoundingMode.HALF_EVEN).doubleValue();
-            //年利用小时
-            temp = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_NFDL)).getPointValueInDouble();
-            Double nlyxs = (new BigDecimal(temp).multiply(new BigDecimal(10))).divide(new BigDecimal(zjrl), 2, RoundingMode.HALF_EVEN).doubleValue();
-            //上网电量
-            Double swdl = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, "SWDLB")).getPointValueInDouble();// 上网电量
-            temp = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, "ZBZGL")).getPointValueInDouble();
-            //保证功率
-            Double bzgl = new BigDecimal(temp).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
-            temp = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, "ZZSGL")).getPointValueInDouble();
-            //应发功率
-            Double yfgl = new BigDecimal(temp).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
-
-
-
-        if (id.equals(QS)) {
-            // 减排二氧化碳
-            Double jpeyht = realApiUtil.getRealData(ConstantTR.JPEYHT).getPointValueInDouble();
-            // 节约标煤
-            Double jybm = realApiUtil.getRealData(ConstantTR.JYBM).getPointValueInDouble();
-            // 减排二氧化硫
-            Double jpeyhl = realApiUtil.getRealData(ConstantTR.JPEYHL).getPointValueInDouble();
-            // 节约水
-            Double jys = realApiUtil.getRealData(ConstantTR.JYS).getPointValueInDouble();
-            // 安全天数
-            Double aqts = realApiUtil.getRealData(ConstantTR.AQTS).getPointValueInDouble();
-
-            Double gfsjgl = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(GF, Constant.TPOINT_WP_SJGL)).getPointValueInDouble();
-
-            bzgl = bzgl + gfsjgl;
-            yfgl = yfgl + gfsjgl;
-            map.put("aqts", StringUtils.round(aqts, 2));
-            map.put("jpeyht", StringUtils.round(jpeyht, 2));
-            map.put("jybm", StringUtils.round(jybm, 2));
-            map.put("jpeyhl", StringUtils.round(jpeyhl, 2));
-            map.put("jys", StringUtils.round(jys, 2));
-
-        }
-//        if (bzgl == 0.0) {
-//            bzgl = 1;
-//        }
-//        Double glbz = new BigDecimal(sjgl).divide(new BigDecimal(bzgl), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).DoubleValue();
-//        if (bzgl == 1) {
-//            bzgl = 0.0;
-//        }
-//        if (glbz > 100) {
-//            glbz = 100;
-//        }
-
-/*************************************************基础指标*************************************************************/
-
-/*************************************************受累损失**************************************************************/
-
-            // 日场内受累检修
-            Double rjxsl = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RLZSSDL)).getPointValueInDouble();
-            // 日场内受累故障
-            Double rgzzsl = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RSZSSDL)).getPointValueInDouble();
-            // 月场内受累检修
-            Double yjxsl = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YLZSSDL)).getPointValueInDouble();
-            // 月场内受累故障
-            Double ygzzsl = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YSZSSDL)).getPointValueInDouble();
-            // 年场内受累检修
-            Double njxsl = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NLZSSDL)).getPointValueInDouble();
-            // 年场内受累故障
-            Double ngzzsl = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NSZSSDL)).getPointValueInDouble();
-/*************************************************受累损失***************************************************************/
-
-/**********************************************日故障损失和检修损失********************************************************/
-            //日待机损失
-            Double rdjss = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RSDJZSDL)).getPointValueInDouble();
-            //日手动停机损失
-            Double rsdtjss = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RSSTZSDL)).getPointValueInDouble();
-            //日性能损失
-            Double rxnss = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RXNZSDL)).getPointValueInDouble();
-            //日缺陷降出力损失
-            Double rqxjclss = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RSQXZSDL)).getPointValueInDouble();
-
-            //日欠发损失=日待机损失+日手动停机损失+日性能损失+日缺陷降出力损失
-            Double rqfssdl = new BigDecimal(rdjss + rsdtjss + rxnss + rqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-
-            temp = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RGZSSDL)).getPointValueInDouble();
-            //日故障损失电量=日故障损失+日故障受累
-            Double rgzssdl = new BigDecimal(temp + rgzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-            //日检修损失电量=日检修损失+日检修受累
-            temp = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RJXSSDL)).getPointValueInDouble();
-            Double rjxssdl = new BigDecimal(temp + rjxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-/**********************************************日故障损失和检修损失********************************************************/
-
-/**********************************************月故障损失和检修损失********************************************************/
-            // 月场内受累检修
-            Double ydjss = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YSDJZSDL)).getPointValueInDouble();
-            // 月场内受累检修
-            Double ysdtjss = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YSSTZSDL)).getPointValueInDouble();
-            // 月场内受累检修
-            Double yxnss = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YXNZSDL)).getPointValueInDouble();
-            // 月场内受累检修
-            Double yqxjclss = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YSQXZSDL)).getPointValueInDouble();
-            //月欠发损失=月待机损失+月手动停机损失+月性能损失+月缺陷降出力损失
-            Double yqfssdl = new BigDecimal(ydjss + ysdtjss + yxnss + yqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-
-            temp = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YGZSSDL)).getPointValueInDouble();
-            //月故障损失电量=月故障损失+月故障受累
-            Double ygzssdl = new BigDecimal(temp + ygzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-            temp = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YJXSSDL)).getPointValueInDouble();
-            //月检修损失电量=月检修损失+月检修受累
-            Double yjxssdl = new BigDecimal(temp + yjxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-/**********************************************月故障损失和检修损失********************************************************/
-
-/**********************************************年故障损失和检修损失********************************************************/
-            // 年场内受累检修
-            Double ndjss = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NSDJZSDL)).getPointValueInDouble();
-            // 年场内受累检修
-            Double nsdtjss = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NSSTZSDL)).getPointValueInDouble();
-            // 年场内受累检修
-            Double nxnss = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NXNZSDL)).getPointValueInDouble();
-            // 年场内受累检修
-            Double nqxjclss = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NSQXZSDL)).getPointValueInDouble();
-
-            Double nqfssdl = new BigDecimal(ndjss + nsdtjss + nxnss + nqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-
-            temp = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NGZSSDL)).getPointValueInDouble();
-            //年故障损失电量=年故障损失+年故障受累
-            Double ngzssdl = new BigDecimal(temp + ngzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-            temp = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NJXSSDL)).getPointValueInDouble();
-            //年检修损失电量=年检修损失+年检修受累
-            Double njxssdl = new BigDecimal(temp + njxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-/**********************************************月故障损失和检修损失********************************************************/
-
-/****************************************************限电损失************************************************************/
-            temp = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RXDSSDL)).getPointValueInDouble();
-            Double rxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-            temp = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YXDSSDL)).getPointValueInDouble();
-            Double yxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-            temp = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NXDSSDL)).getPointValueInDouble();
-            Double nxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-/****************************************************限电损失************************************************************/
-        }
-
-
-//
-//        if (id.equals(QS)) {
-//            Double jpeyht = realApiUtil.getRealData(ConstantTR.JPEYHT).getPointValueInDouble();// 减排二氧化碳
-//            // EDOS.CALC.GSJPEYHT
-//            Double jybm = realApiUtil.getRealData(ConstantTR.JYBM).getPointValueInDouble();// 节约标煤
-//
-//            Double jpeyhl = realApiUtil.getRealData(ConstantTR.JPEYHL).getPointValueInDouble();// 减排二氧化硫
-//            // EDOS.CALC.GSJPEYHL
-//            Double jys = realApiUtil.getRealData(ConstantTR.JYS).getPointValueInDouble();// 节约水
-//
-//            Double aqts = realApiUtil.getRealData(ConstantTR.AQTS).getPointValueInDouble();// 安全天数
-//
-//            Double gfsjgl = realApiUtil.getRealData(CacheContext.stationPointmap.get("-2").get(Constant.TPOINT_WP_SJGL)).getPointValueInDouble();
-//
-//            bzgl = bzgl + gfsjgl;
-//            yfgl = yfgl + gfsjgl;
-//            map.put("aqts", StringUtils.round(aqts, 2));
-//            map.put("jpeyht", StringUtils.round(jpeyht, 2));
-//            map.put("jybm", StringUtils.round(jybm, 2));
-//            map.put("jpeyhl", StringUtils.round(jpeyhl, 2));
-//            map.put("jys", StringUtils.round(jys, 2));
-//
-//        }
-//        if (bzgl == 0.0) {
-//            bzgl = 1;
-//        }
-//        Double glbz = new BigDecimal(sjgl).divide(new BigDecimal(bzgl), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).DoubleValue();
-//        if (bzgl == 1) {
-//            bzgl = 0.0;
-//        }
-//        if (glbz > 100) {
-//            glbz = 100;
-//        }
-//        // 状态台数
-//        Double yxts = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id,Constant.TPOINT_WT_YXTS)).getPointValueInDouble();// 上网电量
-//        Double djts = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id,Constant.TPOINT_WT_DJTS)).getPointValueInDouble();// 上网电量
-//        Double whtj = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id,Constant.TPOINT_WT_WHTJ)).getPointValueInDouble();// 上网电量
-//        Double gztj = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id,Constant.TPOINT_WT_GZTJ)).getPointValueInDouble();// 上网电量
-//        Double txzd = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id,Constant.TPOINT_WT_TXZD)).getPointValueInDouble();// 上网电量
-//
-//        map.put("yxts", StringUtils.round(yxts, 0.0));
-//        map.put("djts", StringUtils.round(djts, 0.0));
-//        map.put("whtj", StringUtils.round(whtj, 0.0));
-//        map.put("gztj", StringUtils.round(gztj, 0.0));
-//        map.put("txzd", StringUtils.round(txzd, 0.0));
-//        map.put("zjts", StringUtils.round(zjts, 0.0));
-//
-//        Map<String, Object> params = new HashMap<String, Object>();
-//
-//        params.put("recorddate", DateUtils.truncate(new Date()));
-//
-//        params.put("foreignkeyid", id);
-//
-//        List<Windpowerinfoday> ls = windpowerinfodayService.findByProperties(params);
-//        if (!ls.isEmpty()) {
-//            Windpowerinfoday wd = ls.get(0.0);
-//            map.put("ndxkyss", wd.getYeardxkyxs());
-//            map.put("nsbklyl", wd.getYearsbklyl());
-//        } else {
-//            map.put("ndxkyss", 0.0.0.0);
-//            map.put("nsbklyl", 0.0.0.0);
-//        }
-//        map.put("rqfssdl", StringUtils.round(rqfssdl, 2));
-//        map.put("yqfssdl", StringUtils.round(yqfssdl, 2));
-//        map.put("nqfssdl", StringUtils.round(nqfssdl, 2));
-//
-//        map.put("rgzssdl", StringUtils.round(rgzssdl, 2));
-//        map.put("ygzssdl", StringUtils.round(ygzssdl, 2));
-//        map.put("ngzssdl", StringUtils.round(ngzssdl, 2));
-//
-//        map.put("rjxssdl", StringUtils.round(rjxssdl, 2));
-//        map.put("yjxssdl", StringUtils.round(yjxssdl, 2));
-//        map.put("njxssdl", StringUtils.round(njxssdl, 2));
-//
-//        map.put("rxdssdl", StringUtils.round(rxdssdl < 0.0 ? 0.0 : rxdssdl, 2));
-//        map.put("yxdssdl", StringUtils.round(yxdssdl < 0.0 ? 0.0 : yxdssdl, 2));
-//        map.put("nxdssdl", StringUtils.round(nxdssdl < 0.0 ? 0.0 : nxdssdl, 2));
-//
-//        map.put("zjrl", StringUtils.round(zjrl, 2));
-//
-//        map.put("pjfs", StringUtils.round(pjfs, 2));
-//        map.put("sjgl", StringUtils.round(sjgl, 2));
-//        map.put("bzgl", StringUtils.round(bzgl, 2));
-//        map.put("glbz", StringUtils.round(glbz, 2));
-//        map.put("yfgl", StringUtils.round(yfgl, 2));
-//
-//        map.put("rfdl", StringUtils.round(rfdl, 2));
-//        map.put("yfdl", StringUtils.round(yfdl, 2));
-//        map.put("nfdl", StringUtils.round(nfdl, 2));
-//
-//        map.put("ylyxs", StringUtils.round(ylyxs, 2));
-//        map.put("nlyxs", StringUtils.round(nlyxs, 2));
-//
-//        map.put("swdl", StringUtils.round(swdl, 2));
-//
-//        List<Projectplan> planls = null;
-//        // Map<String, Object> params = new HashMap<String, Object>();
-//        params.clear();
-//        Calendar cal = Calendar.getInstance();
-//        cal.setTime(new Date());
-//        int year = cal.get(Calendar.YEAR);
-//        params.put("year", String.valueOf(year));
-//        params.put("!month", "");
-//        // 当期全部电场计划集合
-//
-//        planls = projectPlanService.findByProperties(params);
-//
-//        map = setPlanInfo(map, planls, id);
-//
-//        Double yfdljh = 0.0;
-//        Double nfdljh = 0.0;
-//
-//        if (id.equals(QS)) {
-//            yfdljh = Double.valueOf(map.get("yfdljh"));
-//            nfdljh = Double.valueOf(map.get("nfdljh"));
-//            map.put("yfdljh", yfdljh);
-//            map.put("nfdljh", nfdljh);
-//        } else if (id.equals("-1")) {
-//            yfdljh = Double.valueOf(map.get("fcyfdljh"));
-//            nfdljh = Double.valueOf(map.get("fcnfdljh"));
-//            map.put("yfdljh", yfdljh);
-//            map.put("nfdljh", nfdljh);
-//        } else if (id.equals("-2")) {
-//            yfdljh = Double.valueOf(map.get("gfyfdljh"));
-//            nfdljh = Double.valueOf(map.get("gfnfdljh"));
-//            map.put("yfdljh", yfdljh);
-//            map.put("nfdljh", nfdljh);
-//        } else {
-//            yfdljh = Double.valueOf(map.get("wpyfdljh"));
-//            nfdljh = Double.valueOf(map.get("wpnfdljh"));
-//
-//            map.put("yfdljh", yfdljh);
-//            map.put("nfdljh", nfdljh);
-//        }
-//
-//        Double ywcl = 0.0.0.0;
-//        Double nwcl = 0.0.0.0;
-//        if (yfdljh == 0.0) {
-//            nfdljh = 1;
-//        }
-//        if (yfdljh != 0.0) {
-//            ywcl = new BigDecimal(yfdl).divide(new BigDecimal(yfdljh), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).DoubleValue();
-//        }
-//        if (nfdljh == 0.0) {
-//            nfdljh = 1;
-//        }
-//        if (nfdljh != 0.0) {
-//            nwcl = new BigDecimal(nfdl).divide(new BigDecimal(nfdljh), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).DoubleValue();
-//        }
-//
-//        if (yfdljh > 100) {
-//            yfdljh = 100;
-//        }
-//        if (nfdljh > 100) {
-//            nfdljh = 100;
-//        }
-//        map.put("ywcl", StringUtils.round(ywcl, 2));
-//        map.put("nwcl", StringUtils.round(nwcl, 2));
-//
-        return map;
-    }
-
-    private void setWpInfo(Double zjts, Double zjrl, Map<String, Double> fcmap, String type) throws Exception {
-
-        for (Windpowerstation wp : InitialRunner.wpallls) {
-            if (type.equals("0")) {
-                setWpInfo(zjts, zjrl, fcmap, wp);
-            } else if (type.equals("-1")) {
-                if (wp.getId().endsWith("FDC")) {
-                    setWpInfo(zjts, zjrl, fcmap, wp);
-                }
-            } else if (type.equals("-2")) {
-                if (wp.getId().endsWith("GDC")) {
-                    setWpInfo(zjts, zjrl, fcmap, wp);
-                }
-            }
-        }
-    }
-
-    private void setWpInfo(Double zjts, Double zjrl, Map<String, Double> fcmap, Windpowerstation wp) throws Exception {
-
-        zjrl += wp.getCapacity();
-        zjts += wp.getQuantity();
-
-        WindPowerStationTestingPoint2 fczt = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.FJZT);
-        WindPowerStationTestingPoint2 fcgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_SJGL);
-
-        Double fcztvalue = realApiUtil.getRealData(fczt).getPointValueInDouble();
-        Double fcglvalue = realApiUtil.getRealData(fczt).getPointValueInDouble();
-
-        StringBuilder sb = new StringBuilder();
-        sb.append(wp.getId()).append("_").append("zjrl");
-        fcmap.put(String.valueOf(sb), zjrl);
-        sb.setLength(0);
-        sb.append(wp.getId()).append("_").append("zjts");
-        fcmap.put(String.valueOf(sb), zjts);
-        sb.setLength(0);
-        sb.append(wp.getId()).append("_").append("fczt");
-        fcmap.put(String.valueOf(sb), fcztvalue);
-        sb.setLength(0);
-        sb.append(wp.getId()).append("_").append("fcgl");
-        fcmap.put(String.valueOf(sb), fcglvalue);
-    }
-}
-
-

+ 122 - 0
src/main/java/com/gyee/frame/service/websocket/CftInfoPushService.java

@@ -0,0 +1,122 @@
+package com.gyee.frame.service.websocket;
+
+
+import com.gyee.frame.common.spring.Constant;
+import com.gyee.frame.model.auto.WindPowerStationTestingPoint2;
+import com.gyee.frame.model.custom.PointData;
+import com.gyee.frame.service.ProjectPlanService;
+import com.gyee.frame.service.WindPowerstationTestingPointService;
+import com.gyee.frame.service.WindpowerinfodayService;
+import com.gyee.frame.service.WindpowerstationthewindinfoService;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.StringUtils;
+import com.gyee.frame.util.golden.EdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+@Service
+public class CftInfoPushService {
+
+
+    @Resource
+    private WindPowerstationTestingPointService windPowerstationTestingPointService;
+    @Resource
+    private WindpowerinfodayService windpowerinfodayService;
+    @Resource
+    private ProjectPlanService projectPlanService;
+    @Resource
+    private WindpowerstationthewindinfoService windpowerstationthewindinfoService;
+
+    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+
+
+
+    public Map<String, Object> genreSetMap() throws Exception {
+
+        Map<String, Object> map = new HashMap<>();
+
+        map.put("MHS_FDC",findCftInfo("MHS_FDC"));
+        map.put("NSS_FDC",findCftInfo("NSS_FDC"));
+        map.put("QS_FDC",findCftInfo("QS_FDC"));
+        map.put("SBQ_FDC",findCftInfo("SBQ_FDC"));
+        map.put("XS_FDC",findCftInfo("XS_FDC"));
+
+       return map;
+
+    }
+
+    private Map<String, Object> findCftInfo(String id) throws Exception {
+        Map<String, Object> map = new HashMap<String, Object>();
+        if (StringUtils.notEmp(id)) {
+
+
+
+
+/*************************************************测风塔*************************************************************/
+
+            Map<String, Double> cftmap = new HashMap<>();
+            String[] cftstrs=Constant.TPOINT_WP_CFT;
+
+            for(int i=0;i<cftstrs.length;i++)
+            {
+                WindPowerStationTestingPoint2 point2 =windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, cftstrs[i]);
+
+                if(StringUtils.notEmp(point2.getCode()))
+                {
+                    PointData value = realApiUtil.getRealData(point2);
+                    cftmap.put(cftstrs[i],StringUtils.round(value.getPointValueInDouble(),2));
+                }
+            }
+
+            map.put("cftmap", cftmap);
+/*************************************************测风塔*************************************************************/
+
+
+
+
+/*************************************************关系库指标**************************************************************/
+
+            Calendar cal = Calendar.getInstance();
+
+
+            cal.set(Calendar.HOUR_OF_DAY, 0);
+            cal.set(Calendar.MINUTE, 0);
+            cal.set(Calendar.SECOND, 0);
+            cal.set(Calendar.MILLISECOND, 0);
+
+            cal.add(Calendar.HOUR_OF_DAY, -1);
+
+            Date date = cal.getTime();
+
+            Map<String, Object> rmgtmap = new HashMap<>();
+
+            rmgtmap=windpowerstationthewindinfoService.wprfxpl(id,DateUtils.format(date));
+            
+            map.put("rmgtmap", rmgtmap);
+
+
+            Map<String, Object> ymgtmap = new HashMap<>();
+
+            ymgtmap=windpowerstationthewindinfoService.wpyfxpl(id,DateUtils.format(date));
+
+            map.put("ymgtmap", ymgtmap);
+        }
+/*************************************************关系库指标**************************************************************/
+
+        return map;
+    }
+
+
+
+
+
+
+}
+
+

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

@@ -0,0 +1,801 @@
+package com.gyee.frame.service.websocket;
+
+
+import com.gyee.frame.common.spring.Constant;
+import com.gyee.frame.common.spring.ConstantTR;
+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.WindpowerinfodayService;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.StringUtils;
+import com.gyee.frame.util.golden.EdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@Service
+public class GenreSetPushService {
+
+
+    @Resource
+    private WindPowerstationTestingPointService windPowerstationTestingPointService;
+    @Resource
+    private WindpowerinfodayService windpowerinfodayService;
+    @Resource
+    private ProjectPlanService projectPlanService;
+
+
+    private final String QS = "0";
+    private final String FD = "-1";
+    private final String GF = "-2";
+
+    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+
+
+    public Map<String, Object> genreSetMap() throws Exception {
+
+        Map<String, Object> map = new HashMap<>();
+
+
+        map.put(QS, findBasicDataInfo(QS));
+        map.put(FD, findBasicDataInfo(FD));
+        map.put(GF, findBasicDataInfo(GF));
+
+        map.put("SBQ_FDC",findBasicDataInfo("SBQ_FDC"));
+        map.put("SBQ02_GC",findBasicDataInfo("SBQ02_GC"));
+        map.put("SBQ05_XL",findBasicDataInfo("SBQ05_XL"));
+        return map;
+
+    }
+
+    public Map<String, Object> findBasicDataInfo(String id) throws Exception {
+        Map<String, Object> map = new HashMap<String, Object>();
+        if (StringUtils.notEmp(id)) {
+
+
+            Double zjrl = 0.0;
+            Double zjts = 0.0;
+
+            Double sjgl = 0.0;
+            Double bzgl = 0.0;
+            Double yfgl = 0.0;
+/*************************************************风场指标*************************************************************/
+
+        if(id.equals(QS) || id.equals(FD) || id.equals(GF) )
+        {
+
+            Map<String, Double> fcmap = new HashMap<>();
+            //初始化场站信息
+
+            List<Windpowerstation> wplist=new ArrayList<>();
+
+            for (Windpowerstation wp : InitialRunner.wpallls) {
+                if (id.equals(FD)) {
+                    if (wp.getId().endsWith("FDC")) {
+                        wplist.add(wp);
+                    }
+                }else if (id.equals(GF)) {
+                    if (wp.getId().endsWith("GDC")) {
+                        wplist.add(wp);
+                    }
+                }else if (id.equals(QS)) {
+                    wplist.add(wp);
+                }
+
+            }
+
+            for (Windpowerstation wp : wplist) {
+
+                zjrl += wp.getCapacity();
+                zjts += wp.getQuantity();
+
+                WindPowerStationTestingPoint2 fczt = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.FJZT);
+                WindPowerStationTestingPoint2 fcgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_SJGL);
+
+                Double fcztvalue = realApiUtil.getRealData(fczt).getPointValueInDouble();
+                Double fcglvalue = realApiUtil.getRealData(fczt).getPointValueInDouble();
+
+                StringBuilder sb = new StringBuilder();
+                sb.append(wp.getId()).append("_").append("zjrl");
+                fcmap.put(String.valueOf(sb), wp.getCapacity());
+                sb.setLength(0);
+                sb.append(wp.getId()).append("_").append("zjts");
+                fcmap.put(String.valueOf(sb), Double.valueOf(wp.getQuantity()));
+                sb.setLength(0);
+                sb.append(wp.getId()).append("_").append("fczt");
+                fcmap.put(String.valueOf(sb), fcztvalue);
+                sb.setLength(0);
+                sb.append(wp.getId()).append("_").append("fcgl");
+                fcmap.put(String.valueOf(sb), fcglvalue);
+            }
+
+            //所属风场指标
+            map.put("fcmap", fcmap);
+        }
+
+
+
+
+/*************************************************风场指标*************************************************************/
+
+/*************************************************基础指标*************************************************************/
+            Map<String, Double> jczbmap = new HashMap<>();
+
+
+            if (InitialRunner.wpmap.containsKey(id)) {
+                Windpowerstation wp = InitialRunner.wpmap.get(id);
+
+                zjrl = wp.getCapacity();
+                zjts = Double.valueOf(wp.getQuantity());
+            } else if (InitialRunner.pjmap.containsKey(id)) {
+                Project pj = InitialRunner.pjmap.get(id);
+
+                zjrl = pj.getCapacity();
+                zjts = Double.valueOf(pj.getQuantity());
+            } else if (InitialRunner.lnmap.containsKey(id)) {
+                Line ln = InitialRunner.lnmap.get(id);
+
+                zjrl = ln.getCapacity();
+                zjts = Double.valueOf(ln.getQuantity());
+            }
+
+            jczbmap.put("zjrl", zjrl);
+            jczbmap.put("zjts", zjts);
+
+            List<String> jczbls = new ArrayList<>();
+
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_SJGL).getCode());
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_RFDL).getCode());
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_YFDL).getCode());
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_NFDL).getCode());
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_SSFS).getCode());
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_SWDL).getCode());
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.ZBZGL).getCode());
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_ZZSGL).getCode());
+
+
+            List<PointData> jczblist = realApiUtil.getRealData(jczbls);
+
+            if (!jczblist.isEmpty() && jczblist.size() == jczbls.size()) {
+                //实际功率
+                sjgl = MathUtil.twoBit(jczblist.get(0).getPointValueInDouble());
+                jczbmap.put("sjgl", sjgl);
+                //日发电量
+                jczbmap.put("rfdl", MathUtil.twoBit(jczblist.get(1).getPointValueInDouble()));
+                //月发电量
+                jczbmap.put("yfdl", MathUtil.twoBit(jczblist.get(2).getPointValueInDouble()));
+                //年发电量
+                jczbmap.put("nfdl", MathUtil.twoBit(jczblist.get(3).getPointValueInDouble()));
+                //月利用小时
+                jczbmap.put("ylyxs", (new BigDecimal(jczblist.get(2).getPointValueInDouble()).multiply(new BigDecimal(10))).divide(new BigDecimal(zjrl), 2, RoundingMode.HALF_EVEN).doubleValue());
+                //年利用小时
+                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()));
+                //上网电量
+                jczbmap.put("swdl", MathUtil.twoBit(jczblist.get(5).getPointValueInDouble()));
+                //保证功率
+                bzgl = new BigDecimal(jczblist.get(6).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                jczbmap.put("bzgl", bzgl);
+                //应发功率
+                yfgl = new BigDecimal(jczblist.get(7).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                jczbmap.put("yfgl", yfgl);
+
+            } else {
+                //实际功率
+                jczbmap.put("sjgl", 0.0);
+                //日发电量
+                jczbmap.put("rfdl", 0.0);
+                //月发电量
+                jczbmap.put("yfdl", 0.0);
+                //年发电量
+                jczbmap.put("nfdl", 0.0);
+                //月利用小时
+                jczbmap.put("ylyxs", 0.0);
+                //年利用小时
+                jczbmap.put("nlyxs", 0.0);
+                //实时风速
+                jczbmap.put("ssfs", 0.0);
+                //上网电量
+                jczbmap.put("swdl", 0.0);
+                //保证功率
+                jczbmap.put("bzgl", 0.0);
+                //应发功率
+                jczbmap.put("yfgl", 0.0);
+
+            }
+
+
+            if (id.equals(QS)) {
+                // 减排二氧化碳
+                Double jpeyht = realApiUtil.getRealData(ConstantTR.JPEYHT).getPointValueInDouble();
+                // 节约标煤
+                Double jybm = realApiUtil.getRealData(ConstantTR.JYBM).getPointValueInDouble();
+                // 减排二氧化硫
+                Double jpeyhl = realApiUtil.getRealData(ConstantTR.JPEYHL).getPointValueInDouble();
+                // 节约水
+                Double jys = realApiUtil.getRealData(ConstantTR.JYS).getPointValueInDouble();
+                // 安全天数
+                Double aqts = realApiUtil.getRealData(ConstantTR.AQTS).getPointValueInDouble();
+
+                Double gfsjgl = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(GF, Constant.TPOINT_WP_SJGL)).getPointValueInDouble();
+
+                bzgl = bzgl + gfsjgl;
+                yfgl = yfgl + gfsjgl;
+                jczbmap.put("aqts", StringUtils.round(aqts, 2));
+                jczbmap.put("jpeyht", StringUtils.round(jpeyht, 2));
+                jczbmap.put("jybm", StringUtils.round(jybm, 2));
+                jczbmap.put("jpeyhl", StringUtils.round(jpeyhl, 2));
+                jczbmap.put("jys", StringUtils.round(jys, 2));
+
+            }
+            if (bzgl == 0.0) {
+                bzgl = 1.0;
+            }
+            Double glbz = new BigDecimal(sjgl).divide(new BigDecimal(bzgl), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+            if (bzgl == 1) {
+                bzgl = 0.0;
+            }
+            if (glbz > 100) {
+                glbz = 100.0;
+            }
+            jczbmap.put("glbz", StringUtils.round(glbz, 2));
+            map.put("jczbmap", jczbmap);
+
+
+/*************************************************基础指标*************************************************************/
+
+
+/*************************************************明细状态*************************************************************/
+
+            Map<String, Double> mxztmap = new HashMap<>();
+
+            List<String> mxztls = new ArrayList<>();
+            //待机台数
+            mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.DJNUM).getCode());
+            //手动停机台数
+            mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TJNUM).getCode());
+            //正常发电台数
+            mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.FDNUM).getCode());
+            // 缺陷降出力台数
+            mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.FDJCLNUM).getCode());
+            // 限电降出力台数
+            mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.XDJCLNUM).getCode());
+            // 限电停机台数
+            mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.XDTJNUM).getCode());
+            // 故障停机台数
+            mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.GZNUM).getCode());
+            // 场内受累停机台数
+            mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.CNGZNUM).getCode());
+            // 检修停机台数
+            mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.JXNUM).getCode());
+            // 场内受累检修台数
+            mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.CNJXNUM).getCode());
+            // 电网受累台数
+            mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.DWSLNUM).getCode());
+            // 环境受累台数
+            mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.HJSLNUM).getCode());
+            // 风机离线台数
+            mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.LXNUM).getCode());
+
+
+            List<PointData> mxztlist = realApiUtil.getRealData(mxztls);
+
+            if (!mxztlist.isEmpty() && mxztlist.size() == mxztls.size()) {
+                mxztmap.put("djts", MathUtil.twoBit(mxztlist.get(0).getPointValueInDouble()));
+                mxztmap.put("sdtjts", MathUtil.twoBit(mxztlist.get(1).getPointValueInDouble()));
+                mxztmap.put("yxts", MathUtil.twoBit(mxztlist.get(2).getPointValueInDouble()));
+                mxztmap.put("fdjclts", MathUtil.twoBit(mxztlist.get(3).getPointValueInDouble()));
+                mxztmap.put("xdjclts", MathUtil.twoBit(mxztlist.get(4).getPointValueInDouble()));
+                mxztmap.put("xdtjts", MathUtil.twoBit(mxztlist.get(5).getPointValueInDouble()));
+                mxztmap.put("gzts", MathUtil.twoBit(mxztlist.get(6).getPointValueInDouble()));
+                mxztmap.put("cnslgzts", MathUtil.twoBit(mxztlist.get(7).getPointValueInDouble()));
+                mxztmap.put("jxts", MathUtil.twoBit(mxztlist.get(8).getPointValueInDouble()));
+                mxztmap.put("cnsljxts", MathUtil.twoBit(mxztlist.get(9).getPointValueInDouble()));
+                mxztmap.put("dwslts", MathUtil.twoBit(mxztlist.get(10).getPointValueInDouble()));
+                mxztmap.put("hjslts", MathUtil.twoBit(mxztlist.get(11).getPointValueInDouble()));
+                mxztmap.put("lxts", MathUtil.twoBit(mxztlist.get(12).getPointValueInDouble()));
+            } else {
+
+                mxztmap.put("djts", 0.0);
+                mxztmap.put("sdtjts", 0.0);
+                mxztmap.put("yxts", 0.0);
+                mxztmap.put("fdjclts", 0.0);
+                mxztmap.put("xdjclts", 0.0);
+                mxztmap.put("xdtjts", 0.0);
+                mxztmap.put("gzts", 0.0);
+                mxztmap.put("cnslgzts", 0.0);
+                mxztmap.put("jxts", 0.0);
+                mxztmap.put("cnsljxts", 0.0);
+                mxztmap.put("dwslts", 0.0);
+                mxztmap.put("hjslts", 0.0);
+                mxztmap.put("lxts", 0.0);
+            }
+            map.put("mxztmap", mxztmap);
+//
+
+/*************************************************明细状态*************************************************************/
+
+/*************************************************五项损失**************************************************************/
+
+            Map<String, Double> wxssmap = new HashMap<>();
+            List<String> wxssls = new ArrayList<>();
+
+            // 日场内受累检修
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RLZSSDL).getCode());
+            // 日场内受累故障
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RSZSSDL).getCode());
+            // 月场内受累检修
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YLZSSDL).getCode());
+            // 月场内受累故障
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YSZSSDL).getCode());
+            // 年场内受累检修
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NLZSSDL).getCode());
+            // 年场内受累故障
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NSZSSDL).getCode());
+
+            //日待机损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RSDJZSDL).getCode());
+            //日手动停机损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RSSTZSDL).getCode());
+            //日性能损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RXNZSDL).getCode());
+            //日缺陷降出力损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RSQXZSDL).getCode());
+            //日故障损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RGZSSDL).getCode());
+            //日检修损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RJXSSDL).getCode());
+
+            //月待机损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YSDJZSDL).getCode());
+            //月手动停机损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YSSTZSDL).getCode());
+            //月性能损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YXNZSDL).getCode());
+            //月缺陷降出力损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YSQXZSDL).getCode());
+            //月故障损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YGZSSDL).getCode());
+            //月检修损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YJXSSDL).getCode());
+
+
+            //年待机损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NSDJZSDL).getCode());
+            //年手动停机损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NSSTZSDL).getCode());
+            //年性能损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NXNZSDL).getCode());
+            //年缺陷降出力损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NSQXZSDL).getCode());
+            //年故障损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NGZSSDL).getCode());
+            //年检修损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NJXSSDL).getCode());
+
+
+            //日限电损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RXDSSDL).getCode());
+            //月限电损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YXDSSDL).getCode());
+            //年限电损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NXDSSDL).getCode());
+
+
+            //日场外受累电网
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RWZSSDL).getCode());
+            // 日场外受累天气
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RTZSSDL).getCode());
+            // 月场外受累电网
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YWZSSDL).getCode());
+            // 月场外受累天气
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YTZSSDL).getCode());
+            // 年场外受累电网
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NWZSSDL).getCode());
+            // 年场外受累天气
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NTZSSDL).getCode());
+
+
+            List<PointData> wxsslist = realApiUtil.getRealData(wxssls);
+
+            if (!wxsslist.isEmpty() && wxsslist.size() == wxssls.size()) {
+
+                Double rjxsl = MathUtil.twoBit(wxsslist.get(0).getPointValueInDouble());
+                // 日场内受累故障
+                Double rgzzsl = MathUtil.twoBit(wxsslist.get(1).getPointValueInDouble());
+                // 月场内受累检修
+                Double yjxsl = MathUtil.twoBit(wxsslist.get(2).getPointValueInDouble());
+                // 月场内受累故障
+                Double ygzzsl = MathUtil.twoBit(wxsslist.get(3).getPointValueInDouble());
+                // 年场内受累检修
+                Double njxsl = MathUtil.twoBit(wxsslist.get(4).getPointValueInDouble());
+                // 年场内受累故障
+                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);
+
+                //日待机损失
+                Double rdjss = MathUtil.twoBit(wxsslist.get(6).getPointValueInDouble());
+                //日手动停机损失
+                Double rsdtjss = MathUtil.twoBit(wxsslist.get(7).getPointValueInDouble());
+                //日性能损失
+                Double rxnss = MathUtil.twoBit(wxsslist.get(8).getPointValueInDouble());
+                //日缺陷降出力损失
+                Double rqxjclss = MathUtil.twoBit(wxsslist.get(9).getPointValueInDouble());
+
+                //日欠发损失=日待机损失+日手动停机损失+日性能损失+日缺陷降出力损失
+                Double rqfssdl = new BigDecimal(rdjss + rsdtjss + rxnss + rqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                Double rgzss = MathUtil.twoBit(wxsslist.get(10).getPointValueInDouble());
+                //日故障损失电量=日故障损失+日故障受累
+                Double rgzssdl = new BigDecimal(rgzss + rgzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                //日检修损失电量=日检修损失+日检修受累
+                Double rjxss = MathUtil.twoBit(wxsslist.get(11).getPointValueInDouble());
+                Double rjxssdl = new BigDecimal(rjxss + rjxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+
+                wxssmap.put("rqfssdl", rqfssdl);
+                wxssmap.put("rgzssdl", rgzssdl);
+                wxssmap.put("rjxssdl", rjxssdl);
+
+                // 月场内受累检修
+                Double ydjss = MathUtil.twoBit(wxsslist.get(12).getPointValueInDouble());
+                // 月场内受累检修
+                Double ysdtjss = MathUtil.twoBit(wxsslist.get(13).getPointValueInDouble());
+                // 月场内受累检修
+                Double yxnss = MathUtil.twoBit(wxsslist.get(14).getPointValueInDouble());
+                // 月场内受累检修
+                Double yqxjclss = MathUtil.twoBit(wxsslist.get(15).getPointValueInDouble());
+                //月欠发损失=月待机损失+月手动停机损失+月性能损失+月缺陷降出力损失
+                Double yqfssdl = new BigDecimal(ydjss + ysdtjss + yxnss + yqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                Double ygzss = MathUtil.twoBit(wxsslist.get(16).getPointValueInDouble());
+                //月故障损失电量=月故障损失+月故障受累
+                Double ygzssdl = new BigDecimal(ygzss + ygzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                Double yjxss = MathUtil.twoBit(wxsslist.get(17).getPointValueInDouble());
+                //月检修损失电量=月检修损失+月检修受累
+                Double yjxssdl = new BigDecimal(yjxss + yjxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                wxssmap.put("yqfssdl", yqfssdl);
+                wxssmap.put("ygzssdl", ygzssdl);
+                wxssmap.put("yjxssdl", yjxssdl);
+
+                // 年场内受累检修
+                Double ndjss = MathUtil.twoBit(wxsslist.get(18).getPointValueInDouble());
+                // 年场内受累检修
+                Double nsdtjss = MathUtil.twoBit(wxsslist.get(19).getPointValueInDouble());
+                // 年场内受累检修
+                Double nxnss = MathUtil.twoBit(wxsslist.get(20).getPointValueInDouble());
+                // 年场内受累检修
+                Double nqxjclss = MathUtil.twoBit(wxsslist.get(21).getPointValueInDouble());
+
+                Double nqfssdl = new BigDecimal(ndjss + nsdtjss + nxnss + nqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                Double ngzss = MathUtil.twoBit(wxsslist.get(22).getPointValueInDouble());
+                //年故障损失电量=年故障损失+年故障受累
+                Double ngzssdl = new BigDecimal(ngzss + ngzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                Double njxss = MathUtil.twoBit(wxsslist.get(23).getPointValueInDouble());
+                //年检修损失电量=年检修损失+年检修受累
+                Double njxssdl = new BigDecimal(njxss + njxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                wxssmap.put("nqfssdl", nqfssdl);
+                wxssmap.put("ngzssdl", ngzssdl);
+                wxssmap.put("njxssdl", njxssdl);
+
+                double temp = 0.0;
+                temp = MathUtil.twoBit(wxsslist.get(24).getPointValueInDouble());
+                Double rxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                temp = MathUtil.twoBit(wxsslist.get(25).getPointValueInDouble());
+                Double yxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                temp = MathUtil.twoBit(wxsslist.get(26).getPointValueInDouble());
+                Double nxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                wxssmap.put("rxdssdl", StringUtils.round(rxdssdl < 0.0 ? 0.0 : rxdssdl, 2));
+                wxssmap.put("yxdssdl", StringUtils.round(yxdssdl < 0.0 ? 0.0 : yxdssdl, 2));
+                wxssmap.put("nxdssdl", StringUtils.round(nxdssdl < 0.0 ? 0.0 : nxdssdl, 2));
+
+                Double rdwsl = MathUtil.twoBit(wxsslist.get(27).getPointValueInDouble());
+                Double rtqsl = MathUtil.twoBit(wxsslist.get(28).getPointValueInDouble());
+                Double rslssdl = new BigDecimal(rdwsl + rtqsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                Double ydwsl = MathUtil.twoBit(wxsslist.get(29).getPointValueInDouble());
+                Double ytqsl = MathUtil.twoBit(wxsslist.get(30).getPointValueInDouble());
+                Double yslssdl = new BigDecimal(ydwsl + ytqsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                Double ndwsl = MathUtil.twoBit(wxsslist.get(31).getPointValueInDouble());
+                Double ntqsl = MathUtil.twoBit(wxsslist.get(32).getPointValueInDouble());
+                Double nslssdl = new BigDecimal(ndwsl + ntqsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                wxssmap.put("rslssdl", rslssdl);
+                wxssmap.put("yslssdl", yslssdl);
+                wxssmap.put("nslssdl", nslssdl);
+
+            } else {
+
+                wxssmap.put("rjxsl", 0.0);
+                wxssmap.put("rgzzsl", 0.0);
+                wxssmap.put("yjxsl", 0.0);
+                wxssmap.put("ygzzsl", 0.0);
+                wxssmap.put("njxsl", 0.0);
+                wxssmap.put("ngzzsl", 0.0);
+                wxssmap.put("rqfssdl", 0.0);
+                wxssmap.put("rgzssdl", 0.0);
+                wxssmap.put("rjxssdl", 0.0);
+
+                wxssmap.put("yqfssdl", 0.0);
+                wxssmap.put("ygzssdl", 0.0);
+                wxssmap.put("yjxssdl", 0.0);
+
+                wxssmap.put("nqfssdl", 0.0);
+                wxssmap.put("ngzssdl", 0.0);
+                wxssmap.put("njxssdl", 0.0);
+
+
+                wxssmap.put("rxdssdl", 0.0);
+                wxssmap.put("yxdssdl", 0.0);
+                wxssmap.put("nxdssdl", 0.0);
+
+
+                wxssmap.put("rslssdl", 0.0);
+                wxssmap.put("yslssdl", 0.0);
+                wxssmap.put("nslssdl", 0.0);
+
+            }
+            map.put("wxssmap", wxssmap);
+
+/****************************************************五项损失************************************************************/
+
+
+/****************************************************日电量历史**********************************************************/
+
+            List<DataVo> rdlvos = findPowerWpBar(id);
+            map.put("rdlvos", rdlvos);
+/*************************************************日电量历史*************************************************************/
+
+
+/*************************************************关系库指标*************************************************************/
+
+            Map<String, Double> gxkmap = new HashMap<>();
+            List<Windpowerinfoday> wpdls = windpowerinfodayService.getWindpowerinfodayList(id, DateUtils.truncate(new Date()));
+            if (!wpdls.isEmpty()) {
+                Windpowerinfoday wd = wpdls.get(0);
+                gxkmap.put("ndxkyss", wd.getYeardxkyxs());
+                gxkmap.put("nsbklyl", wd.getYearsbklyl());
+
+            } else {
+                gxkmap.put("ndxkyss", 0.0);
+                gxkmap.put("nsbklyl", 0.0);
+            }
+            Calendar cal = Calendar.getInstance();
+            cal.setTime(new Date());
+            int year = cal.get(Calendar.YEAR);
+            List<ProjectPlan> pjls = projectPlanService.getProjectPlanList(String.valueOf(year));
+
+            // 获取计划发电量信息
+            setPlanInfo(gxkmap, pjls, id);
+
+            Double ywcl = 0.0;
+            Double nwcl = 0.0;
+
+            Double yfdljh = 0.0;
+            Double nfdljh = 0.0;
+
+            Double yfdl = jczbmap.get("yfdl");
+            Double nfdl = jczbmap.get("nfdl");
+
+            yfdljh = gxkmap.get("yfdljh");
+            nfdljh = gxkmap.get("nfdljh");
+
+
+
+            if (yfdljh == 0.0) {
+                nfdljh = 1.0;
+            }
+            if (yfdljh != 0.0) {
+                ywcl = new BigDecimal(yfdl).divide(new BigDecimal(yfdljh), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+            }
+            if (nfdljh == 0.0) {
+                nfdljh = 1.0;
+            }
+            if (nfdljh != 0.0) {
+                nwcl = new BigDecimal(nfdl).divide(new BigDecimal(nfdljh), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+            }
+
+            if (yfdljh > 100) {
+                yfdljh = 100.0;
+            }
+            if (nfdljh > 100) {
+                nfdljh = 100.0;
+            }
+
+            gxkmap.put("ywcl", StringUtils.round(ywcl, 2));
+            gxkmap.put("nwcl", StringUtils.round(nwcl, 2));
+
+            map.put("gxkmap", gxkmap);
+        }
+/*************************************************关系库指标**************************************************************/
+
+        return map;
+    }
+
+    public List<DataVo> findPowerWpBar(String wpId) throws Exception {
+        List<DataVo> vos = new ArrayList<DataVo>();
+        if (StringUtils.empty(wpId)) {
+            wpId = "0";
+        }
+
+        Calendar c = Calendar.getInstance();
+        c.set(Calendar.DAY_OF_MONTH, c.getActualMinimum(Calendar.DAY_OF_MONTH));
+        c.add(Calendar.DAY_OF_MONTH, 1);
+        // c.add(Calendar.MONTH, -1);
+        c.set(Calendar.HOUR_OF_DAY, 0);
+        c.set(Calendar.MINUTE, 0);
+        c.set(Calendar.SECOND, 0);
+        Date beginDate = c.getTime();
+
+        c = Calendar.getInstance();
+        // c.add(Calendar.MONTH, -1);
+        c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
+        c.add(Calendar.DAY_OF_MONTH, 1);
+        c.set(Calendar.HOUR_OF_DAY, 0);
+        c.set(Calendar.MINUTE, 0);
+        c.set(Calendar.SECOND, 0);
+        Date endDate = c.getTime();
+        c = Calendar.getInstance();
+        long num = c.get(Calendar.DAY_OF_MONTH);
+        // long num = 30;
+
+        WindPowerStationTestingPoint2 rfdlai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_RFDL);
+        WindPowerStationTestingPoint2 swdlai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SWDL);
+        WindPowerStationTestingPoint2 gwdlai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_GWDL);
+        WindPowerStationTestingPoint2 ssfs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_PJFS);
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+        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 = realApiUtil.getHistoryDatasSnap(ssfs, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
+
+        if (!rfdls.isEmpty() && !swdls.isEmpty() && !gwdls.isEmpty()) {
+            Calendar cal = Calendar.getInstance();
+            int today = c.get(Calendar.DAY_OF_MONTH);
+            // int today = 30;
+            for (int i = 0; i < rfdls.size(); i++) {
+                DataVo vo = new DataVo();
+
+                Date date = new Date(rfdls.get(i).getPointTime() * 1000);
+                cal.setTime(date);
+
+                // vo.setTime(dateformat.parse(entry.getKey()).getTime());
+
+                if (i + 1 <= today) {
+                    vo.setTimestr(i + 1 + "日");
+                    vo.setValue1(StringUtils.round(rfdls.get(i).getPointValueInDouble(), 2));// 日发电量
+                    vo.setValue2(StringUtils.round(swdls.get(i).getPointValueInDouble(), 2));// 上网电量
+                    vo.setValue3(StringUtils.round(gwdls.get(i).getPointValueInDouble(), 2));// 购网电量
+                    vo.setSpeed(StringUtils.round(ssfss.get(i).getPointValueInDouble(), 2));
+                } else {
+                    vo.setTimestr("");
+                    vo.setValue1(0.0);// 日发电量
+                    vo.setValue2(0.0);// 上网电量
+                    vo.setValue3(0.0);// 购网电量
+                    //vo.setSpeed(0.0);
+                }
+
+                vos.add(vo);
+            }
+        }
+
+        if (vos.size() < 31) {
+            for (int i = 0; i < 30; i++) {
+                DataVo vo = new DataVo();
+                vo.setTimestr("");
+
+                vo.setValue1(0.0);// 日发电量
+                vo.setValue2(0.0);// 上网电量
+                vo.setValue3(0.0);// 购网电量
+                // vo.setSpeed(0.0);
+                vos.add(vo);
+                if (vos.size() == 31) {
+                    break;
+                }
+            }
+        }
+
+        return vos;
+    }
+
+    private void setPlanInfo(Map<String, Double> gxkmap, List<ProjectPlan> planls, String id) {
+
+        double yfdljh = 0.0;
+        double nfdljh = 0.0;
+
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(new Date());
+        int month = cal.get(Calendar.MONTH) + 1;
+        int num=1;
+
+        List<ProjectPlan> planlist=new ArrayList<>();
+
+        for(ProjectPlan pl:planls)
+        {
+            if (id.equals(QS)) {
+                planlist.add(pl);
+            }else  if (id.equals(FD)) {
+                if (pl.getWindpower().endsWith("FDC")) {
+                    planlist.add(pl);
+                }
+            }else  if (id.equals(GF)) {
+                if (pl.getWindpower().endsWith("GDC")) {
+                    planlist.add(pl);
+                }
+            }else  if (InitialRunner.wpmap.containsKey(id)) {
+                if (pl.getWindpower().equals(id)) {
+                    planlist.add(pl);
+                }
+            }else  if (InitialRunner.pjmap.containsKey(id)) {
+                if (pl.getProjectid().equals(id)) {
+                    planlist.add(pl);
+                }
+            }else  if (InitialRunner.lnmap.containsKey(id)) {
+                Line ln=InitialRunner.lnmap.get(id);
+
+                if (InitialRunner.lnsmap.containsKey(id)) {
+                    List<Line> linels = InitialRunner.lnsmap.get(id);
+                    if (!linels.isEmpty()) {
+                        num = linels.size();
+                    }
+                } else {
+                    num = 1;
+                }
+
+                if (pl.getProjectid().equals(ln.getProjectid())) {
+                    planlist.add(pl);
+                }
+            }
+        }
+
+        for (ProjectPlan plan : planlist) {
+
+            double fdl = null != plan.getGeneratingcapacity() ? Double.valueOf(plan.getGeneratingcapacity()) : 0.0;
+
+            if (StringUtils.notEmp(plan.getMonth())) {
+                int planmonth = Integer.valueOf(plan.getMonth());
+                if (planmonth == month) {
+
+                    yfdljh = yfdljh + fdl;
+                }
+
+                nfdljh = nfdljh + fdl;
+            }
+        }
+
+        if (InitialRunner.lnmap.containsKey(id)) {
+            yfdljh = new BigDecimal(yfdljh).divide(new BigDecimal(num), 2, RoundingMode.HALF_EVEN).doubleValue();
+            nfdljh = new BigDecimal(nfdljh).divide(new BigDecimal(num), 2, RoundingMode.HALF_EVEN).doubleValue();
+        }
+        gxkmap.put("yfdljh", StringUtils.round(yfdljh, 0));
+        gxkmap.put("nfdljh", StringUtils.round(nfdljh, 0));
+
+
+    }
+
+
+
+}
+
+

+ 387 - 0
src/main/java/com/gyee/frame/service/websocket/MatrixDetialPushService.java

@@ -0,0 +1,387 @@
+package com.gyee.frame.service.websocket;
+
+
+import com.gyee.frame.common.spring.Constant;
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.Windpowerstation;
+import com.gyee.frame.model.auto.Windturbine;
+import com.gyee.frame.model.custom.MatrixVo;
+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.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.StringUtils;
+import com.gyee.frame.util.golden.EdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class MatrixDetialPushService {
+
+
+    @Resource
+    private WindPowerstationTestingPointService windPowerstationTestingPointService;
+    @Resource
+    private WindpowerinfodayService windpowerinfodayService;
+    @Resource
+    private ProjectPlanService projectPlanService;
+    @Resource
+    private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
+
+
+
+    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+
+
+    public Map<String, Object> genreSetMap() throws Exception {
+
+        Map<String, Object> map = findMatrix();
+
+
+        return map;
+
+    }
+
+    private Map<String, Object> findMatrix() throws Exception {
+        Map<String, Object> map = new HashMap<String, Object>();
+
+        Map<String, Object> wpmap = new HashMap<String, Object>();
+
+
+
+        int fcdjnum = 0;
+        int fcsdtjnum = 0;
+        int fczcfdnum = 0;
+        int fcqxjclnum = 0;
+        int fcxdjclnum = 0;
+        int fcxdtjnum = 0;
+        int fcgztjnum = 0;
+        int fccnsltjnum = 0;
+        int fcjxtjnum = 0;
+        int fccnsljxnum = 0;
+        int fcdwslnum = 0;
+        int fchjslnum = 0;
+        int fclxnum = 0;
+
+        int gfdjnum = 0;
+        int gfsdtjnum = 0;
+        int gfzcfdnum = 0;
+        int gfqxjclnum = 0;
+        int gfxdjclnum = 0;
+        int gfxdtjnum = 0;
+        int gfgztjnum = 0;
+        int gfcnsltjnum = 0;
+        int gfjxtjnum = 0;
+        int gfcnsljxnum = 0;
+        int gfdwslnum = 0;
+        int gfhjslnum = 0;
+        int gflxnum = 0;
+        String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
+
+        Map<String, List<MatrixVo>> fjmap = new HashMap<>();
+        Map<String, Map<String, Double>> fczbmap = new HashMap<>();
+        for (Windpowerstation wp : InitialRunner.wpallls) {
+
+            Map<String, Double> jczbmap = new HashMap<>();
+
+        /*************************************************风场指标统计*************************************************************/
+
+
+            List<String> jczbls = new ArrayList<>();
+            //实时风速
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_SSFS).getCode());
+            //预测功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), ycPoints1[0]).getCode());
+            //保证功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.ZBZGL).getCode());
+            //应发功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_ZZSGL).getCode());
+            //实际功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_SJGL).getCode());
+            //AGC出线有功
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.AGC001).getCode());
+            //AGC有功设定
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.AGC002).getCode());
+
+            //待机台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.DJNUM).getCode());
+            //手动停机台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TJNUM).getCode());
+            //正常发电台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.FDNUM).getCode());
+            // 缺陷降出力台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.FDJCLNUM).getCode());
+            // 限电降出力台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.XDJCLNUM).getCode());
+            // 限电停机台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.XDTJNUM).getCode());
+            // 故障停机台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.GZNUM).getCode());
+            // 场内受累停机台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.CNGZNUM).getCode());
+            // 检修停机台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.JXNUM).getCode());
+            // 场内受累检修台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.CNJXNUM).getCode());
+            // 电网受累台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.DWSLNUM).getCode());
+            // 环境受累台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.HJSLNUM).getCode());
+            // 风机离线台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.LXNUM).getCode());
+
+
+            List<PointData> jczblist = realApiUtil.getRealData(jczbls);
+
+            if (!jczblist.isEmpty() && jczblist.size() == jczbls.size()) {
+
+                //实时风速
+                jczbmap.put("ssfs", MathUtil.twoBit(jczblist.get(0).getPointValueInDouble()));
+                //预测功率
+                jczbmap.put("ycgl", MathUtil.twoBit(jczblist.get(1).getPointValueInDouble()));
+                //保证功率
+                double bzgl = new BigDecimal(jczblist.get(2).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                jczbmap.put("bzgl", bzgl);
+                //应发功率
+                double yfgl = new BigDecimal(jczblist.get(3).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                jczbmap.put("yfgl", yfgl);
+                //实际功率
+                jczbmap.put("sjgl", MathUtil.twoBit(jczblist.get(4).getPointValueInDouble()));
+                //AGC出线有功
+                jczbmap.put("agccxyg", MathUtil.twoBit(jczblist.get(5).getPointValueInDouble()));
+                //AGC有功设定
+                jczbmap.put("agcygsd", MathUtil.twoBit(jczblist.get(6).getPointValueInDouble()));
+                //待机台数
+                Double djnum = MathUtil.twoBit(jczblist.get(7).getPointValueInDouble());
+                jczbmap.put("djnum", djnum);
+                //手动停机台数
+                Double sdtjnum = MathUtil.twoBit(jczblist.get(8).getPointValueInDouble());
+                jczbmap.put("sdtjts", sdtjnum);
+                //正常发电台数
+                Double zcfdnum = MathUtil.twoBit(jczblist.get(9).getPointValueInDouble());
+                jczbmap.put("zcfdnum", zcfdnum);
+                //缺陷降出力台数
+                Double qxjclnum = MathUtil.twoBit(jczblist.get(10).getPointValueInDouble());
+                jczbmap.put("qxjclnum", qxjclnum);
+                // 限电降出力台数
+                Double xdjclnum = MathUtil.twoBit(jczblist.get(11).getPointValueInDouble());
+                jczbmap.put("xdjclnum", xdjclnum);
+                // 限电停机台数
+                Double xdtjnum = MathUtil.twoBit(jczblist.get(12).getPointValueInDouble());
+                jczbmap.put("xdtjnum", xdtjnum);
+                // 故障停机台数
+                Double gztjnum = MathUtil.twoBit(jczblist.get(13).getPointValueInDouble());
+                jczbmap.put("gztjnum", gztjnum);
+                // 场内受累停机台数
+                Double cnsltjnum = MathUtil.twoBit(jczblist.get(14).getPointValueInDouble());
+                jczbmap.put("cnsltjnum", cnsltjnum);
+                // 检修停机台数
+                Double jxtjnum = MathUtil.twoBit(jczblist.get(15).getPointValueInDouble());
+                jczbmap.put("jxtjnum", jxtjnum);
+                // 场内受累检修台数
+                Double cnsljxnum = MathUtil.twoBit(jczblist.get(16).getPointValueInDouble());
+                jczbmap.put("cnsljxnum", cnsljxnum);
+                // 电网受累台数
+                Double dwslnum = MathUtil.twoBit(jczblist.get(17).getPointValueInDouble());
+                jczbmap.put("dwslnum", dwslnum);
+                // 环境受累台数
+                Double hjslnum = MathUtil.twoBit(jczblist.get(18).getPointValueInDouble());
+                jczbmap.put("hjslnum", hjslnum);
+                // 风机离线台数
+                Double lxnum = MathUtil.twoBit(jczblist.get(19).getPointValueInDouble());
+                jczbmap.put("lxnum", lxnum);
+
+                if (wp.getId().endsWith("FDC")) {
+
+                    fcdjnum = fcdjnum + djnum.intValue();
+                    fcsdtjnum = fcsdtjnum + sdtjnum.intValue();
+                    fczcfdnum = fczcfdnum + zcfdnum.intValue();
+                    fcqxjclnum = fcqxjclnum + qxjclnum.intValue();
+                    fcxdjclnum = fcxdjclnum + xdjclnum.intValue();
+                    fcxdtjnum = fcxdtjnum + xdtjnum.intValue();
+                    fcgztjnum = fcgztjnum + gztjnum.intValue();
+                    fccnsltjnum = fccnsltjnum + cnsltjnum.intValue();
+                    fcjxtjnum = fcjxtjnum + jxtjnum.intValue();
+                    fccnsljxnum = fccnsljxnum + cnsljxnum.intValue();
+                    fcdwslnum = fcdwslnum + dwslnum.intValue();
+                    fchjslnum = fchjslnum + hjslnum.intValue();
+                    fclxnum = fclxnum + lxnum.intValue();
+
+                } else if (wp.getId().endsWith("GDC")) {
+
+                    gfdjnum = gfdjnum + djnum.intValue();
+                    gfsdtjnum = gfsdtjnum + sdtjnum.intValue();
+                    gfzcfdnum = gfzcfdnum + zcfdnum.intValue();
+                    gfqxjclnum = gfqxjclnum + qxjclnum.intValue();
+                    gfxdjclnum = gfxdjclnum + xdjclnum.intValue();
+                    gfxdtjnum = gfxdtjnum + xdtjnum.intValue();
+                    gfgztjnum = gfgztjnum + gztjnum.intValue();
+                    gfcnsltjnum = gfcnsltjnum + cnsltjnum.intValue();
+                    gfjxtjnum = gfjxtjnum + jxtjnum.intValue();
+                    gfcnsljxnum = gfcnsljxnum + cnsljxnum.intValue();
+                    gfdwslnum = gfdwslnum + dwslnum.intValue();
+                    gfhjslnum = gfhjslnum + hjslnum.intValue();
+                    gflxnum = gflxnum + lxnum.intValue();
+                }
+
+            } else {
+                //实时风速
+                jczbmap.put("ssfs", 0.0);
+                //预测功率
+                jczbmap.put("ssfs", 0.0);
+                //保证功率
+                jczbmap.put("bzgl", 0.0);
+                //应发功率
+                jczbmap.put("yfgl", 0.0);
+                //实际功率
+                jczbmap.put("sjgl", 0.0);
+                //AGC出线有功
+                jczbmap.put("agccxyg", 0.0);
+                //AGC有功设定
+                jczbmap.put("agcygsd", 0.0);
+                //待机台数
+                jczbmap.put("djnum",  0.0);
+                //手动停机台数
+                jczbmap.put("sdtjts", 0.0);
+                //正常发电台数
+                jczbmap.put("zcfdnum", 0.0);
+                //缺陷降出力台数
+                jczbmap.put("qxjclnum", 0.0);
+                // 限电降出力台数
+                jczbmap.put("xdjclnum", 0.0);
+                // 限电停机台数
+                jczbmap.put("xdtjnum", 0.0);
+                // 故障停机台数
+                jczbmap.put("gztjnum", 0.0);
+                // 场内受累停机台数
+                jczbmap.put("cnsltjnum", 0.0);
+                // 检修停机台数
+                jczbmap.put("jxtjnum", 0.0);
+                // 场内受累检修台数
+                jczbmap.put("cnsljxnum", 0.0);
+                // 电网受累台数
+                jczbmap.put("dwslnum", 0.0);
+                // 环境受累台数
+                jczbmap.put("hjslnum", 0.0);
+                // 风机离线台数
+                jczbmap.put("lxnum", 0.0);
+            }
+
+            fczbmap.put(wp.getId(),jczbmap);
+/*************************************************风场指标统计*************************************************************/
+
+
+
+
+/*************************************************风机指标统计*************************************************************/
+            List<String> fjzbls = new ArrayList<>();
+
+            List<Windturbine> wtls=InitialRunner.wp_wtmap.get(wp.getId());
+
+            List<MatrixVo> vos = new ArrayList<>();
+
+            for(Windturbine wt:wtls)
+            {
+                //风机状态
+                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getId());
+                //风速
+                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJSSFS).getId());
+                //功率
+                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJGL).getId());
+
+            }
+
+            List<PointData> fjzblist = realApiUtil.getRealData(fjzbls);
+
+            if (!fjzblist.isEmpty() && fjzblist.size() == fjzbls.size()) {
+
+
+                int step=3;
+                for(int i=0;i<wtls.size();i++)
+                {
+                    Windturbine wt=wtls.get(i);
+
+                    MatrixVo vo=new MatrixVo();
+                    vo.setWtId(wt.getId());
+                    if(StringUtils.notEmp(wt.getStatus()))
+                    {
+                        String num=wt.getStatus().substring(wt.getStatus().length()-3);
+                        if(StringUtils.isNumeric(num))
+                        {
+                            vo.setWtnum(Integer.valueOf(num));
+                        }
+
+                    }
+
+                    vo.setFjzt(MathUtil.twoBit(fjzblist.get(i*step).getPointValueInDouble()));
+                    vo.setFs(MathUtil.twoBit(fjzblist.get(i*step+1).getPointValueInDouble()));
+                    vo.setGl(MathUtil.twoBit(fjzblist.get(i*step+2).getPointValueInDouble()));
+                    vos.add(vo);
+
+                }
+
+            }
+            fjmap.put(wp.getId(),vos);
+
+/*************************************************风机指标统计*************************************************************/
+
+        }
+        //风场待机台数
+        map.put("fczbmap", fczbmap);
+        //风机指标对象
+        map.put("fjmap", fjmap);
+
+/*******************************************风场、光伏状态数量统计***********************************************************/
+
+
+
+        map.put("fcdjnum", fcdjnum);
+        map.put("fcsdtjnum", fcsdtjnum);
+        map.put("fczcfdnum", fczcfdnum);
+        map.put("fcqxjclnum", fcqxjclnum);
+        map.put("fcxdjclnum", fcxdjclnum);
+        map.put("fcxdtjnum", fcxdtjnum);
+        map.put("fcgztjnum", fcgztjnum);
+        map.put("fccnsltjnum", fccnsltjnum);
+        map.put("fcjxtjnum", fcjxtjnum);
+        map.put("fccnsljxnum", fccnsljxnum);
+        map.put("fcdwslnum", fcdwslnum);
+        map.put("fchjslnum", fchjslnum);
+        map.put("fclxnum", fclxnum);
+
+
+        map.put("gfdjnum", gfdjnum);
+        map.put("gfsdtjnum", gfsdtjnum);
+        map.put("gfzcfdnum", gfzcfdnum);
+        map.put("gfqxjclnum", gfqxjclnum);
+        map.put("gfxdjclnum", gfxdjclnum);
+        map.put("gfxdtjnum", gfxdtjnum);
+        map.put("gfgztjnum", gfgztjnum);
+        map.put("gfcnsltjnum", gfcnsltjnum);
+        map.put("gfjxtjnum", gfjxtjnum);
+        map.put("gfcnsljxnum", gfcnsljxnum);
+        map.put("gfdwslnum", gfdwslnum);
+        map.put("gfhjslnum", gfhjslnum);
+        map.put("gflxnum", gflxnum);
+
+
+/*******************************************风场、光伏状态数量统计***********************************************************/
+
+
+        return map;
+    }
+
+
+}
+
+

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

@@ -0,0 +1,303 @@
+package com.gyee.frame.service.websocket;
+
+
+import com.gyee.frame.common.spring.Constant;
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.Windpowerstation;
+import com.gyee.frame.model.auto.Windturbine;
+import com.gyee.frame.model.custom.MatrixVo;
+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.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.StringUtils;
+import com.gyee.frame.util.golden.EdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class MatrixPushService {
+
+
+    @Resource
+    private WindPowerstationTestingPointService windPowerstationTestingPointService;
+    @Resource
+    private WindpowerinfodayService windpowerinfodayService;
+    @Resource
+    private ProjectPlanService projectPlanService;
+    @Resource
+    private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
+
+
+
+    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+
+
+    public Map<String, Object> genreSetMap() throws Exception {
+
+        Map<String, Object> map = findMatrix();
+
+
+        return map;
+
+    }
+
+    private Map<String, Object> findMatrix() throws Exception {
+        Map<String, Object> map = new HashMap<String, Object>();
+
+        Map<String, Object> wpmap = new HashMap<String, Object>();
+
+        int fcdjnum = 0;
+        int fcyxnum = 0;
+        int fcgznum = 0;
+        int fclxnum = 0;
+        int fcwhnum = 0;
+        int fcxdnum = 0;
+
+        int gfdjnum = 0;
+        int gfyxnum = 0;
+        int gfgznum = 0;
+        int gflxnum = 0;
+        int gfwhnum = 0;
+        int gfxdnum = 0;
+        String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
+
+        Map<String, List<MatrixVo>> fjmap = new HashMap<>();
+        Map<String, Map<String, Double>> fczbmap = new HashMap<>();
+        for (Windpowerstation wp : InitialRunner.wpallls) {
+
+            Map<String, Double> jczbmap = new HashMap<>();
+
+        /*************************************************风场指标统计*************************************************************/
+
+
+            List<String> jczbls = new ArrayList<>();
+            //实时风速
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_SSFS).getCode());
+            //预测功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), ycPoints1[0]).getCode());
+            //保证功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.ZBZGL).getCode());
+            //应发功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_ZZSGL).getCode());
+            //实际功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_SJGL).getCode());
+            //AGC出线有功
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.AGC001).getCode());
+            //AGC有功设定
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.AGC002).getCode());
+            //待机台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WT_DJTS).getCode());
+            //运行台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WT_YXTS).getCode());
+            //故障台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WT_GZTJ).getCode());
+            //离线台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WT_TXZD).getCode());
+            //维护台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WT_WHTJ).getCode());
+            //限电台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WT_XDTS).getCode());
+
+
+            List<PointData> jczblist = realApiUtil.getRealData(jczbls);
+
+            if (!jczblist.isEmpty() && jczblist.size() == jczbls.size()) {
+
+                //实时风速
+                jczbmap.put("ssfs", MathUtil.twoBit(jczblist.get(0).getPointValueInDouble()));
+                //预测功率
+                jczbmap.put("ycgl", MathUtil.twoBit(jczblist.get(1).getPointValueInDouble()));
+                //保证功率
+                double bzgl = new BigDecimal(jczblist.get(2).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                jczbmap.put("bzgl", bzgl);
+                //应发功率
+                double yfgl = new BigDecimal(jczblist.get(3).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                jczbmap.put("yfgl", yfgl);
+                //实际功率
+                jczbmap.put("sjgl", MathUtil.twoBit(jczblist.get(4).getPointValueInDouble()));
+                //AGC出线有功
+                jczbmap.put("agccxyg", MathUtil.twoBit(jczblist.get(5).getPointValueInDouble()));
+                //AGC有功设定
+                jczbmap.put("agcygsd", MathUtil.twoBit(jczblist.get(6).getPointValueInDouble()));
+
+
+                Double djts = MathUtil.twoBit(jczblist.get(7).getPointValueInDouble());
+                //待机台数
+                jczbmap.put("djts", djts);
+                //运行台数
+                Double yxts = MathUtil.twoBit(jczblist.get(8).getPointValueInDouble());
+                jczbmap.put("yxts", yxts);
+                //故障台数
+                Double gzts = MathUtil.twoBit(jczblist.get(9).getPointValueInDouble());
+                jczbmap.put("gzts", gzts);
+                //离线台数
+                Double lxts = MathUtil.twoBit(jczblist.get(10).getPointValueInDouble());
+                jczbmap.put("lxts", lxts);
+                //维护台数
+                Double whts = MathUtil.twoBit(jczblist.get(11).getPointValueInDouble());
+                jczbmap.put("whts", whts);
+                //限电台数
+                Double xdts = MathUtil.twoBit(jczblist.get(12).getPointValueInDouble());
+                jczbmap.put("xdts", xdts);
+
+                if (wp.getId().endsWith("FDC")) {
+                    fcdjnum = fcdjnum + djts.intValue();
+                    fcyxnum = fcyxnum + yxts.intValue();
+                    fcgznum = fcgznum + gzts.intValue();
+                    fclxnum = fclxnum + lxts.intValue();
+                    fcwhnum = fcwhnum + whts.intValue();
+                    fcxdnum = fcxdnum + xdts.intValue();
+
+                } else if (wp.getId().endsWith("GDC")) {
+
+                    gfdjnum = gfdjnum + djts.intValue();
+                    gfyxnum = gfyxnum + yxts.intValue();
+                    gfgznum = gfgznum + gzts.intValue();
+                    gflxnum = gflxnum + lxts.intValue();
+                    gfwhnum = gfwhnum + whts.intValue();
+                    gfxdnum = gfxdnum + xdts.intValue();
+                }
+
+            } else {
+                //实时风速
+                jczbmap.put("ssfs", 0.0);
+                //预测功率
+                jczbmap.put("ssfs", 0.0);
+                //保证功率
+                jczbmap.put("bzgl", 0.0);
+                //应发功率
+                jczbmap.put("yfgl", 0.0);
+                //实际功率
+                jczbmap.put("sjgl", 0.0);
+                //AGC出线有功
+                jczbmap.put("agccxyg", 0.0);
+                //AGC有功设定
+                jczbmap.put("agcygsd", 0.0);
+                //待机台数
+                jczbmap.put("djts", 0.0);
+                //运行台数
+                jczbmap.put("yxts", 0.0);
+                //故障台数
+                jczbmap.put("gzts", 0.0);
+                //离线台数
+                jczbmap.put("lxts", 0.0);
+                //维护台数
+                jczbmap.put("whts", 0.0);
+                //限电台数
+                jczbmap.put("xdts", 0.0);
+            }
+
+            fczbmap.put(wp.getId(),jczbmap);
+/*************************************************风场指标统计*************************************************************/
+
+
+
+
+/*************************************************风机指标统计*************************************************************/
+            List<String> fjzbls = new ArrayList<>();
+
+            List<Windturbine> wtls=InitialRunner.wp_wtmap.get(wp.getId());
+
+            List<MatrixVo> vos = new ArrayList<>();
+
+            for(Windturbine wt:wtls)
+            {
+                //风机状态
+                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getId());
+                //风速
+                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJSSFS).getId());
+                //功率
+                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJGL).getId());
+
+            }
+
+            List<PointData> fjzblist = realApiUtil.getRealData(fjzbls);
+
+            if (!fjzblist.isEmpty() && fjzblist.size() == fjzbls.size()) {
+
+
+                int step=3;
+                for(int i=0;i<wtls.size();i++)
+                {
+                    Windturbine wt=wtls.get(i);
+
+                    MatrixVo vo=new MatrixVo();
+                    vo.setWtId(wt.getId());
+                    if(StringUtils.notEmp(wt.getStatus()))
+                    {
+                        String num=wt.getStatus().substring(wt.getStatus().length()-3);
+                        if(StringUtils.isNumeric(num))
+                        {
+                            vo.setWtnum(Integer.valueOf(num));
+                        }
+
+                    }
+
+                    vo.setFjzt(MathUtil.twoBit(fjzblist.get(i*step).getPointValueInDouble()));
+                    vo.setFs(MathUtil.twoBit(fjzblist.get(i*step+1).getPointValueInDouble()));
+                    vo.setGl(MathUtil.twoBit(fjzblist.get(i*step+2).getPointValueInDouble()));
+                    vos.add(vo);
+
+                }
+
+            }
+            fjmap.put(wp.getId(),vos);
+
+/*************************************************风机指标统计*************************************************************/
+
+        }
+        //风场待机台数
+        map.put("fczbmap", fczbmap);
+        //风机指标对象
+        map.put("fjmap", fjmap);
+
+/*******************************************风场、光伏状态数量统计***********************************************************/
+
+            //风场待机台数
+            map.put("fcdjnum", fcdjnum);
+            //风场运行台数
+            map.put("fcyxnum", fcyxnum);
+            //风场故障台数
+            map.put("fcgznum", fcgznum);
+            //风场离线台数
+            map.put("fclxnum", fclxnum);
+            //风场维护台数
+            map.put("fcwhnum", fcwhnum);
+            //风场限电台数
+            map.put("fcxdnum", fcxdnum);
+
+            //光伏待机台数
+            map.put("gfdjnum", gfdjnum);
+            //光伏运行台数
+            map.put("gfyxnum", gfyxnum);
+            //光伏故障台数
+            map.put("gfgznum", gfgznum);
+            //光伏离线台数
+            map.put("gflxnum", gflxnum);
+            //光伏维护台数
+            map.put("gfwhnum", gfwhnum);
+            //光伏限电台数
+            map.put("gfxdnum", gfxdnum);
+
+
+/*******************************************风场、光伏状态数量统计***********************************************************/
+
+
+        return map;
+    }
+
+
+}
+
+

+ 702 - 0
src/main/java/com/gyee/frame/service/websocket/RealPowerPushService.java

@@ -0,0 +1,702 @@
+package com.gyee.frame.service.websocket;
+
+
+import com.gyee.frame.common.spring.Constant;
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.WindPowerStationTestingPoint2;
+import com.gyee.frame.model.auto.Windpowerstation;
+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.WindpowerinfodayService;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.StringUtils;
+import com.gyee.frame.util.golden.EdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.*;
+
+@Service
+public class RealPowerPushService {
+
+
+    @Resource
+    private WindPowerstationTestingPointService windPowerstationTestingPointService;
+    @Resource
+    private WindpowerinfodayService windpowerinfodayService;
+    @Resource
+    private ProjectPlanService projectPlanService;
+
+
+    private final String QS = "0";
+    private final String FD = "-1";
+    private final String GF = "-2";
+
+    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+
+
+    public Map<String, Object> genreSetMap() throws Exception {
+
+        Map<String, Object> map = new HashMap<>();
+
+
+        map.put(QS, findRealPower(QS));
+        map.put(FD, findRealPower(FD));
+        map.put(GF, findRealPower(GF));
+        map.put("SBQ_FDC",findRealPower("SBQ_FDC"));
+        map.put("SBQ02_GC",findRealPower("SBQ02_GC"));
+        map.put("SBQ05_XL",findRealPower("SBQ05_XL"));
+
+        return map;
+
+    }
+
+    public Map<String, Object> findRealPower(String id) throws Exception {
+        Map<String, Object> map = new HashMap<String, Object>();
+        if (StringUtils.notEmp(id)) {
+
+
+/****************************************************曲线历史**********************************************************/
+            List<DataVo> glvos = findRealPowerChar(id, new Date());
+            map.put("glvos", glvos);
+/*************************************************曲线历史*************************************************************/
+        }
+        return map;
+    }
+    public List<DataVo> findRealPowerChar(String id, Date currentDate) throws Exception {
+
+        List<DataVo> vos = new ArrayList<DataVo>();
+
+
+        if (StringUtils.notEmp(id)) {
+
+            Calendar cal = Calendar.getInstance();
+
+            cal.setTime(currentDate);
+
+
+            cal.set(Calendar.HOUR_OF_DAY, 0);
+            cal.set(Calendar.MINUTE, 0);
+            cal.set(Calendar.SECOND, 0);
+            cal.set(Calendar.MILLISECOND, 0);
+
+            Date beginDate = cal.getTime();
+
+            cal.setTime(currentDate);
+
+            if (cal.get(Calendar.MINUTE) > 30) {
+                cal.set(Calendar.MINUTE, 0);
+                cal.add(Calendar.HOUR_OF_DAY, 1);
+            } else {
+                cal.set(Calendar.MINUTE, 0);
+            }
+
+            Date endDate = cal.getTime();
+
+            long pried = 3600l;
+            long num = DateUtils.hoursDiff(beginDate, endDate) * 3;
+            int cdqyc = 4; //未来4小时超短期预测
+            String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
+            String[] ycPoints2 = Constant.TPOINT_WP_FGLYC1HOUR2.split(",");
+            String[] ycPoints3 = Constant.TPOINT_QS3_YGCL.split(",");
+
+            int length = 72;
+
+            for (int i = 0; i < length; i++) {
+
+                DataVo vo = new DataVo();
+
+                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.setValue9(0.0);// 最优功率律
+
+                vos.add(vo);
+            }
+
+            if (id.equals(QS) || id.equals(FD) || id.equals(GF)) {
+
+
+                List<Windpowerstation> stations = new ArrayList<Windpowerstation>();
+                if (id.equals("") || id.equals(QS)) {
+                    for (Windpowerstation station : InitialRunner.wpallls) {
+                        stations.add(station);
+                    }
+                } else if (id.equals(FD)) {
+                    for (Windpowerstation station : InitialRunner.wpallls) {
+                        if (station.getId().endsWith("FDC")) {
+                            stations.add(station);
+                        }
+                    }
+                } else {
+                    for (Windpowerstation station : InitialRunner.wpallls) {
+                        if (station.getId().endsWith("GDC")) {
+                            stations.add(station);
+                        }
+                    }
+                }
+
+                for (Windpowerstation station : stations) {
+
+
+                    if (num > 0) {
+                        WindPowerStationTestingPoint2 ycgl1 = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(station.getId(), ycPoints1[0]);
+
+                        if (null != ycgl1) {
+                            List<PointData> datas = realApiUtil.getHistoryDatasSnap(ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried);
+                            if (!datas.isEmpty()) {
+
+                                for (int j = 0; j < datas.size(); j++) {
+
+                                    vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
+
+                                    double ycgl = (vos.get(j).getValue4() == null ? vos.get(0).getValue4() : vos.get(j).getValue4()) + (datas.get(j) == null ? datas.get(0).getPointValueInDouble() : datas.get(j).getPointValueInDouble());
+
+                                    vos.get(j).setValue4(StringUtils.round(ycgl, 2));
+
+                                    if (j == datas.size() - 1) {
+                                        cal.setTime(new Date(datas.get(j).getPointTime() * 1000));
+                                    }
+                                }
+                                int subresult = 0;
+                                int total = 0;
+
+                                if (length > datas.size()) {
+                                    subresult = length - datas.size();
+                                    if (subresult >= cdqyc) {
+                                        subresult = cdqyc;
+                                    }
+                                    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();
+
+                                        ycgl = (vos.get(datas.size() + i).getValue4() == null ? vos.get(0).getValue4() : 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);
+                                        }
+                                }
+
+                            }
+
+                        }
+
+                    }
+
+                }
+
+
+                // 实际发功率
+                WindPowerStationTestingPoint2 sjgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_SJGL);
+                // 总应发功率
+                WindPowerStationTestingPoint2 yfgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_ZZSGL);
+                // 总理论功率
+                WindPowerStationTestingPoint2 llgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_ZLLGL);
+                // 总保证功率
+                WindPowerStationTestingPoint2 bzgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.ZBZGL);
+                //实时平均风速
+                WindPowerStationTestingPoint2 pjfs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_SSFS);
+                // 最优功率
+                WindPowerStationTestingPoint2 zygl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_ZZYGL);
+
+
+                // 光伏实际发功率
+                WindPowerStationTestingPoint2 gdsjgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(GF, Constant.TPOINT_WP_SJGL);
+                List<PointData> gdsjglls = realApiUtil.getHistoryDatasSnap(gdsjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, pried);
+
+                try {
+
+
+                        if (null != yfgl) {
+
+
+                            List<PointData> yfglls = realApiUtil.getHistoryDatasSnap(yfgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, pried);
+
+                            double temp1 = 0;
+                            double temp2 = 0;
+                            for (int i = 0; i < vos.size(); i++) {
+
+                                if (i < yfglls.size() && StringUtils.notEmp(yfglls.get(i).getPointTime())) {
+
+                                    if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
+                                        temp1 = yfglls.get(i).getPointValueInDouble();
+                                        temp2 = gdsjglls.get(i).getPointValueInDouble();
+                                        temp1 = new BigDecimal(temp1).divide(new BigDecimal(100000), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+
+
+                                        if (id.equals(QS)) {
+                                            vos.get(i).setValue1(StringUtils.round(temp1 + temp2, 2));// 应发功率
+                                        } else {
+                                            vos.get(i).setValue1(StringUtils.round(temp1, 2));// 应发功率
+                                        }
+                                    } else {
+                                        vos.get(i).setValue1(0d);// 应发功率
+                                    }
+
+                                }
+                            }
+
+
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+
+                }
+
+                try {
+
+                    if (null != llgl) {
+                        List<PointData> llglls = realApiUtil.getHistoryDatasSnap(llgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, pried);
+
+                        int count = 0;
+                        double temp1 = 0;
+                        double temp2 = 0;
+                        for (int i = 0; i < vos.size(); i++) {
+
+                            if (i < llglls.size() && StringUtils.notEmp(llglls.get(i).getPointTime())) {
+
+                                if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
+                                    temp1 = llglls.get(i).getPointValueInDouble();
+                                    temp2 = gdsjglls.get(i).getPointValueInDouble();
+                                    temp1 = new BigDecimal(temp1).divide(new BigDecimal(100000), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+
+                                    if (Math.abs(temp1) < 10000) {
+
+                                        if (id.equals(QS)) {
+                                            vos.get(i).setValue3(StringUtils.round(temp1 + temp2, 2));// 理论功率
+                                        } else {
+                                            vos.get(i).setValue3(StringUtils.round(temp1, 2));// 理论功率
+                                        }
+
+                                    }
+
+                                    count++;
+                                } else {
+                                    vos.get(i).setValue3(0d);// 理论功率
+                                }
+
+                            }
+                        }
+
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+
+                }
+
+                try {
+                    if (null != bzgl) {
+                        List<PointData> bzglls = realApiUtil.getHistoryDatasSnap(bzgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, pried);
+
+                        int count = 0;
+                        double temp1 = 0;
+                        double temp2 = 0;
+                        for (int i = 0; i < vos.size(); i++) {
+
+                            if (i < bzglls.size() && StringUtils.notEmp(bzglls.get(i).getPointTime())) {
+
+                                if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
+                                    temp1 = bzglls.get(i).getPointValueInDouble();
+                                    temp2 = gdsjglls.get(i).getPointValueInDouble();
+                                    temp1 = new BigDecimal(temp1).divide(new BigDecimal(100000), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+
+                                    if (Math.abs(temp1) < 10000) {
+
+                                        if (id.equals(QS)) {
+                                            vos.get(i).setValue5(StringUtils.round(temp1 + temp2, 2));// 保证功率
+                                        } else {
+                                            vos.get(i).setValue5(StringUtils.round(temp1, 2));// 保证功率
+                                        }
+                                    }
+
+                                    count++;
+                                } else {
+                                    vos.get(i).setValue5(0d);// 保证功率
+                                }
+
+                            }
+                        }
+
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+
+                }
+
+                if (null != sjgl) {
+                    List<PointData> sjglls = realApiUtil.getHistoryDatasSnap(sjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, pried);
+                    int count = 0;
+                    double temp = 0;
+                    for (int i = 0; i < vos.size(); i++) {
+
+                        if (i < sjglls.size() && StringUtils.notEmp(sjglls.get(i).getPointTime())) {
+
+                            if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
+                                temp = sjglls.get(i).getPointValueInDouble();
+                                if (Math.abs(temp) < 10000) {
+                                    vos.get(i).setValue2(StringUtils.round(temp, 2));// 实际功率
+                                }
+
+                                count++;
+                            } else {
+                                vos.get(i).setValue2(0d);// 实际功率
+                            }
+
+                        }
+                    }
+
+                }
+                try {
+                    if (null != pjfs) {
+                        List<PointData> pjfsls = realApiUtil.getHistoryDatasSnap(pjfs, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, pried);
+
+                        double temp = 0;
+                        for (int i = 0; i < vos.size(); i++) {
+
+                            if (i < pjfsls.size() && StringUtils.notEmp(pjfsls.get(i).getPointTime())) {
+
+                                if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
+                                    temp = pjfsls.get(i).getPointValueInDouble();
+
+                                    if (Math.abs(temp) < 10000) {
+                                        vos.get(i).setValue6(StringUtils.round(temp, 2));// 平均风速
+                                    }
+                                } else {
+                                    vos.get(i).setValue6(0d);// 平均风速
+                                }
+
+                            }
+                        }
+                    }
+                } catch (Exception e) {
+
+                }
+                try {
+                    if (null != zygl) {
+                        List<PointData> zyglls = realApiUtil.getHistoryDatasSnap(zygl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, pried);
+
+                        double temp = 0;
+                        for (int i = 0; i < vos.size(); i++) {
+
+                            if (i < zyglls.size() && StringUtils.notEmp(zyglls.get(i).getPointTime())) {
+
+                                if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
+                                    temp = zyglls.get(i).getPointValueInDouble();
+                                    temp = new BigDecimal(temp).divide(new BigDecimal(100000), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                                    if (Math.abs(temp) < 10000) {
+                                        vos.get(i).setValue9(StringUtils.round(temp, 2));// 最优功率
+                                    }
+                                } else {
+                                    vos.get(i).setValue9(0d);// 最优功率
+                                }
+
+                            }
+                        }
+                    }
+                } catch (Exception e) {
+
+                }
+
+            }else  if(InitialRunner.wpmap.containsKey(id) || InitialRunner.pjmap.containsKey(id)  || InitialRunner.lnmap.containsKey(id))
+            {
+
+                if(InitialRunner.wpmap.containsKey(id) )
+                {
+                    if (num > 0) {
+                        WindPowerStationTestingPoint2 ycgl1 = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, ycPoints1[0]);
+
+                        if (null != ycgl1) {
+                            List<PointData> datas = realApiUtil.getHistoryDatasSnap(ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried);
+                            if (!datas.isEmpty()) {
+
+                                for (int j = 0; j < datas.size(); j++) {
+
+                                    vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
+
+                                    double ycgl = (vos.get(j).getValue4() == null ? vos.get(0).getValue4() : vos.get(j).getValue4()) + (datas.get(j) == null ? datas.get(0).getPointValueInDouble() : datas.get(j).getPointValueInDouble());
+
+                                    vos.get(j).setValue4(StringUtils.round(ycgl, 2));
+
+                                    if (j == datas.size() - 1) {
+                                        cal.setTime(new Date(datas.get(j).getPointTime() * 1000));
+                                    }
+                                }
+                                int subresult = 0;
+                                int total = 0;
+
+                                if (length > datas.size()) {
+                                    subresult = length - datas.size();
+                                    if (subresult >= cdqyc) {
+                                        subresult = cdqyc;
+                                    }
+                                    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(id, ycPoints2[i]);
+
+                                        double ycgl = realApiUtil.getRealData(ycglpoint).getPointValueInDouble();
+
+                                        ycgl = (vos.get(datas.size() + i).getValue4() == null ? vos.get(0).getValue4() : 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);
+                                        }
+                                }
+
+                            }
+
+                        }
+
+                    }
+                }
+
+
+                // 实际发功率
+                WindPowerStationTestingPoint2 sjgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_SJGL);
+                // 总应发功率
+                WindPowerStationTestingPoint2 yfgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_ZZSGL);
+                // 总理论功率
+                WindPowerStationTestingPoint2 llgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_ZLLGL);
+                // 总保证功率
+                WindPowerStationTestingPoint2 bzgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.ZBZGL);
+                //实时平均风速
+                WindPowerStationTestingPoint2 pjfs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_SSFS);
+                // 最优功率
+                WindPowerStationTestingPoint2 zygl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_ZZYGL);
+
+
+
+                try {
+
+
+                        if (null != yfgl) {
+                            List<PointData> yfglls = realApiUtil.getHistoryDatasSnap(yfgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, pried);
+
+                            double temp1 = 0;
+
+                            if(!InitialRunner.wpmap.containsKey(id))
+                            {
+                                cal.setTime(beginDate);
+                            }
+                            for (int i = 0; i < vos.size(); i++) {
+
+                                if(!InitialRunner.wpmap.containsKey(id))
+                                {
+                                    vos.get(i).setTime(cal.getTime().getTime());
+                                }
+
+                                if (i < yfglls.size() && StringUtils.notEmp(yfglls.get(i).getPointTime())) {
+
+                                    if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
+                                        temp1 = yfglls.get(i).getPointValueInDouble();
+
+                                        temp1 = new BigDecimal(temp1).divide(new BigDecimal(100000), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                                        if (Math.abs(temp1) < 10000) {
+                                            vos.get(i).setValue1(StringUtils.round(temp1, 2));// 应发功率
+                                        }
+
+                                    } else {
+                                        vos.get(i).setValue1(0d);// 应发功率
+                                    }
+
+                                }
+
+                                if(!InitialRunner.wpmap.containsKey(id))
+                                {
+                                    cal.add(Calendar.HOUR_OF_DAY, 1);
+                                }
+                            }
+
+                        }
+
+                } catch (Exception e) {
+                    e.printStackTrace();
+
+                }
+
+                try {
+                    if (null != llgl) {
+                        List<PointData> llglls = realApiUtil.getHistoryDatasSnap(llgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, pried);
+
+                        int count = 0;
+                        double temp1 = 0;
+
+                        for (int i = 0; i < vos.size(); i++) {
+
+                            if (i < llglls.size() && StringUtils.notEmp(llglls.get(i).getPointTime())) {
+
+                                if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
+                                    temp1 = llglls.get(i).getPointValueInDouble();
+
+                                    temp1 = new BigDecimal(temp1).divide(new BigDecimal(100000), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+
+                                    if (Math.abs(temp1) < 10000) {
+
+                                        vos.get(i).setValue3(StringUtils.round(temp1, 2));// 理论功率
+                                    }
+
+                                    count++;
+                                } else {
+                                    vos.get(i).setValue3(0d);// 理论功率
+                                }
+
+                            }
+                        }
+
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+
+                }
+
+                try {
+                    if (null != bzgl) {
+                        List<PointData> bzglls = realApiUtil.getHistoryDatasSnap(bzgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, pried);
+
+                        int count = 0;
+                        double temp1 = 0;
+                        for (int i = 0; i < vos.size(); i++) {
+
+                            if (i < bzglls.size() && StringUtils.notEmp(bzglls.get(i).getPointTime())) {
+
+                                if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
+                                    temp1 = bzglls.get(i).getPointValueInDouble();
+
+                                    temp1 = new BigDecimal(temp1).divide(new BigDecimal(100000), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+
+                                    if (Math.abs(temp1) < 10000) {
+
+                                        vos.get(i).setValue5(StringUtils.round(temp1, 2));// 保证功率
+                                    }
+
+                                    count++;
+                                } else {
+                                    vos.get(i).setValue5(0d);// 保证功率
+                                }
+
+                            }
+                        }
+
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+
+                }
+
+                if (null != sjgl) {
+                    List<PointData> sjglls = realApiUtil.getHistoryDatasSnap(sjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, pried);
+                    int count = 0;
+                    double temp = 0;
+                    for (int i = 0; i < vos.size(); i++) {
+
+                        if (i < sjglls.size() && StringUtils.notEmp(sjglls.get(i).getPointTime())) {
+
+                            if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
+                                temp = sjglls.get(i).getPointValueInDouble();
+                                if (Math.abs(temp) < 10000) {
+                                    vos.get(i).setValue2(StringUtils.round(temp, 2));// 实际功率
+                                }
+
+                                count++;
+                            } else {
+                                vos.get(i).setValue2(0d);// 实际功率
+                            }
+
+                        }
+                    }
+
+                }
+                try {
+                    if (null != pjfs) {
+                        List<PointData> pjfsls = realApiUtil.getHistoryDatasSnap(pjfs, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, pried);
+
+                        double temp = 0;
+                        for (int i = 0; i < vos.size(); i++) {
+
+                            if (i < pjfsls.size() && StringUtils.notEmp(pjfsls.get(i).getPointTime())) {
+
+                                if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
+                                    temp = pjfsls.get(i).getPointValueInDouble();
+
+                                    if (Math.abs(temp) < 10000) {
+                                        vos.get(i).setValue6(StringUtils.round(temp, 2));// 平均风速
+                                    }
+                                } else {
+                                    vos.get(i).setValue6(0d);// 平均风速
+                                }
+
+                            }
+                        }
+                    }
+                } catch (Exception e) {
+
+                }
+                try {
+                    if (null != zygl) {
+                        List<PointData> zyglls = realApiUtil.getHistoryDatasSnap(zygl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, pried);
+
+                        double temp = 0;
+                        for (int i = 0; i < vos.size(); i++) {
+
+                            if (i < zyglls.size() && StringUtils.notEmp(zyglls.get(i).getPointTime())) {
+
+                                if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
+                                    temp = zyglls.get(i).getPointValueInDouble();
+                                    temp = new BigDecimal(temp).divide(new BigDecimal(100000), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                                    if (Math.abs(temp) < 10000) {
+                                        vos.get(i).setValue9(StringUtils.round(temp, 2));// 最优功率
+                                    }
+                                } else {
+                                    vos.get(i).setValue9(0d);// 最优功率
+                                }
+
+                            }
+                        }
+                    }
+                } catch (Exception e) {
+
+                }
+
+            }
+
+        }
+
+        return vos;
+    }
+
+}
+
+

+ 541 - 0
src/main/java/com/gyee/frame/service/websocket/WpInfoPushService.java

@@ -0,0 +1,541 @@
+package com.gyee.frame.service.websocket;
+
+
+import com.gyee.frame.common.spring.Constant;
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.*;
+import com.gyee.frame.model.custom.PointData;
+import com.gyee.frame.service.ProjectPlanService;
+import com.gyee.frame.service.WindPowerstationTestingPointService;
+import com.gyee.frame.service.WindpowerinfodayService;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.StringUtils;
+import com.gyee.frame.util.golden.EdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.*;
+
+@Service
+public class WpInfoPushService {
+
+
+    @Resource
+    private WindPowerstationTestingPointService windPowerstationTestingPointService;
+    @Resource
+    private WindpowerinfodayService windpowerinfodayService;
+    @Resource
+    private ProjectPlanService projectPlanService;
+
+
+    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+
+
+
+    public Map<String, Object> genreSetMap() throws Exception {
+
+        Map<String, Object> map = new HashMap<>();
+
+        map.put("SBQ_FDC",findWpInfo("SBQ_FDC"));
+        map.put("SBQ02_GC",findWpInfo("SBQ02_GC"));
+        map.put("SBQ05_XL",findWpInfo("SBQ05_XL"));
+
+       return map;
+
+    }
+
+    public Map<String, Object> findWpInfo(String id) throws Exception {
+        Map<String, Object> map = new HashMap<String, Object>();
+        if (StringUtils.notEmp(id)) {
+
+
+            Double zjrl = 0.0;
+            Double zjts = 0.0;
+
+            Double sjgl = 0.0;
+            Double bzgl = 0.0;
+            Double yfgl = 0.0;
+
+/*************************************************基础指标*************************************************************/
+
+            if(InitialRunner.wpmap.containsKey(id))
+            {
+                Windpowerstation wp=InitialRunner.wpmap.get(id);
+
+                zjrl = wp.getCapacity();
+                zjts = Double.valueOf(wp.getQuantity());
+            }else  if(InitialRunner.pjmap.containsKey(id))
+            {
+                Project pj=InitialRunner.pjmap.get(id);
+
+                zjrl = pj.getCapacity();
+                zjts = Double.valueOf(pj.getQuantity());
+            }else  if(InitialRunner.lnmap.containsKey(id))
+            {
+                Line ln=InitialRunner.lnmap.get(id);
+
+                zjrl = ln.getCapacity();
+                zjts = Double.valueOf(ln.getQuantity());
+            }
+
+
+
+
+
+            Map<String, Double> jczbmap = new HashMap<>();
+
+            jczbmap.put("zjrl", zjrl);
+            jczbmap.put("zjts", zjts);
+
+            List<String> jczbls = new ArrayList<>();
+
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_SJGL).getCode());
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_RFDL).getCode());
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_YFDL).getCode());
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_NFDL).getCode());
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_SSFS).getCode());
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_SWDL).getCode());
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.ZBZGL).getCode());
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_ZZSGL).getCode());
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.FJZT).getCode());
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WT_RFDL).getCode());
+
+
+            if(InitialRunner.wpmap.containsKey(id))
+            {
+                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.AGC001).getCode());
+                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.AGC002).getCode());
+            }
+
+
+            List<PointData> jczblist = realApiUtil.getRealData(jczbls);
+
+            if (!jczblist.isEmpty() && jczblist.size() == jczbls.size()) {
+                //实际功率
+                sjgl = MathUtil.twoBit(jczblist.get(0).getPointValueInDouble());
+                jczbmap.put("sjgl", sjgl);
+                //日发电量
+                jczbmap.put("rfdl", MathUtil.twoBit(jczblist.get(1).getPointValueInDouble()));
+                //月发电量
+                jczbmap.put("yfdl", MathUtil.twoBit(jczblist.get(2).getPointValueInDouble()));
+                //年发电量
+                jczbmap.put("nfdl", MathUtil.twoBit(jczblist.get(3).getPointValueInDouble()));
+                //月利用小时
+                jczbmap.put("ylyxs", (new BigDecimal(jczblist.get(2).getPointValueInDouble()).multiply(new BigDecimal(10))).divide(new BigDecimal(zjrl), 2, RoundingMode.HALF_EVEN).doubleValue());
+                //年利用小时
+                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()));
+                //上网电量
+                jczbmap.put("swdl", MathUtil.twoBit(jczblist.get(5).getPointValueInDouble()));
+                //保证功率
+                bzgl = new BigDecimal(jczblist.get(6).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                jczbmap.put("bzgl", bzgl);
+                //应发功率
+                yfgl = new BigDecimal(jczblist.get(7).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                jczbmap.put("yfgl", yfgl);
+                //目标状态
+                jczbmap.put("fczt", StringUtils.round(jczblist.get(8).getPointValueInDouble(),0));
+                //SCADA发电量
+                jczbmap.put("scadafdl", StringUtils.round(jczblist.get(9).getPointValueInDouble(),2));
+
+                if(InitialRunner.wpmap.containsKey(id))
+                {
+                    //AGC出线有功
+                    jczbmap.put("agccxyg", StringUtils.round(jczblist.get(10).getPointValueInDouble(),2));
+                    //AGC有功设定
+                    jczbmap.put("agcygsd", StringUtils.round(jczblist.get(11).getPointValueInDouble(),2));
+                }
+
+
+            } else {
+                //实际功率
+                jczbmap.put("sjgl", 0.0);
+                //日发电量
+                jczbmap.put("rfdl", 0.0);
+                //月发电量
+                jczbmap.put("yfdl", 0.0);
+                //年发电量
+                jczbmap.put("nfdl", 0.0);
+                //月利用小时
+                jczbmap.put("ylyxs", 0.0);
+                //年利用小时
+                jczbmap.put("nlyxs", 0.0);
+                //实时风速
+                jczbmap.put("ssfs", 0.0);
+                //上网电量
+                jczbmap.put("swdl", 0.0);
+                //保证功率
+                jczbmap.put("bzgl", 0.0);
+                //应发功率
+                jczbmap.put("yfgl", 0.0);
+                //目标状态
+                jczbmap.put("fczt", -1.0);
+                //SCADA发电量
+                jczbmap.put("scadafdl", 0.0);
+
+                if(InitialRunner.wpmap.containsKey(id))
+                {
+                    //AGC出线有功
+                    jczbmap.put("agccxyg", 0.0);
+                    //AGC有功设定
+                    jczbmap.put("agcygsd", 0.0);
+                }
+
+
+            }
+
+            if (bzgl == 0.0) {
+                bzgl = 1.0;
+            }
+            Double glbz = new BigDecimal(sjgl).divide(new BigDecimal(bzgl), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+            if (bzgl == 1) {
+                bzgl = 0.0;
+            }
+            if (glbz > 100) {
+                glbz = 100.0;
+            }
+            jczbmap.put("glbz", StringUtils.round(glbz, 2));
+
+
+            map.put("jczbmap", jczbmap);
+
+
+/*************************************************基础指标*************************************************************/
+
+
+/*************************************************测风塔*************************************************************/
+
+            if(InitialRunner.wpmap.containsKey(id))
+            {
+                Map<String, Double> cftmap = new HashMap<>();
+                String[] cftstrs=Constant.TPOINT_WP_CFT;
+
+                for(int i=0;i<cftstrs.length;i++)
+                {
+                    WindPowerStationTestingPoint2 point2 =windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.FCCFTFS10);
+
+                    if(StringUtils.notEmp(point2.getCode()))
+                    {
+                        PointData value = realApiUtil.getRealData(point2);
+                        cftmap.put(cftstrs[i],StringUtils.round(value.getPointValueInDouble(),2));
+                    }
+                }
+
+                map.put("cftmap", cftmap);            }
+
+/*************************************************测风塔*************************************************************/
+
+/*************************************************6种状态*************************************************************/
+
+            Map<String, Double> ztmap = new HashMap<>();
+
+            List<String> ztls = new ArrayList<>();
+            //待机台数
+            ztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WT_DJTS).getCode());
+            //运行台数
+            ztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WT_YXTS).getCode());
+            //故障台数
+            ztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WT_GZTJ).getCode());
+            //离线台数
+            ztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WT_TXZD).getCode());
+            //维护台数
+            ztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WT_WHTJ).getCode());
+            //限电台数
+            ztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WT_XDTS).getCode());
+
+
+            List<PointData> ztlist = realApiUtil.getRealData(ztls);
+
+            if (!ztlist.isEmpty() && ztlist.size() == ztls.size()) {
+                ztmap.put("djts", MathUtil.twoBit(ztlist.get(0).getPointValueInDouble()));
+                ztmap.put("yxts", MathUtil.twoBit(ztlist.get(1).getPointValueInDouble()));
+                ztmap.put("gzts", MathUtil.twoBit(ztlist.get(2).getPointValueInDouble()));
+                ztmap.put("lxts", MathUtil.twoBit(ztlist.get(3).getPointValueInDouble()));
+                ztmap.put("whts", MathUtil.twoBit(ztlist.get(4).getPointValueInDouble()));
+                ztmap.put("xdts", MathUtil.twoBit(ztlist.get(5).getPointValueInDouble()));
+
+            } else {
+
+                ztmap.put("djts", 0.0);
+                ztmap.put("yxts", 0.0);
+                ztmap.put("gzts", 0.0);
+                ztmap.put("lxts", 0.0);
+                ztmap.put("whts", 0.0);
+                ztmap.put("xdts", 0.0);
+
+            }
+            map.put("ztmap", ztmap);
+//
+
+/*************************************************6种状态*************************************************************/
+
+/*************************************************五项损失**************************************************************/
+
+            Map<String, Double> wxssmap = new HashMap<>();
+            List<String> wxssls = new ArrayList<>();
+
+            // 日场内受累检修
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RLZSSDL).getCode());
+            // 日场内受累故障
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RSZSSDL).getCode());
+            // 月场内受累检修
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YLZSSDL).getCode());
+            // 月场内受累故障
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YSZSSDL).getCode());
+            // 年场内受累检修
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NLZSSDL).getCode());
+            // 年场内受累故障
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NSZSSDL).getCode());
+
+            //日待机损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RSDJZSDL).getCode());
+            //日手动停机损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RSSTZSDL).getCode());
+            //日性能损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RXNZSDL).getCode());
+            //日缺陷降出力损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RSQXZSDL).getCode());
+            //日故障损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RGZSSDL).getCode());
+            //日检修损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RJXSSDL).getCode());
+
+            //月待机损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YSDJZSDL).getCode());
+            //月手动停机损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YSSTZSDL).getCode());
+            //月性能损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YXNZSDL).getCode());
+            //月缺陷降出力损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YSQXZSDL).getCode());
+            //月故障损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YGZSSDL).getCode());
+            //月检修损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YJXSSDL).getCode());
+
+
+            //年待机损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NSDJZSDL).getCode());
+            //年手动停机损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NSSTZSDL).getCode());
+            //年性能损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NXNZSDL).getCode());
+            //年缺陷降出力损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NSQXZSDL).getCode());
+            //年故障损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NGZSSDL).getCode());
+            //年检修损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NJXSSDL).getCode());
+
+
+            //日限电损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RXDSSDL).getCode());
+            //月限电损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YXDSSDL).getCode());
+            //年限电损失
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NXDSSDL).getCode());
+
+
+            //日场外受累电网
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RWZSSDL).getCode());
+            // 日场外受累天气
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RTZSSDL).getCode());
+            // 月场外受累电网
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YWZSSDL).getCode());
+            // 月场外受累天气
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YTZSSDL).getCode());
+            // 年场外受累电网
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NWZSSDL).getCode());
+            // 年场外受累天气
+            wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NTZSSDL).getCode());
+
+
+            List<PointData> wxsslist = realApiUtil.getRealData(wxssls);
+
+            if (!wxsslist.isEmpty() && wxsslist.size() == wxssls.size()) {
+
+                Double rjxsl = MathUtil.twoBit(wxsslist.get(0).getPointValueInDouble());
+                // 日场内受累故障
+                Double rgzzsl = MathUtil.twoBit(wxsslist.get(1).getPointValueInDouble());
+                // 月场内受累检修
+                Double yjxsl = MathUtil.twoBit(wxsslist.get(2).getPointValueInDouble());
+                // 月场内受累故障
+                Double ygzzsl = MathUtil.twoBit(wxsslist.get(3).getPointValueInDouble());
+                // 年场内受累检修
+                Double njxsl = MathUtil.twoBit(wxsslist.get(4).getPointValueInDouble());
+                // 年场内受累故障
+                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);
+
+                //日待机损失
+                Double rdjss = MathUtil.twoBit(wxsslist.get(6).getPointValueInDouble());
+                //日手动停机损失
+                Double rsdtjss = MathUtil.twoBit(wxsslist.get(7).getPointValueInDouble());
+                //日性能损失
+                Double rxnss = MathUtil.twoBit(wxsslist.get(8).getPointValueInDouble());
+                //日缺陷降出力损失
+                Double rqxjclss = MathUtil.twoBit(wxsslist.get(9).getPointValueInDouble());
+
+                //日欠发损失=日待机损失+日手动停机损失+日性能损失+日缺陷降出力损失
+                Double rqfssdl = new BigDecimal(rdjss + rsdtjss + rxnss + rqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                Double rgzss = MathUtil.twoBit(wxsslist.get(10).getPointValueInDouble());
+                //日故障损失电量=日故障损失+日故障受累
+                Double rgzssdl = new BigDecimal(rgzss + rgzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                //日检修损失电量=日检修损失+日检修受累
+                Double rjxss = MathUtil.twoBit(wxsslist.get(11).getPointValueInDouble());
+                Double rjxssdl = new BigDecimal(rjxss + rjxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+
+                wxssmap.put("rqfssdl", rqfssdl);
+                wxssmap.put("rgzssdl", rgzssdl);
+                wxssmap.put("rjxssdl", rjxssdl);
+
+                // 月场内受累检修
+                Double ydjss = MathUtil.twoBit(wxsslist.get(12).getPointValueInDouble());
+                // 月场内受累检修
+                Double ysdtjss = MathUtil.twoBit(wxsslist.get(13).getPointValueInDouble());
+                // 月场内受累检修
+                Double yxnss = MathUtil.twoBit(wxsslist.get(14).getPointValueInDouble());
+                // 月场内受累检修
+                Double yqxjclss = MathUtil.twoBit(wxsslist.get(15).getPointValueInDouble());
+                //月欠发损失=月待机损失+月手动停机损失+月性能损失+月缺陷降出力损失
+                Double yqfssdl = new BigDecimal(ydjss + ysdtjss + yxnss + yqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                Double ygzss = MathUtil.twoBit(wxsslist.get(16).getPointValueInDouble());
+                //月故障损失电量=月故障损失+月故障受累
+                Double ygzssdl = new BigDecimal(ygzss + ygzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                Double yjxss = MathUtil.twoBit(wxsslist.get(17).getPointValueInDouble());
+                //月检修损失电量=月检修损失+月检修受累
+                Double yjxssdl = new BigDecimal(yjxss + yjxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                wxssmap.put("yqfssdl", yqfssdl);
+                wxssmap.put("ygzssdl", ygzssdl);
+                wxssmap.put("yjxssdl", yjxssdl);
+
+                // 年场内受累检修
+                Double ndjss = MathUtil.twoBit(wxsslist.get(18).getPointValueInDouble());
+                // 年场内受累检修
+                Double nsdtjss = MathUtil.twoBit(wxsslist.get(19).getPointValueInDouble());
+                // 年场内受累检修
+                Double nxnss = MathUtil.twoBit(wxsslist.get(20).getPointValueInDouble());
+                // 年场内受累检修
+                Double nqxjclss = MathUtil.twoBit(wxsslist.get(21).getPointValueInDouble());
+
+                Double nqfssdl = new BigDecimal(ndjss + nsdtjss + nxnss + nqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                Double ngzss = MathUtil.twoBit(wxsslist.get(22).getPointValueInDouble());
+                //年故障损失电量=年故障损失+年故障受累
+                Double ngzssdl = new BigDecimal(ngzss + ngzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                Double njxss = MathUtil.twoBit(wxsslist.get(23).getPointValueInDouble());
+                //年检修损失电量=年检修损失+年检修受累
+                Double njxssdl = new BigDecimal(njxss + njxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                wxssmap.put("nqfssdl", nqfssdl);
+                wxssmap.put("ngzssdl", ngzssdl);
+                wxssmap.put("njxssdl", njxssdl);
+
+                double temp = 0.0;
+                temp = MathUtil.twoBit(wxsslist.get(24).getPointValueInDouble());
+                Double rxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                temp = MathUtil.twoBit(wxsslist.get(25).getPointValueInDouble());
+                Double yxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                temp = MathUtil.twoBit(wxsslist.get(26).getPointValueInDouble());
+                Double nxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                wxssmap.put("rxdssdl", StringUtils.round(rxdssdl < 0.0 ? 0.0 : rxdssdl, 2));
+                wxssmap.put("yxdssdl", StringUtils.round(yxdssdl < 0.0 ? 0.0 : yxdssdl, 2));
+                wxssmap.put("nxdssdl", StringUtils.round(nxdssdl < 0.0 ? 0.0 : nxdssdl, 2));
+
+                Double rdwsl = MathUtil.twoBit(wxsslist.get(27).getPointValueInDouble());
+                Double rtqsl = MathUtil.twoBit(wxsslist.get(28).getPointValueInDouble());
+                Double rslssdl = new BigDecimal(rdwsl + rtqsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                Double ydwsl = MathUtil.twoBit(wxsslist.get(29).getPointValueInDouble());
+                Double ytqsl = MathUtil.twoBit(wxsslist.get(30).getPointValueInDouble());
+                Double yslssdl = new BigDecimal(ydwsl + ytqsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                Double ndwsl = MathUtil.twoBit(wxsslist.get(31).getPointValueInDouble());
+                Double ntqsl = MathUtil.twoBit(wxsslist.get(32).getPointValueInDouble());
+                Double nslssdl = new BigDecimal(ndwsl + ntqsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                wxssmap.put("rslssdl", rslssdl);
+                wxssmap.put("yslssdl", yslssdl);
+                wxssmap.put("nslssdl", nslssdl);
+
+            } else {
+
+                wxssmap.put("rjxsl", 0.0);
+                wxssmap.put("rgzzsl", 0.0);
+                wxssmap.put("yjxsl", 0.0);
+                wxssmap.put("ygzzsl", 0.0);
+                wxssmap.put("njxsl", 0.0);
+                wxssmap.put("ngzzsl", 0.0);
+                wxssmap.put("rqfssdl", 0.0);
+                wxssmap.put("rgzssdl", 0.0);
+                wxssmap.put("rjxssdl", 0.0);
+
+                wxssmap.put("yqfssdl", 0.0);
+                wxssmap.put("ygzssdl", 0.0);
+                wxssmap.put("yjxssdl", 0.0);
+
+                wxssmap.put("nqfssdl", 0.0);
+                wxssmap.put("ngzssdl", 0.0);
+                wxssmap.put("njxssdl", 0.0);
+
+
+                wxssmap.put("rxdssdl", 0.0);
+                wxssmap.put("yxdssdl", 0.0);
+                wxssmap.put("nxdssdl", 0.0);
+
+
+                wxssmap.put("rslssdl", 0.0);
+                wxssmap.put("yslssdl", 0.0);
+                wxssmap.put("nslssdl", 0.0);
+
+            }
+            map.put("wxssmap", wxssmap);
+
+/****************************************************五项损失************************************************************/
+
+
+/*************************************************关系库指标**************************************************************/
+
+            Map<String, Double> gxkmap = new HashMap<>();
+            List<Windpowerinfoday> wpdls= windpowerinfodayService.getWindpowerinfodayList(id, DateUtils.truncate(new Date()));
+            if(!wpdls.isEmpty())
+            {
+                Windpowerinfoday wd = wpdls.get(0);
+                gxkmap.put("ndxkyss", wd.getYeardxkyxs());
+                gxkmap.put("nsbklyl", wd.getYearsbklyl());
+
+            }else
+            {
+                gxkmap.put("ndxkyss", 0.0);
+                gxkmap.put("nsbklyl", 0.0);
+            }
+            
+            map.put("gxkmap", gxkmap);
+        }
+/*************************************************关系库指标**************************************************************/
+
+        return map;
+    }
+
+
+
+
+
+
+}
+
+

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

@@ -287,5 +287,15 @@ public class DateUtils  extends org.apache.commons.lang3.time.DateUtils {
         ca.set(Calendar.DAY_OF_MONTH, ca.getActualMaximum(Calendar.DAY_OF_MONTH));
         return new SimpleDateFormat("yyyy-MM-dd").format(ca.getTime());
     }
+    /**
+     * 计算两个时间之间差的小时数(取整后)
+     *
+     * @param d1
+     * @param d2
+     * @return
+     */
+    public static int hoursDiff(Date d1, Date d2) {
+        return (int) Math.floor(Math.abs((d1.getTime() - d2.getTime())) / (60 * 60 * 1000));
+    }
 
 }

+ 24 - 0
src/main/java/com/gyee/frame/util/StringUtils.java

@@ -11,6 +11,8 @@ import java.util.Collection;
 import java.util.Date;
 import java.util.Map;
 import java.util.UUID;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 
 /**
@@ -511,4 +513,26 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
         // 去掉“-”符号
         return s.substring(0, 8) + s.substring(9, 13) + s.substring(14, 18) + s.substring(19, 23) + s.substring(24);
     }
+
+    /**
+     * 判断是否为数字字符串
+     * @param str
+     * @return
+     */
+    public static boolean isNumeric(String str){
+        Pattern pattern = Pattern.compile("^(-?\\d+)(\\.\\d+)?$");
+        if(notEmp(str))
+        {
+            Matcher isNum = pattern.matcher(str);
+            if( !isNum.matches() ){
+                return false;
+            }
+
+        }else
+        {
+            return false;
+        }
+
+        return true;
+    }
 }

+ 73 - 0
src/test/java/test/CftInfoPushTest.java

@@ -0,0 +1,73 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.websocket.CftInfoPushService;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Map;
+
+public class CftInfoPushTest {
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+
+        String wtId="MG01_03";
+        String wpId="MHS_FDC";
+        String year="2021";
+        String month="1";
+
+        CftInfoPushService cftInfoPushService= SpringUtils.getBean("cftInfoPushService");
+
+
+
+
+
+        Map<String, Object> map = cftInfoPushService.genreSetMap();
+
+
+
+         System.out.println(map.size());
+
+
+
+//        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);
+//
+//        Map<String,Object> map=( Map<String,Object>)ar.get("data");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getXfqr()+"----------------"+wtd.getXfqrhgl());
+//        }
+//
+//        AjaxResult ar = singleAnalysisController.singleanalysisChart(wtId,year,month);
+//
+//        Map<String, List<SingleAnalysisVo>> map=( Map<String,List<SingleAnalysisVo>>)ar.get("data");
+//        List<SingleAnalysisVo> vos=map.get("ff");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getFdl()+"----------------"+wtd.getFs());
+//        }
+//
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("ws");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getGzss()+"----------------"+wtd.getJxss()+"----------------"+wtd.getXdss()
+//                    +"----------------"+wtd.getXnss()+"----------------"+wtd.getSlss());
+//        }
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("jd");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getJfpl()+"----------------"+wtd.getTjxs());
+//        }
+//
+//
+//
+    }
+}

+ 76 - 0
src/test/java/test/GenreSetPushTest.java

@@ -0,0 +1,76 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.websocket.GenreSetPushService;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Map;
+
+public class GenreSetPushTest {
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+
+        String wtId="MG01_03";
+        String wpId="MHS_FDC";
+        String year="2021";
+        String month="1";
+
+        GenreSetPushService genreSetPushService= SpringUtils.getBean("genreSetPushService");
+
+
+
+
+
+        Map<String, Object> map = genreSetPushService.genreSetMap();
+
+        Map<String, Object> qsmap=(Map<String, Object>)map.get("0");
+        Map<String, Object> fdmap=(Map<String, Object>)map.get("-1");
+        Map<String, Object> gfmap=(Map<String, Object>)map.get("-2");
+
+
+         System.out.println(qsmap.size());
+
+
+
+//        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);
+//
+//        Map<String,Object> map=( Map<String,Object>)ar.get("data");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getXfqr()+"----------------"+wtd.getXfqrhgl());
+//        }
+//
+//        AjaxResult ar = singleAnalysisController.singleanalysisChart(wtId,year,month);
+//
+//        Map<String, List<SingleAnalysisVo>> map=( Map<String,List<SingleAnalysisVo>>)ar.get("data");
+//        List<SingleAnalysisVo> vos=map.get("ff");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getFdl()+"----------------"+wtd.getFs());
+//        }
+//
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("ws");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getGzss()+"----------------"+wtd.getJxss()+"----------------"+wtd.getXdss()
+//                    +"----------------"+wtd.getXnss()+"----------------"+wtd.getSlss());
+//        }
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("jd");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getJfpl()+"----------------"+wtd.getTjxs());
+//        }
+//
+//
+//
+    }
+}

+ 73 - 0
src/test/java/test/MatrixDetialPushTest.java

@@ -0,0 +1,73 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.websocket.MatrixDetialPushService;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Map;
+
+public class MatrixDetialPushTest {
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+
+        String wtId="MG01_03";
+        String wpId="MHS_FDC";
+        String year="2021";
+        String month="1";
+
+        MatrixDetialPushService matrixDetialPushService= SpringUtils.getBean("matrixDetialPushService");
+
+
+
+
+
+        Map<String, Object> map = matrixDetialPushService.genreSetMap();
+
+
+
+         System.out.println(map.size());
+
+
+
+//        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);
+//
+//        Map<String,Object> map=( Map<String,Object>)ar.get("data");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getXfqr()+"----------------"+wtd.getXfqrhgl());
+//        }
+//
+//        AjaxResult ar = singleAnalysisController.singleanalysisChart(wtId,year,month);
+//
+//        Map<String, List<SingleAnalysisVo>> map=( Map<String,List<SingleAnalysisVo>>)ar.get("data");
+//        List<SingleAnalysisVo> vos=map.get("ff");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getFdl()+"----------------"+wtd.getFs());
+//        }
+//
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("ws");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getGzss()+"----------------"+wtd.getJxss()+"----------------"+wtd.getXdss()
+//                    +"----------------"+wtd.getXnss()+"----------------"+wtd.getSlss());
+//        }
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("jd");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getJfpl()+"----------------"+wtd.getTjxs());
+//        }
+//
+//
+//
+    }
+}

+ 73 - 0
src/test/java/test/MatrixPushTest.java

@@ -0,0 +1,73 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.websocket.MatrixPushService;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Map;
+
+public class MatrixPushTest {
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+
+        String wtId="MG01_03";
+        String wpId="MHS_FDC";
+        String year="2021";
+        String month="1";
+
+        MatrixPushService matrixPushService= SpringUtils.getBean("matrixPushService");
+
+
+
+
+
+        Map<String, Object> map = matrixPushService.genreSetMap();
+
+
+
+         System.out.println(map.size());
+
+
+
+//        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);
+//
+//        Map<String,Object> map=( Map<String,Object>)ar.get("data");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getXfqr()+"----------------"+wtd.getXfqrhgl());
+//        }
+//
+//        AjaxResult ar = singleAnalysisController.singleanalysisChart(wtId,year,month);
+//
+//        Map<String, List<SingleAnalysisVo>> map=( Map<String,List<SingleAnalysisVo>>)ar.get("data");
+//        List<SingleAnalysisVo> vos=map.get("ff");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getFdl()+"----------------"+wtd.getFs());
+//        }
+//
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("ws");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getGzss()+"----------------"+wtd.getJxss()+"----------------"+wtd.getXdss()
+//                    +"----------------"+wtd.getXnss()+"----------------"+wtd.getSlss());
+//        }
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("jd");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getJfpl()+"----------------"+wtd.getTjxs());
+//        }
+//
+//
+//
+    }
+}

+ 73 - 0
src/test/java/test/RealPowerPushTest.java

@@ -0,0 +1,73 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.websocket.RealPowerPushService;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Map;
+
+public class RealPowerPushTest {
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+
+        String wtId="MG01_03";
+        String wpId="MHS_FDC";
+        String year="2021";
+        String month="1";
+
+        RealPowerPushService realPowerPushService= SpringUtils.getBean("realPowerPushService");
+
+
+
+
+
+        Map<String, Object> map = realPowerPushService.genreSetMap();
+
+
+
+         System.out.println(map.size());
+
+
+
+//        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);
+//
+//        Map<String,Object> map=( Map<String,Object>)ar.get("data");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getXfqr()+"----------------"+wtd.getXfqrhgl());
+//        }
+//
+//        AjaxResult ar = singleAnalysisController.singleanalysisChart(wtId,year,month);
+//
+//        Map<String, List<SingleAnalysisVo>> map=( Map<String,List<SingleAnalysisVo>>)ar.get("data");
+//        List<SingleAnalysisVo> vos=map.get("ff");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getFdl()+"----------------"+wtd.getFs());
+//        }
+//
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("ws");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getGzss()+"----------------"+wtd.getJxss()+"----------------"+wtd.getXdss()
+//                    +"----------------"+wtd.getXnss()+"----------------"+wtd.getSlss());
+//        }
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("jd");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getJfpl()+"----------------"+wtd.getTjxs());
+//        }
+//
+//
+//
+    }
+}

+ 73 - 0
src/test/java/test/WpInfoPushTest.java

@@ -0,0 +1,73 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.websocket.WpInfoPushService;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Map;
+
+public class WpInfoPushTest {
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+
+        String wtId="MG01_03";
+        String wpId="MHS_FDC";
+        String year="2021";
+        String month="1";
+
+        WpInfoPushService wpInfoPushService= SpringUtils.getBean("wpInfoPushService");
+
+
+
+
+
+        Map<String, Object> map = wpInfoPushService.genreSetMap();
+
+
+
+         System.out.println(map.size());
+
+
+
+//        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);
+//
+//        Map<String,Object> map=( Map<String,Object>)ar.get("data");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getXfqr()+"----------------"+wtd.getXfqrhgl());
+//        }
+//
+//        AjaxResult ar = singleAnalysisController.singleanalysisChart(wtId,year,month);
+//
+//        Map<String, List<SingleAnalysisVo>> map=( Map<String,List<SingleAnalysisVo>>)ar.get("data");
+//        List<SingleAnalysisVo> vos=map.get("ff");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getFdl()+"----------------"+wtd.getFs());
+//        }
+//
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("ws");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getGzss()+"----------------"+wtd.getJxss()+"----------------"+wtd.getXdss()
+//                    +"----------------"+wtd.getXnss()+"----------------"+wtd.getSlss());
+//        }
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("jd");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getJfpl()+"----------------"+wtd.getTjxs());
+//        }
+//
+//
+//
+    }
+}