王波 6 روز پیش
والد
کامیت
bcb04e31a0

+ 2 - 1
runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/NewDataFittingController.java

@@ -43,6 +43,7 @@ public class NewDataFittingController {
                                   @RequestParam(value = "isfhl",  required = false) Boolean isfhl,
                                   @RequestParam(value = "istj",  required = false) Boolean istj,
                                   @RequestParam(value = "isglpc",  required = false) Boolean isglpc,
+                                  @RequestParam(value = "xd",  required = false) Integer xd,
                                   @RequestParam(value = "maxp",  required = false) double maxp,
                                   @RequestParam(value = "maxs",  required = false) double maxs,
                                   @RequestParam(value = "mins",  required = false) double mins,
@@ -51,7 +52,7 @@ public class NewDataFittingController {
                                   @RequestParam(value = "dimension",  required = false) Integer dimension
     ) {
 
-        ProEconPowerFittingAnalySis obj = newDataFittingService.newDataFitting(station,wtIds,st,et,interval,isbw,isfbw,isfhl,istj,isglpc,maxp,maxs,mins,minp,mode,dimension);
+        ProEconPowerFittingAnalySis obj = newDataFittingService.newDataFitting(station,wtIds,st,et,interval,isbw,isfbw,isfhl,istj,isglpc,xd,maxp,maxs,mins,minp,mode,dimension);
         return JsonResult.successData(ResultCode.SUCCESS, obj);
 
     }

+ 8 - 3
runeconomy-xk/src/main/java/com/gyee/runeconomy/dto/result/PowerPointData.java

@@ -29,9 +29,10 @@ public class PowerPointData {
             this.dfwc = Double.valueOf(df.format(Double.valueOf(str[8])));
             this.angle = Double.valueOf(df.format(Double.valueOf(str[9])));
             this.hjwd = Double.valueOf(df.format(Double.valueOf(str[10])));
-            this.yp1 = Double.valueOf(df.format(Double.valueOf(str[11])));
-            this.yp2 = Double.valueOf(df.format(Double.valueOf(str[12])));
-            this.yp3 = Double.valueOf(df.format(Double.valueOf(str[13])));
+            this.xgyx = Double.valueOf(df.format(Double.valueOf(str[11])));
+            this.yp1 = Double.valueOf(df.format(Double.valueOf(str[12])));
+            this.yp2 = Double.valueOf(df.format(Double.valueOf(str[13])));
+            this.yp3 = Double.valueOf(df.format(Double.valueOf(str[14])));
             if (isFilter){
                 BigDecimal bd = new BigDecimal(str[str.length - 1]);
                 bd = bd.setScale(2, RoundingMode.HALF_UP);
@@ -90,6 +91,9 @@ public class PowerPointData {
     @Desc(des = "环境温度",  uniformCode = "AI072", remark = "1")
     private double hjwd = 0;
 
+    @Desc(des = "限功运行",  uniformCode = "DI1280", remark = "1")
+    private double xgyx;
+
     @Desc(des = "叶片1",  uniformCode = "AI082", remark = "1")
     private double yp1 = 0;
 
@@ -119,6 +123,7 @@ public class PowerPointData {
                 ", dfwc=" + dfwc +
                 ", angle=" + angle +
                 ", hjwd=" + hjwd +
+                ", xgyx=" + xgyx +
 //                ", filter=" + filter +
                 ", wtId='" + wtId + '\'' +
                 '}';

+ 22 - 5
runeconomy-xk/src/main/java/com/gyee/runeconomy/model/PowerProcessALG.java

@@ -157,14 +157,15 @@ public class PowerProcessALG {
      * @param isglpc 功率曲线偏差
      * @param isqfh  是否欠符合
      * @param qfhdj  欠符合等级
-     * @return
+     * @param xd     是否限电
      */
 
     public static List<PowerPointData> dataProcess11(
             List<PowerPointData> list, Map<Double, Double> map,
             Double maxs, Double mins, Double maxp, Double minp, Boolean isfbw,
-            Boolean isfhl, Boolean isbw, Boolean istj, Boolean isglpc, Boolean isqfh, Integer qfhdj) {
+            Boolean isfhl, Boolean isbw, Boolean istj, Boolean isglpc, Boolean isqfh, Integer qfhdj, Integer xd, String eqmodelId) {
 
+        //TODO 数据过滤  // 0正常,1过滤掉
         if (list == null || list.isEmpty()) return list;
 
         // ---------- 设置 ----------
@@ -214,13 +215,13 @@ public class PowerProcessALG {
             }
 
             // ---------- 2. 修正并网起点(当从非并网 -> 并网时设置) ----------
-            // 如果 gridStartTime 还没设置,我们尽量在真正的过渡(非并网->并网)时设置它,
-            // 但为了兼容你的数据(如果整个序列从并网开始),我们也可以在首次并网时设置。
+            // 如果 gridStartTime 还没设置,尽量在真正的过渡(非并网->并网)时设置它,
+            // 但为了兼容数据(如果整个序列从并网开始),也可以在首次并网时设置。
             if (isGrid && gridStartTime == null) {
                 // 首次遇到并网(或序列从并网开始)时初始化为该时刻(作为并网基准)
                 gridStartTime = currentTime;
                 // 不将该时刻误判为并网后十分钟
-                // 备注:如果想严格只在 "非并网->并网" 过渡时初始化,请替换为状态机检测
+                // 备注:如果想严格只在 "非并网->并网" 过渡时初始化,请替换为状态机检测
             }
 
             // ---------- 3. 非并网过滤(isfbw) ----------
@@ -230,6 +231,19 @@ public class PowerProcessALG {
                 reason = appendReason(reason, "non_grid");
             }
 
+            // ---------- 4. 限电过滤(xd) ----------
+            if (eqmodelId.equals("WT2000D121H85")) {
+                if (xd == 1 && filter == 0 && isfbw && item.getMxzt() == 1) {
+                    filter = 1;
+                    reason = appendReason(reason, "xgyx");
+                }
+            } else {
+                if (xd == 1 && filter == 0 && isfbw && item.getXgyx() == 1) {
+                    filter = 1;
+                    reason = appendReason(reason, "xgyx");
+                }
+            }
+
             // ---------- 4. 并网后10分钟过滤(isbw) ----------
             if (filter == 0 && isbw != null && isbw && gridStartTime != null) {
                 int diff = getTimeDiff(currentTime, gridStartTime);
@@ -500,6 +514,7 @@ public class PowerProcessALG {
 
     /**
      * 过滤停机前几分钟内数据
+     *
      * @param list
      * @param minute 分钟
      * @return
@@ -546,6 +561,7 @@ public class PowerProcessALG {
 
     /**
      * 曲线偏差率过滤
+     *
      * @param list
      * @param map  风速对应的保证功率
      * @return
@@ -586,6 +602,7 @@ public class PowerProcessALG {
 
     /**
      * 根据欠发过滤
+     *
      * @param list
      * @param qfhdj 签发等级
      * @return

+ 9 - 4
runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/NewDataFittingService.java

@@ -90,7 +90,7 @@ public class NewDataFittingService {
      * @param
      * @return
      */
-    public ProEconPowerFittingAnalySis newDataFitting(String station,String wtId,Long st,Long et,Integer interval,Boolean isbw,Boolean isfbw,Boolean isfhl,Boolean istj,Boolean isglpc,double maxp,double maxs,double mins,double minp,Integer mode,Integer dimension) {
+    public ProEconPowerFittingAnalySis newDataFitting(String station,String wtId,Long st,Long et,Integer interval,Boolean isbw,Boolean isfbw,Boolean isfhl,Boolean istj,Boolean isglpc,Integer xd,double maxp,double maxs,double mins,double minp,Integer mode,Integer dimension) {
         prepareMap = new HashMap<>();
         processMap = new HashMap<>();
         fittingMap = new HashMap<>();
@@ -107,14 +107,17 @@ public class NewDataFittingService {
                 List<String> points = config.getPoints();
                 String replacement = wtt.get(0).getProjectId().equals("NX_FGS_HAF01_EG") ? "JKZT" : "DI1485";
 
+                if (wtt.get(0).getProjectId().equals("NX_FGS_HAF01_EG")){
+                    points.set(10,"DI275");//本来应该是限功测点,一期已经有MXZT,随便找了个
+                }
                 for (int i = 0; i < points.size(); i++) {
                     if (points.get(i).equals("MXZT")) {
                         points.set(i, replacement);
                     }
                 }
                 //                Map<String, List<ProBasicEquipmentPoint>> collect = CacheContext.pointNewMap.get(wt).stream().collect(Collectors.groupingBy(w -> w.getUniformCode()));
-                Map<String, List<ProBasicEquipmentPoint>> collect = CacheContext.pointNewMap
-                        .get(wt).stream().collect(Collectors.groupingBy(w -> w.getUniformCode()));
+//                Map<String, List<ProBasicEquipmentPoint>> collect = CacheContext.pointNewMap
+//                        .get(wt).stream().collect(Collectors.groupingBy(w -> w.getUniformCode()));
                 Map<String, ProBasicEquipmentPoint> equipmentPointMap = wtpAimap.get(wt);
 
                 Map<String, List<ProBasicEquipmentPoint>> collect1 = points.stream()
@@ -225,8 +228,10 @@ public class NewDataFittingService {
                 /** 数据预处理 **/
                 Boolean qfh = true;
                 Integer qfhdj = 2;
+                xd =1;
+                String eqmodelId = CacheContext.wtmap.get(obj.getWindturbineId()).getModelId();
 //                List<PowerPointData> data = PowerProcessALG.dataProcess(eis, modelPowerMap, maxs, mins, maxp, minp, isfbw, isfhl, isbw, istj, isglpc, qfh, qfhdj);
-                List<PowerPointData> data = PowerProcessALG.dataProcess11(eis, modelPowerMap, maxs, mins, maxp, minp, isfbw, isfhl, isbw, istj, isglpc, qfh, qfhdj);
+                List<PowerPointData> data = PowerProcessALG.dataProcess11(eis, modelPowerMap, maxs, mins, maxp, minp, isfbw, isfhl, isbw, istj, isglpc, qfh, qfhdj,xd,eqmodelId);
                 /** 静风频率 **/
                 List<Double> ls = WindDirectionALG.frequency(data.stream().map(PowerPointData::getSpeed).collect(Collectors.toList()), 3);
                 double frequency = ls.get(0);