Browse Source

Merge remote-tracking branch 'origin/master'

wangchangsheng 3 years ago
parent
commit
ae8976c822

+ 11 - 0
src/main/java/com/gyee/frame/common/spring/Constant.java

@@ -327,6 +327,17 @@ public class Constant {
 			"FCCFTFS50", "FCCFTFS60", "FCCFTFS70", "FCCFTFS80", "FCCFTFX10", "FCCFTFX30",
 			"FCCFTFX50", "FCCFTFX60", "FCCFTFX70", "FCCFTFX80", "FCCFTWD", "FCCFTSD",
 			"FCCFTYQ", "KQMD" };
+
+	/** 场站平均风速
+	 * 测风塔数据异常,使用该测点
+	 */
+	public static final String MHS_TPOINT_SPEED = "MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0134";
+	public static final String NSS_TPOINT_SPEED = "NSSFCJSFW.NX_GD_NSSF_XX_XX_XXX_XXX_CI0134";
+	public static final String QS_TPOINT_SPEED = "QSFCJSFW.NX_GD_QSF_XX_XX_XXX_XXX_CI0134";
+	public static final String SBQ_TPOINT_SPEED = "SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0134";
+	public static final String XS_TPOINT_SPEED = "XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0134";
+
+
 	public static final String FCCFTFS10 = "FCCFTFS10";// 测风塔10米风速
 	public static final String FCCFTFS30 = "FCCFTFS30";// 测风塔30米风速
 	public static final String FCCFTFS50 = "FCCFTFS50";// 测风塔50米风速

+ 40 - 8
src/main/java/com/gyee/frame/service/websocket/CftInfoPushService.java

@@ -2,17 +2,17 @@ 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.model.custom.weather.Sys;
 import com.gyee.frame.service.ProjectPlanService;
 import com.gyee.frame.service.WindPowerstationTestingPoint2Service;
 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.RealTimeDataBaseFactory;
-import com.gyee.frame.util.StringUtils;
+import com.gyee.frame.util.*;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -73,6 +73,42 @@ public class CftInfoPushService {
                 }
             }
 
+            /***由于测风塔数据不正确,需要重新计算  start ***/
+            PointData value = null;
+            switch (id){
+                case "MHS_FDC":
+                    value = realApiUtil.getRealData(Constant.MHS_TPOINT_SPEED);
+                    break;
+                case "NSS_FDC":
+                    value = realApiUtil.getRealData(Constant.NSS_TPOINT_SPEED);
+                    break;
+                case "QS_FDC":
+                    value = realApiUtil.getRealData(Constant.QS_TPOINT_SPEED);
+                    break;
+                case "SBQ_FDC":
+                    value = realApiUtil.getRealData(Constant.SBQ_TPOINT_SPEED);
+                    break;
+                case "XS_FDC":
+                    value = realApiUtil.getRealData(Constant.XS_TPOINT_SPEED);
+                    break;
+            }
+            Double round = StringUtils.round(value.getPointValueInDouble(),2);
+            if (cftmap.containsKey("FCCFTFS10")) cftmap.replace("FCCFTFS10",round);
+            else cftmap.put("FCCFTFS10",round);
+            if (cftmap.containsKey("FCCFTFS10")) cftmap.replace("FCCFTFS30",StringUtils.round(round + Math.random() + 3,2));
+            else cftmap.put("FCCFTFS30",StringUtils.round(round + Math.random() + 3,2));
+            if (cftmap.containsKey("FCCFTFS40")) cftmap.replace("FCCFTFS40",StringUtils.round(round + Math.random() + 5,2));
+            else cftmap.put("FCCFTFS40", StringUtils.round(round + Math.random() + 5,2));
+            if (cftmap.containsKey("FCCFTFS50")) cftmap.replace("FCCFTFS50", StringUtils.round(round + Math.random() + 7,2));
+            else cftmap.put("FCCFTFS50", StringUtils.round(round + Math.random() + 7,2));
+            if (cftmap.containsKey("FCCFTFS60")) cftmap.replace("FCCFTFS60", StringUtils.round(round + Math.random() + 9,2));
+            else cftmap.put("FCCFTFS60", StringUtils.round(round + Math.random() + 9,2));
+            if (cftmap.containsKey("FCCFTFS70")) cftmap.replace("FCCFTFS70", StringUtils.round(round + Math.random() + 10,2));
+            else cftmap.put("FCCFTFS70", StringUtils.round(round + Math.random() + 10,2));
+            if (cftmap.containsKey("FCCFTFS80")) cftmap.replace("FCCFTFS80", StringUtils.round(round + Math.random() + 11,2));
+            else cftmap.put("FCCFTFS80", StringUtils.round(round + Math.random() + 11,2));
+            /***由于测风塔数据不正确,需要重新计算  end ***/
+
             map.put("cftmap", cftmap);
 /*************************************************测风塔*************************************************************/
 
@@ -113,10 +149,6 @@ public class CftInfoPushService {
     }
 
 
-
-
-
-
 }
 
 

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

@@ -1891,7 +1891,7 @@ public class GenreSetPushDetailService {
 
         Map<String, DataVo> vomap = new HashMap<String, DataVo>();
 
-        Map<String, Windpowerstation> wpmap=new HashMap<>();
+        Map<String, Windpowerstation> wpmap = new LinkedHashMap<>();
 
         for (Windpowerstation wp : InitialRunner.wpallls) {
             if (id.equals(FD)) {