Browse Source

1、算法调试;
2、csv数据映射增加反射

chenminghua 2 years ago
parent
commit
875369e604
19 changed files with 344 additions and 218 deletions
  1. 61 42
      power-fitting/src/main/java/com/gyee/power/fitting/common/alg/PowerFittingALG.java
  2. 26 7
      power-fitting/src/main/java/com/gyee/power/fitting/common/alg/WindDirectionALG.java
  3. 0 26
      power-fitting/src/main/java/com/gyee/power/fitting/common/constants/Constants.java
  4. 1 1
      power-fitting/src/main/java/com/gyee/power/fitting/controller/analyse/RatioController.java
  5. 2 2
      power-fitting/src/main/java/com/gyee/power/fitting/model/Powerfittinganalysis.java
  6. 75 0
      power-fitting/src/main/java/com/gyee/power/fitting/model/anno/AnnotationTool.java
  7. 18 0
      power-fitting/src/main/java/com/gyee/power/fitting/model/anno/Desc.java
  8. 22 0
      power-fitting/src/main/java/com/gyee/power/fitting/model/anno/FixedVo.java
  9. 18 9
      power-fitting/src/main/java/com/gyee/power/fitting/model/custom/PowerFittingPoint.java
  10. 30 12
      power-fitting/src/main/java/com/gyee/power/fitting/model/custom/PowerPointData.java
  11. 4 29
      power-fitting/src/main/java/com/gyee/power/fitting/model/custom/TableTitle.java
  12. 38 33
      power-fitting/src/main/java/com/gyee/power/fitting/service/custom/curve/DataFittingService.java
  13. 11 9
      power-fitting/src/main/java/com/gyee/power/fitting/service/custom/curve/DataPrepareService.java
  14. 13 30
      power-fitting/src/main/java/com/gyee/power/fitting/service/custom/curve/DataProcessService.java
  15. 5 2
      power-fitting/src/main/java/com/gyee/power/fitting/service/custom/fx/WindDirectionService.java
  16. 10 12
      power-fitting/src/main/java/com/gyee/power/fitting/service/custom/ratio/RatioService.java
  17. 4 2
      power-fitting/src/main/resources/application.yaml
  18. 2 2
      power-fitting/src/main/resources/mapper/PowerfittinganalysisMapper.xml
  19. 4 0
      power-fitting/src/main/resources/readme.md

+ 61 - 42
power-fitting/src/main/java/com/gyee/power/fitting/common/alg/PowerFittingALG.java

@@ -3,12 +3,10 @@ package com.gyee.power.fitting.common.alg;
 import com.gyee.power.fitting.model.custom.LineCurveFitting;
 import com.gyee.power.fitting.model.custom.Point;
 import com.gyee.power.fitting.model.custom.PointVo;
+import com.gyee.power.fitting.model.custom.PowerPointData;
 
 import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Optional;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -285,11 +283,11 @@ public class PowerFittingALG {
             double count = 0;
             double sum = 0;
             for (Point point : points1){
-                List<Point> list = points2.stream().filter(it -> it.getX() == point.getX()).collect(Collectors.toList());
-                if (list.size() > 0){
-                    sum += Math.pow(point.getY() - list.get(0).getY(), 2);
+                Optional<Point> p = points2.stream().filter(it -> it.getX() == point.getX()).findFirst();
+                if (p.isPresent()){
+                    sum += Math.pow(point.getY() - p.get().getY(), 2);
                     count ++;
-                    pc += point.getY() - list.get(0).getY();
+                    pc += point.getY() - p.get().getY();
                 }
             }
             sum = Math.sqrt(sum);
@@ -308,12 +306,11 @@ public class PowerFittingALG {
      * @param points1 风速功率数组
      * @param points2 风速功率数组(保证功率)
      * @param maxp  区间内的最大保证功率
-     * @param speed 最小风速
+     * @param mins 最小风速
+     * @param maxs 最大风速
      * @return
      */
-    public static double curveDeviationRatio2(List<Point> points1, List<Point> points2, double maxp, double speed) {
-        double minSpeed = speed;
-        double maxSpeed = minSpeed + 1;
+    public static double curveDeviationRatio2(List<Point> points1, List<Point> points2, double maxp, double mins, double maxs) {
         double result = -0;
         double pc = 0;
         if (points1 != null && points1.size() > 0 && points2 != null && points2.size() > 0)
@@ -322,7 +319,7 @@ public class PowerFittingALG {
             double sum = 0;
             for (Point point : points1){
                 Optional<Point> p = points2.stream().filter(it -> it.getX() == point.getX()).findFirst();
-                if (p.isPresent() && p.get().getX() >= minSpeed && p.get().getX() < maxSpeed){
+                if (p.isPresent() && p.get().getX() >= mins && p.get().getX() < maxs){
                     sum += Math.pow(point.getY() - p.get().getY(), 2);
                     count ++;
                     pc += point.getY() - p.get().getY();
@@ -344,21 +341,23 @@ public class PowerFittingALG {
      * 对风偏差散点过滤  统计-50 到 50的
      *
      * @param list
+     *
+     *
      * @return
      */
-    public static List<Point> windDeviationScatter(List<PointVo> list){
+    public static List<Point> windDeviationScatter(List<PowerPointData> list){
         //正负偏差 [-50,-49,....,0,1,2,.....50]
         List<Point> ls = new ArrayList<>();
         LinkedHashSet<Double> keys = new LinkedHashSet<>();  //散点太多去重
         //次数统计
         for (int i = 0; i < list.size(); i++){
-            PointVo item = list.get(i);
-            int ele = (int)Math.round((item.getX() + Math.abs(item.getY())));
+            PowerPointData item = list.get(i);
+            int ele = (int)Math.round((item.getFx() + Math.abs(item.getDfwc())));
             int index = ele - 180;
             if (index >= -50 && index <= 50) {
-                double key = Math.abs(index) + item.getS();
+                double key = Math.abs(index) + item.getSpeed();
                 if (!keys.contains(key))
-                    ls.add(new Point(index, item.getS()));
+                    ls.add(new Point(index, item.getSpeed()));
                 keys.add(key);
             }
         }
@@ -368,29 +367,50 @@ public class PowerFittingALG {
 
 
     /**
-     * 对风偏差散点过滤  统计-50 到 50的
-     * 数据为二维数组 内层数组为3项. 第一项表示Y轴索引,  第二项代表X轴的索引 第三项代表value值.
-     * @param list
+     * 静态偏航对风分析
+     * 对风偏差散点过滤  统计-15 到 15的  正负偏差 [-15,-14,....,0,1,2,.....15]
+     * 数据为二维数组 内层数组为3项. 第一项表示Y轴索引(风速),  第二项代表X轴的索引(正负偏差) 第三项代表value值.
+     * @param points
      * @return
      */
-    public static int[][] windDeviationPoint(List<PointVo> list){
-        //正负偏差 [-50,-49,....,0,1,2,.....50]
-        int[][] ints = new int[101][3];
-        //次数统计
+    public static List<Object> windDeviationPoint(List<PowerPointData> points){
+        List<PowerPointData> list = new ArrayList<>();
+        List<Object> result = new ArrayList<>();
+        Map<Integer, double[]> map = new LinkedHashMap<>();
+
+        //过滤对风偏差
+        for (int i = 0; i < points.size(); i++){
+            PowerPointData item = points.get(i);
+            if (item.getSpeed() < 4.5 || item.getSpeed() >= 10.5)
+                continue;
+
+            list.add(item);
+            Integer speed = Math.toIntExact(Math.round(item.getSpeed()));
+            if (!map.containsKey(speed))
+                map.put(speed, new double[2]);  //[0]最小值 [1]最大值
+
+            double[] value = map.get(speed);
+            double power = item.getPower() < 0 ? 0 : item.getPower();
+            value[0] = power < value[0] ? power : value[0]; //最小值
+            value[1] = power > value[1] ? power : value[1]; //最小值
+        }
+
+        DecimalFormat sf = new DecimalFormat("0.00");
         for (int i = 0; i < list.size(); i++){
-            PointVo item = list.get(i);
-            int ele = (int)Math.round((item.getX() + Math.abs(item.getY())));
+            PowerPointData item = list.get(i);
+            Integer speed = Math.toIntExact(Math.round(item.getSpeed()));
+            int ele = (int) (Math.abs(item.getFx()) + Math.abs(item.getAngle()));
             int index = ele - 180;
-            if (index >= -50 && index <= 50) {
-                int x = 50 - (index > 0 ? -index : Math.abs(index)); //[-50,-49,-48,....50]
-                int y = (int)Math.round(item.getS()) > 25 ? 25 : (int)Math.round(item.getS()); //风速[0,1,2,.....25]
-                ints[x][0] = y;
-                ints[x][1] = x;
-                ints[x][2] = 10;
+            if (index >= -15 && index <= 15) {
+                double[] value = map.get(speed);
+                double v = (item.getPower() - value[0]) / (value[1] - value[0]);
+                double s[] = {speed, index, Double.valueOf(sf.format(v)).doubleValue()};
+                result.add(s);
             }
         }
 
-        return ints;
+
+        return result;
     }
 
 
@@ -399,12 +419,12 @@ public class PowerFittingALG {
      * @param list
      * @return
      */
-    public static int[] windDeviationRatio(List<PointVo> list){
+    public static int[] windDeviationRatio(List<PowerPointData> list){
         int[] pc = new int[101];  //正负偏差 [-50,-49,....,0,1,2,.....50]
         //次数统计
         for (int i = 0; i < list.size(); i++){
-            PointVo item = list.get(i);
-            int ele = (int) (Math.abs(item.getX()) + Math.abs(item.getY()));
+            PowerPointData item = list.get(i);
+            int ele = (int) (Math.abs(item.getFx()) + Math.abs(item.getDfwc()));
             int index = ele - 180;
             if (index >= -50 && index <= 50)
                 pc[50-(index > 0 ? -index : Math.abs(index))]++;
@@ -413,12 +433,11 @@ public class PowerFittingALG {
         return pc;
     }
 
+
     public static void main(String[] args){
-        StringBuilder sb = new StringBuilder();
-        for (int i = -50; i < 101; i++){
-            sb.append("'").append(i).append("',");
-        }
-        System.out.println(sb.toString());
+        double s =  4.53;
+        Integer speed = Math.toIntExact(Math.round(s));
+        System.out.println(speed);
     }
 
 }

+ 26 - 7
power-fitting/src/main/java/com/gyee/power/fitting/common/alg/WindDirectionALG.java

@@ -21,9 +21,10 @@ public class WindDirectionALG {
         int[][] count = new int[11][16];
 
         list.stream().forEach(item -> {
-            int fx = windFXAngle(item.getFX());
+            int fx = windFXAngle(item.getFx());
             int speed = windSpeed(item.getSpeed());
-            count[speed][fx] = 1;
+            if (speed < 11 && fx < 16)
+                count[speed][fx] = 1;
         });
 
         return count;
@@ -38,9 +39,10 @@ public class WindDirectionALG {
     public static int[][] fxCountRoses(List<PowerPointData> list){
         int[][] count = new int[11][16];
         list.stream().sorted(Comparator.comparing(PowerPointData::getSpeed)).forEach(item -> {
-            int fx = windFXAngle(item.getFX());
+            int fx = windFXAngle(item.getFx());
             int speed = windSpeed(item.getSpeed());
-            count[speed][fx] ++;
+            if (speed < 11 && fx < 16)
+                count[speed][fx] ++;
         });
 
         return count;
@@ -53,10 +55,10 @@ public class WindDirectionALG {
      * @return
      */
     public static int[] fxRadarRoses(List<PowerPointData> list){
-        int[] count = new int[16];
+        int[] count = new int[32];
         list.stream().sorted(Comparator.comparing(PowerPointData::getSpeed)).forEach(item -> {
-            int fx = windFXAngle(item.getFX());
-            count[fx] ++;
+            int df = windDFAngle(item.getDfwc());
+            count[df] ++;
         });
 
         return count;
@@ -80,6 +82,23 @@ public class WindDirectionALG {
     }
 
     /**
+     * 对风角度计算
+     * 0:0-22.5
+     * 1:22.5-45
+     * 2:90-135
+     * .。。。。。。
+     * @param
+     * @return params: 0,1,2。。。。。15
+     */
+    private static int windDFAngle(double angle){
+        int split = 32;  //风向分为16个角度
+        double interval = (double)360 / split;
+        angle = angle > 360 ? 720 - 360 : angle;
+        int index = (int) (Math.abs(angle) / interval);
+        return index;
+    }
+
+    /**
      * 风速区域划分
      * @param speed
      * @return

+ 0 - 26
power-fitting/src/main/java/com/gyee/power/fitting/common/constants/Constants.java

@@ -1,8 +1,5 @@
 package com.gyee.power.fitting.common.constants;
 
-import java.util.ArrayList;
-import java.util.List;
-
 public class Constants {
 
     // 数据准备  标记
@@ -13,27 +10,4 @@ public class Constants {
 
     // 数据处理完  标记
     public static final String DATA_FITTING = "fitting";
-
-    // 数据表头
-    public static final List<String> TABLE_TITLE = new ArrayList<>();
-
-    // 拟合后的数据表头
-    public static final List<String> FITTING_TITLE = new ArrayList<>();
-
-
-    static {
-        TABLE_TITLE.add("时间");
-        TABLE_TITLE.add("风机功率");
-        TABLE_TITLE.add("风机风速");
-        TABLE_TITLE.add("发电机转速");
-        TABLE_TITLE.add("风机状态");
-        TABLE_TITLE.add("风机电量");
-        TABLE_TITLE.add("欠发状态");
-        TABLE_TITLE.add("风向");
-        TABLE_TITLE.add("对风角度");
-
-        FITTING_TITLE.add("风速");
-        FITTING_TITLE.add("拟合功率");
-        FITTING_TITLE.add("Cp值");
-    }
 }

+ 1 - 1
power-fitting/src/main/java/com/gyee/power/fitting/controller/analyse/RatioController.java

@@ -18,7 +18,7 @@ public class RatioController {
     private RatioService ratioService;
 
     /**
-     * 对风偏差
+     * 对风偏差分析
      * @param ids  预处理数据 ids
      * @param mode 拟合方式  0:单台统计   1:合并统计
      * @return

+ 2 - 2
power-fitting/src/main/java/com/gyee/power/fitting/model/Powerfittinganalysis.java

@@ -49,8 +49,8 @@ public class Powerfittinganalysis extends Model<Powerfittinganalysis> {
     @TableField("TYPE")
     private String type;
 
-    @TableField("PREPAREID")
-    private String prepareid;
+    @TableField("PROCESSID")
+    private String processid;
 
     @TableField("CPAVG")
     private Double cpavg;

+ 75 - 0
power-fitting/src/main/java/com/gyee/power/fitting/model/anno/AnnotationTool.java

@@ -0,0 +1,75 @@
+package com.gyee.power.fitting.model.anno;
+
+import java.lang.reflect.Field;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * 注解工具类,提供解析注解的方法
+ */
+public class AnnotationTool {
+
+    /**
+     * 获取打了Desc注解的字典属性列表
+     * @return 字典属性列表
+     */
+    public static <T> List<FixedVo> getFixedVoList(Class<T> c) {
+        if (c == null) {
+            return Collections.emptyList();
+        }
+        try {
+            T cls = c.newInstance();
+            Field[] fields = c.getDeclaredFields();
+            List<FixedVo> fixedVoList = new LinkedList<>();
+            for (Field field : fields) {
+                //使私有对象可以访问
+                field.setAccessible(true);
+                Desc desc = field.getAnnotation(Desc.class);
+                if (desc != null) {
+                    FixedVo vo = new FixedVo();
+                    vo.setKey(String.valueOf(field.get(cls)));
+                    vo.setName(field.getName());
+                    vo.setValue(desc.value());
+                    vo.setRemark(desc.remark());
+                    fixedVoList.add(vo);
+                }
+            }
+            return fixedVoList;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return Collections.emptyList();
+    }
+
+    /**
+     * 通过反射获取值
+     * @param object
+     * @return
+     */
+    public static List<FixedVo> getValueList(Object object) {
+        if (object == null) {
+            return Collections.emptyList();
+        }
+        try {
+            Field[] fields = object.getClass().getDeclaredFields();
+            List<FixedVo> fixedVoList = new LinkedList<>();
+            for (Field field : fields) {
+                //使私有对象可以访问
+                field.setAccessible(true);
+                Desc desc = field.getAnnotation(Desc.class);
+                if (desc != null) {
+                    FixedVo vo = new FixedVo();
+                    Object o = field.get(object);
+                    vo.setKey(String.valueOf(o));
+                    vo.setRemark(desc.remark());
+                    fixedVoList.add(vo);
+                }
+            }
+            return fixedVoList;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return Collections.emptyList();
+    }
+}

+ 18 - 0
power-fitting/src/main/java/com/gyee/power/fitting/model/anno/Desc.java

@@ -0,0 +1,18 @@
+package com.gyee.power.fitting.model.anno;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+/**
+ * 配置通过注解
+ */
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Desc {
+
+    String value ();
+    String remark () default "";
+}

+ 22 - 0
power-fitting/src/main/java/com/gyee/power/fitting/model/anno/FixedVo.java

@@ -0,0 +1,22 @@
+package com.gyee.power.fitting.model.anno;
+
+import lombok.Data;
+
+/**
+ * 与注解属性对应的类 @Desc
+ */
+@Data
+public class FixedVo {
+
+    public String key;
+    public String name;
+    public String value;
+    public String remark;
+
+
+    @Override
+    public String toString() {
+        return "FixedVo [key=" + key + ", name=" + name +", value=" + value + ", remark="
+                + remark + "]";
+    }
+}

+ 18 - 9
power-fitting/src/main/java/com/gyee/power/fitting/model/custom/PowerFittingPoint.java

@@ -1,27 +1,36 @@
 package com.gyee.power.fitting.model.custom;
 
+import com.gyee.power.fitting.model.anno.Desc;
 import lombok.Data;
 
 /**
  * 拟合后对应的曲线 model
  */
 @Data
-public class PowerFittingPoint {
+public class PowerFittingData {
+
+    public PowerFittingData(){}
+
+    public PowerFittingData(String[] str) {
+        if (str.length >= 2){
+            this.speed = Double.valueOf(str[0]);
+            this.nhdata = Double.valueOf(str[1]);
+            this.cpdata = ((double)((int)(Double.valueOf(str[2])*1000)))/1000;
+        }
+    }
+
 
     //风速
+    @Desc(value = "风速", remark = "1")
     private Double speed;
-    //拟合数据
+    //拟合功率
+    @Desc(value = "拟合功率", remark = "1")
     private Double nhdata;
     //修正数据
+    @Desc(value = "修正功率", remark = "0")
     private Double xzdata;
     //cp值
+    @Desc(value = "Cp值", remark = "1")
     private Double cpdata;
 
-    public PowerFittingPoint(String[] str) {
-        if (str.length >= 2){
-            this.speed = Double.valueOf(str[0]);
-            this.nhdata = Double.valueOf(str[1]);
-            this.cpdata = ((double)((int)(Double.valueOf(str[2])*1000)))/1000;
-        }
-    }
 }

+ 30 - 12
power-fitting/src/main/java/com/gyee/power/fitting/model/custom/PowerPointData.java

@@ -1,5 +1,6 @@
 package com.gyee.power.fitting.model.custom;
 
+import com.gyee.power.fitting.model.anno.Desc;
 import lombok.Data;
 
 import java.text.DecimalFormat;
@@ -12,49 +13,66 @@ public class PowerPointData {
 
     public PowerPointData(){}
 
-    public PowerPointData(String[] str){
+    public PowerPointData(String[] str, boolean isFilter){
         DecimalFormat df = new DecimalFormat("0.00");
         if (str.length >= 9){
             this.time = str[0];
             this.power = Double.valueOf(df.format(Double.valueOf(str[1])));
             this.speed = Double.valueOf(df.format(Double.valueOf(str[2])));
-            this.RR = Double.valueOf(df.format(Double.valueOf(str[3])));
-            this.mxzt = Double.valueOf(df.format(Double.valueOf(str[4]))).intValue();
-            this.DL = Double.valueOf(df.format(Double.valueOf(str[5])));
-            this.qfzt = Double.valueOf(df.format(Double.valueOf(str[6]))).intValue();
-            this.FX = Double.valueOf(df.format(Double.valueOf(str[7])));
-            this.angle = Double.valueOf(df.format(Double.valueOf(str[8])));
+            this.rr = Double.valueOf(df.format(Double.valueOf(str[3])));
+            this.mxzt = Double.valueOf(str[4]).intValue();
+            this.dl = Double.valueOf(df.format(Double.valueOf(str[5])));
+            this.qfzt = Double.valueOf(str[6]).intValue();
+            this.fx = Double.valueOf(df.format(Double.valueOf(str[7])));
+            this.dfwc = Double.valueOf(df.format(Double.valueOf(str[8])));
+            this.angle = Double.valueOf(df.format(Double.valueOf(str[9])));
         }
+        if (isFilter)
+            this.filter = Integer.valueOf(str[str.length - 1]);
     }
 
     //时间
-    private String time;
+    @Desc(value = "时间", remark = "1")
+    private String time = "1970-01-01 00:00:00";
 
     //功率
+    @Desc(value = "功率", remark = "1")
     private double power = 0;
 
     //风速
+    @Desc(value = "风速", remark = "1")
     private double speed = 0;
 
     //转速
-    private double RR = 0;
+    @Desc(value = "转速", remark = "1")
+    private double rr = 0;
 
     //明细状态
+    @Desc(value = "风机状态", remark = "1")
     private int mxzt = 0;
 
     //电量
-    private double DL = 0;
+    @Desc(value = "电量", remark = "1")
+    private double dl = 0;
 
     //欠发状态
+    @Desc(value = "欠发状态", remark = "1")
     private int qfzt = 0;
 
     //风向
-    private double FX = 0;
+    @Desc(value = "风向", remark = "1")
+    private double fx = 0;
 
-    //对风角度
+    //对风误差
+    @Desc(value = "对风误差", remark = "1")
+    private double dfwc = 0;
+
+    //偏航角度
+    @Desc(value = "偏航角度", remark = "1")
     private double angle = 0;
 
     //是否过滤  0:不过滤 1:过滤
+    @Desc(value = "筛选", remark = "0")
     private int filter = 0;
 
     private String wtId;

+ 4 - 29
power-fitting/src/main/java/com/gyee/power/fitting/model/custom/TableTitle.java

@@ -1,43 +1,18 @@
 package com.gyee.power.fitting.model.custom;
 
+import lombok.AllArgsConstructor;
 import lombok.Data;
+import lombok.NoArgsConstructor;
 
 /**
  * 和 PowerPointData / PowerFittingPoint 对应
  * 主要给前端表格提供对应标题
  */
 @Data
+@NoArgsConstructor
+@AllArgsConstructor
 public class TableTitle {
 
     private String key;
     private String des;
-
-    public TableTitle(String des){
-        this.des = des;
-        if (des.contains("时间")){
-            this.key = "time";
-        } else if (des.contains("风机功率")){
-            this.key = "power";
-        } else if (des.contains("风速")){
-            this.key = "speed";
-        } else if (des.contains("转速")){
-            this.key = "rr";
-        } else if (des.contains("风机状态")){
-            this.key = "mxzt";
-        } else if (des.contains("电量")){
-            this.key = "dl";
-        } else if (des.contains("欠发")){
-            this.key = "qfzt";
-        } else if (des.contains("风向")){
-            this.key = "fx";
-        } else if (des.contains("角度")){
-            this.key = "angle";
-        } else if (des.contains("筛选")){
-            this.key = "filter";
-        } else if (des.contains("拟合功率")){
-            this.key = "nhdata";
-        } else if (des.contains("Cp值")){
-            this.key = "cpdata";
-        }
-    }
 }

+ 38 - 33
power-fitting/src/main/java/com/gyee/power/fitting/service/custom/curve/DataFittingService.java

@@ -11,9 +11,12 @@ import com.gyee.power.fitting.common.util.PowerFittingUtil;
 import com.gyee.power.fitting.common.util.SnowFlakeUtil;
 import com.gyee.power.fitting.model.Modelpowerdetails;
 import com.gyee.power.fitting.model.Powerfittinganalysis;
+import com.gyee.power.fitting.model.anno.AnnotationTool;
+import com.gyee.power.fitting.model.anno.FixedVo;
 import com.gyee.power.fitting.model.custom.*;
 import com.gyee.power.fitting.service.PowerfittinganalysisService;
 import lombok.extern.slf4j.Slf4j;
+import lombok.val;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 
@@ -131,19 +134,16 @@ public class DataFittingService {
         Map<String, Object> map = new HashMap<>();
 
         /** 添加标题 **/
-        List<TableTitle> lt = new ArrayList<>();
-        StringBuilder sb = setTitle();
-        String[] str = sb.toString().split(",");
-        for (String s : str){
-            lt.add(new TableTitle(s));
-        }
+        List<FixedVo> fxList = AnnotationTool.getFixedVoList(PowerFittingData.class);
+        List<TableTitle> lt = fxList.stream().filter(f -> f.getRemark().equals("1"))
+                .map(d -> new TableTitle(d.getName(), d.getValue())).collect(Collectors.toList());
 
         /** 添加内容 **/
-        List<PowerFittingPoint> list = new ArrayList<>();
+        List<PowerFittingData> list = new ArrayList<>();
         Powerfittinganalysis obj = powerService.selectItemById(id);
         List<String> ls = FileUtil.readFile(obj.getPath(), false);
         for (int i = 1; i < ls.size(); i++){
-            PowerFittingPoint data = new PowerFittingPoint(ls.get(i).split(","));
+            PowerFittingData data = new PowerFittingData(ls.get(i).split(","));
             list.add(data);
         }
 
@@ -171,9 +171,9 @@ public class DataFittingService {
         List<Object> cpzList = new ArrayList<>();
         List<String> ls = FileUtil.readFile(obj.getPath(), true);
         for (int i = 1; i < ls.size(); i++){
-            String[] split = ls.get(i).split(",");
-            sjglList.add(new double[]{Double.valueOf(split[0]), Double.valueOf(split[1])});
-            cpzList.add(new double[]{Double.valueOf(split[0]), Double.valueOf(split[2])});
+            PowerFittingData data = new PowerFittingData(ls.get(i).split(","));
+            sjglList.add(new double[]{Double.valueOf(data.getSpeed()), data.getNhdata()});
+            cpzList.add(new double[]{Double.valueOf(data.getSpeed()), data.getCpdata()});
         }
 
         //保证功率
@@ -181,7 +181,7 @@ public class DataFittingService {
         List<Object> bzglList = modelPower.stream().sorted(Comparator.comparing(Modelpowerdetails::getSpeed)).map(m -> new double[]{m.getSpeed(), m.getEnsurepower()}).collect(Collectors.toList());
 
         //散点
-        String[] ids = obj.getPrepareid().split(",");
+        String[] ids = obj.getProcessid().split(",");
         List<PowerPointData> yyd = new ArrayList<>(); //有用点
         List<PowerPointData> wyd = new ArrayList<>(); //无用点
         for (String pid : ids){
@@ -189,11 +189,10 @@ public class DataFittingService {
             List<String> lp = FileUtil.readFile(pf.getPath(), true);
             for (int i = 1; i < lp.size(); i++){
                 String[] split = lp.get(i).split(",");
-                PowerPointData pd = new PowerPointData(split);
+                PowerPointData pd = new PowerPointData(split, true);
                 if (pd.getSpeed() < 0 || pd.getPower() < 0)
                     continue;
                 pd.setWtId(pf.getWindturbine());
-                pd.setFilter(Integer.parseInt(split[9]));
                 if (0 == pd.getFilter())
                     yyd.add(pd);   //没有过滤
                 if (1 == pd.getFilter())
@@ -207,9 +206,11 @@ public class DataFittingService {
         List<PointVo> listYY = new ArrayList<>();
         List<PointVo> listWY = new ArrayList<>();
         dataScanService.getMapYY().forEach((k, v) -> {
+            // k: 前端画圈时的散点数据标记
             listYY.add(new PointVo(v.get(0).getSpeed(), v.get(0).getPower(), dataScanService.getMapYY().get(k).size() + 3, k));
         });
         dataScanService.getMapWY().forEach((k, v) -> {
+            // k: 前端画圈时的散点数据标记
             listWY.add(new PointVo(v.get(0).getSpeed(), v.get(0).getPower(), dataScanService.getMapWY().get(k).size() + 3, k));
         });
 
@@ -243,8 +244,9 @@ public class DataFittingService {
 
 
     private StringBuilder setTitle(){
-        StringBuilder sb = new StringBuilder();
-        String columnName = String.join(",", Constants.FITTING_TITLE);
+        val sb = new StringBuilder();
+        val list = AnnotationTool.getFixedVoList(PowerFittingData.class);
+        String columnName = list.stream().filter(f -> f.getRemark().equals("1")).map(FixedVo::getValue).collect(Collectors.joining(","));
         sb.append(columnName).append("\n");
         return sb;
     }
@@ -254,9 +256,10 @@ public class DataFittingService {
     private void csvParse(List<String> line, List<Double> arrayS, List<Double> arrayP, double mins, double maxs, double minp, double maxp){
         for (int i = 1; i < line.size(); i++) {
             String[] split = line.get(i).split(",");
-            int filter = Integer.valueOf(split[9]); //是否过滤 0:没过滤 1:过滤
-            double x = Double.valueOf(split[2]);    //风速
-            double y = Double.valueOf(split[1]);    //功率
+            PowerPointData data = new PowerPointData(split, true);//是否过滤 0:没过滤 1:过滤
+            double x = data.getSpeed();    //风速
+            double y = data.getPower();    //功率
+            int filter = data.getFilter();
             if (filter == 0 && (x >= mins && x <= maxs && y >= minp && y <= maxp)) {
                 arrayS.add(x);
                 arrayP.add(y);
@@ -290,24 +293,25 @@ public class DataFittingService {
         dataCurveRatio(lf, obj);
 
         String content = assemble(lf);
-        String prepareId = "";
+
+        String processId = "";
         String fileName = null;
         if (mode == 0){
-            prepareId = obj.getId();
+            processId = obj.getId();
             fileName = config.getFilePathFitting() + obj.getStation() + "_" + obj.getCode() + "_" + SnowFlakeUtil.generateIdL() / 100000 + ".csv";
         }
         if (mode == 1){
-            prepareId = list.stream().map(d -> d.getId()).collect(Collectors.joining(","));
+            processId = list.stream().map(d -> d.getId()).collect(Collectors.joining(","));
             fileName = config.getFilePathFitting() + obj.getStation() + "_merge" + "_" + SnowFlakeUtil.generateIdL() / 100000 + ".csv";
         }
         if (mode == 2){
-            prepareId = list.stream().map(d -> d.getId()).collect(Collectors.joining(","));
+            processId = list.stream().map(d -> d.getId()).collect(Collectors.joining(","));
             fileName = config.getFilePathFitting() + obj.getStation() + "_same" + "_" + SnowFlakeUtil.generateIdL() / 100000 + ".csv";
         }
         boolean flag = FileUtil.writeFile(fileName, content);
         if (flag) {  // TODO  保存数据库
             obj.setPath(fileName);
-            obj.setPrepareid(prepareId);
+            obj.setProcessid(processId);
             obj.setCpavg(lf.getCpAvg());
             obj.setType(Constants.DATA_FITTING);
             powerService.insertItem(obj);
@@ -385,7 +389,7 @@ public class DataFittingService {
                     points5.add(new Point(power.getSpeed(), power.getEnsurepower()));
                 if (power.getSpeed() >= 5 && power.getSpeed() < 10)
                     points10.add(new Point(power.getSpeed(), power.getEnsurepower()));
-                if (power.getSpeed() >= 10 && power.getSpeed() <= 12)
+                if (power.getSpeed() >= 10 && power.getSpeed() < 12)
                     points12.add(new Point(power.getSpeed(), power.getEnsurepower()));
                 if (power.getSpeed() >= 12 && power.getSpeed() <= 25)
                     points25.add(new Point(power.getSpeed(), power.getEnsurepower()));
@@ -399,11 +403,11 @@ public class DataFittingService {
             double maxp25 = list.stream().filter(f -> 25.0 == f.getSpeed()).collect(Collectors.toList()).get(0).getEnsurepower();
 
             //曲线偏差率
-            double pcl = PowerFittingALG.curveDeviationRatio2(point, points, maxp25, 11);
-            double pcl5 = PowerFittingALG.curveDeviationRatio2(point5, points5, maxp5, 3);
-            double pcl10 = PowerFittingALG.curveDeviationRatio2(point10, points10, maxp10, 5);
-            double pcl12 = PowerFittingALG.curveDeviationRatio2(point12, points12, maxp12, 10);
-            double pcl25 = PowerFittingALG.curveDeviationRatio2(point25, points25, maxp25, 12);
+            double pcl = PowerFittingALG.curveDeviationRatio2(point, points, maxp25, 3, 25);
+            double pcl5 = PowerFittingALG.curveDeviationRatio2(point5, points5, maxp5, 3, 5);
+            double pcl10 = PowerFittingALG.curveDeviationRatio2(point10, points10, maxp10, 5, 10);
+            double pcl12 = PowerFittingALG.curveDeviationRatio2(point12, points12, maxp12, 10, 12);
+            double pcl25 = PowerFittingALG.curveDeviationRatio2(point25, points25, maxp25, 12, 25);
 
             obj.setPcratio(Double.valueOf(df.format(pcl)));
             obj.setPc5ratio(Double.valueOf(df.format(pcl5)));
@@ -455,20 +459,21 @@ public class DataFittingService {
 
 
     /**
-     * 统计并网时间  3-5m   5-10m   10-12m   12-25m  不运行
+     * 统计并网时间  3-5m   5-10m   10-12m  12-25m(全功率)   不运行
      * @param ids
      * @return
      */
     public Object dataFittingTime(String ids) {
         List<Object> result = new ArrayList<>();
         List<Powerfittinganalysis> list = powerService.selectListByIds(ids);
+
         if (list.size() == 0)
             return result;
 
         list.forEach(item -> {
             Map<String, Object> map = new HashMap<>();
             int[] time = new int[5];
-            String[] split = item.getPrepareid().split(",");//数据准备ID,获取文件
+            String[] split = item.getProcessid().split(",");//数据准备ID,获取文件
             for (String id : split){
                 List<String> line = FileUtil.readFile(powerService.getById(id).getPath(), true);
                 timeTotal(time, line);
@@ -485,7 +490,7 @@ public class DataFittingService {
         List<PowerPointData> list = new ArrayList<>();
         double interval = DateUtil.getTimeDiff(line.get(1).split(",")[0], line.get(2).split(",")[0]); //两条数据的间隔时间
         for (int i = 1; i < line.size(); i++){
-            list.add(new PowerPointData(line.get(i).split(",")));
+            list.add(new PowerPointData(line.get(i).split(","), true));
         }
         for (PowerPointData item : list){
             if (item.getSpeed() >= 3.0 && item.getSpeed() < 5.0 && item.getMxzt() == 2)

+ 11 - 9
power-fitting/src/main/java/com/gyee/power/fitting/service/custom/curve/DataPrepareService.java

@@ -9,12 +9,15 @@ import com.gyee.power.fitting.common.spring.InitialRunner;
 import com.gyee.power.fitting.common.util.*;
 import com.gyee.power.fitting.model.Powerfittinganalysis;
 import com.gyee.power.fitting.model.Windturbinetestingpointai2;
+import com.gyee.power.fitting.model.anno.AnnotationTool;
+import com.gyee.power.fitting.model.anno.FixedVo;
 import com.gyee.power.fitting.model.custom.PowerPointData;
 import com.gyee.power.fitting.model.custom.TableTitle;
 import com.gyee.power.fitting.model.custom.TsDoubleData;
 import com.gyee.power.fitting.service.PowerfittinganalysisService;
 import com.gyee.power.fitting.service.custom.socket.WebSocketServer;
 import lombok.extern.slf4j.Slf4j;
+import lombok.val;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
@@ -108,22 +111,19 @@ public class DataPrepareService {
      * @return
      */
     public Map<String, Object> dataPrepareShow(String id){
-        Map<String, Object> map = new HashMap<>();
+        val map = new HashMap<String, Object>();
 
         /** 添加标题 **/
-        List<TableTitle> lt = new ArrayList<>();
-        StringBuilder sb = setTitle();
-        String[] str = sb.toString().split(",");
-        for (String s : str){
-            lt.add(new TableTitle(s));
-        }
+        List<FixedVo> fxList = AnnotationTool.getFixedVoList(PowerPointData.class);
+        List<TableTitle> lt = fxList.stream().filter(f -> f.getRemark().equals("1"))
+                .map(d -> new TableTitle(d.getName(), d.getValue())).collect(Collectors.toList());
 
         /** 添加内容  读取前500行 **/
         List<PowerPointData> list = new ArrayList<>();
         Powerfittinganalysis obj = powerService.selectItemById(id);
         List<String> ls = FileUtil.readFile(obj.getPath(), false);
         for (int i = 1; i < ls.size(); i++){
-            PowerPointData data = new PowerPointData(ls.get(i).split(","));
+            PowerPointData data = new PowerPointData(ls.get(i).split(","), false);
             list.add(data);
         }
 
@@ -145,6 +145,7 @@ public class DataPrepareService {
             for (int j = 1; j < list.size(); j++){
                 sb.append(list.get(j).get(i).getDoubleValue()).append(",");
             }
+            sb.deleteCharAt(sb.lastIndexOf(","));
             sb.append("\n");
         }
 
@@ -153,7 +154,8 @@ public class DataPrepareService {
 
     private StringBuilder setTitle(){
         StringBuilder sb = new StringBuilder();
-        String columnName = String.join(",", Constants.TABLE_TITLE);
+        val list = AnnotationTool.getFixedVoList(PowerPointData.class);
+        String columnName = list.stream().filter(f -> f.getRemark().equals("1")).map(FixedVo::getValue).collect(Collectors.joining(","));
         sb.append(columnName).append("\n");
         return sb;
     }

+ 13 - 30
power-fitting/src/main/java/com/gyee/power/fitting/service/custom/curve/DataProcessService.java

@@ -8,11 +8,13 @@ import com.gyee.power.fitting.common.spring.InitialRunner;
 import com.gyee.power.fitting.common.util.*;
 import com.gyee.power.fitting.model.Modelpowerdetails;
 import com.gyee.power.fitting.model.Powerfittinganalysis;
+import com.gyee.power.fitting.model.anno.AnnotationTool;
+import com.gyee.power.fitting.model.anno.FixedVo;
 import com.gyee.power.fitting.model.custom.PowerPointData;
 import com.gyee.power.fitting.model.custom.TableTitle;
 import com.gyee.power.fitting.service.PowerfittinganalysisService;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 
 import java.util.*;
@@ -54,7 +56,7 @@ public class DataProcessService {
             List<PowerPointData> eis = new ArrayList<>();
             List<String> list = FileUtil.readFile(obj.getPath(), true);
             for (int i = 1; i < list.size(); i++) {
-                eis.add(new PowerPointData(list.get(i).split(",")));
+                eis.add(new PowerPointData(list.get(i).split(","), false));
             }
 
             /** 风速  ->  保证功率  来自数据库 **/
@@ -64,7 +66,6 @@ public class DataProcessService {
             /** 数据预处理 **/
             List<PowerPointData> data = PowerProcessALG.dataProcess(eis, modelPowerMap, maxs, mins, maxp, minp, isfbw, isfhl, isbw, istj, isglpc, isqfh, qfhdj);
 
-
             /** 静风频率 **/
             double frequency = PowerFittingALG.frequency(data.stream().map(PowerPointData::getSpeed).collect(Collectors.toList()), 3);
 
@@ -102,12 +103,8 @@ public class DataProcessService {
         Map<String, Object> map = new HashMap<>();
 
         /** 添加标题 **/
-        List<TableTitle> lt = new ArrayList<>();
-        StringBuilder sb = setTitle();
-        String[] str = sb.toString().split(",");
-        for (String s : str){
-            lt.add(new TableTitle(s));
-        }
+        List<FixedVo> fxList = AnnotationTool.getFixedVoList(PowerPointData.class);
+        List<TableTitle> lt = fxList.stream().map(d -> new TableTitle(d.getName(), d.getValue())).collect(Collectors.toList());
 
         /** 添加内容  读取前500行 **/
         List<PowerPointData> list = new ArrayList<>();
@@ -115,8 +112,7 @@ public class DataProcessService {
         List<String> ls = FileUtil.readFile(obj.getPath(), false);
         for (int i = 1; i < ls.size(); i++){
             String[] split = ls.get(i).split(",");
-            PowerPointData data = new PowerPointData(split);
-            data.setFilter(Integer.valueOf(split[9]));
+            PowerPointData data = new PowerPointData(split, true);
             list.add(data);
         }
 
@@ -128,22 +124,11 @@ public class DataProcessService {
 
 
     private String assemble(List<PowerPointData> list) {
-        if (list.size() == 0)
-            return null;
-
         StringBuilder sb = setTitle();
-        for (int i = 0; i < list.size(); i++) {
-            sb.append(list.get(i).getTime()).append(",");
-            sb.append(list.get(i).getPower()).append(",");
-            sb.append(list.get(i).getSpeed()).append(",");
-            sb.append(list.get(i).getRR()).append(",");
-            sb.append(list.get(i).getMxzt()).append(",");
-            sb.append(list.get(i).getDL()).append(",");
-            sb.append(list.get(i).getQfzt()).append(",");
-            sb.append(list.get(i).getFX()).append(",");
-            sb.append(list.get(i).getAngle()).append(",");
-            sb.append(list.get(i).getFilter()).append(",");
-            sb.append("\n");
+        for (PowerPointData obj : list){
+            List<FixedVo> ls = AnnotationTool.getValueList(obj);
+            String data = ls.stream().filter(f -> !StringUtils.isEmpty(f.getRemark())).map(FixedVo::getKey).collect(Collectors.joining(","));
+            sb.append(data).append("\n");
         }
 
         return sb.toString();
@@ -151,10 +136,8 @@ public class DataProcessService {
 
     private StringBuilder setTitle() {
         StringBuilder sb = new StringBuilder();
-        List<String> tableTitle = new ArrayList<>();
-        tableTitle.addAll(Constants.TABLE_TITLE);
-        tableTitle.add("筛选");
-        String columnName = String.join(",", tableTitle);
+        List<FixedVo> list = AnnotationTool.getFixedVoList(PowerPointData.class);
+        String columnName = list.stream().map(FixedVo::getValue).collect(Collectors.joining(","));
         sb.append(columnName).append("\n");
         return sb;
     }

+ 5 - 2
power-fitting/src/main/java/com/gyee/power/fitting/service/custom/fx/WindDirectionService.java

@@ -1,5 +1,6 @@
 package com.gyee.power.fitting.service.custom.fx;
 
+import com.gyee.power.fitting.common.alg.PowerFittingALG;
 import com.gyee.power.fitting.common.alg.WindDirectionALG;
 import com.gyee.power.fitting.common.util.FileUtil;
 import com.gyee.power.fitting.model.Powerfittinganalysis;
@@ -38,6 +39,7 @@ public class WindDirectionService {
                 map.put("roses", WindDirectionALG.fxRoses(ls));
                 map.put("count", WindDirectionALG.fxCountRoses(ls));
                 map.put("radar", WindDirectionALG.fxRadarRoses(ls));
+                map.put("frequency", PowerFittingALG.windDeviationPoint(ls));
                 result.add(map);
             }
         }
@@ -50,6 +52,7 @@ public class WindDirectionService {
             map.put("roses", WindDirectionALG.fxRoses(ls));
             map.put("count", WindDirectionALG.fxCountRoses(ls));
             map.put("radar", WindDirectionALG.fxRadarRoses(ls));
+            map.put("frequency", PowerFittingALG.windDeviationPoint(ls));
             result.add(map);
         }
 
@@ -105,13 +108,13 @@ public class WindDirectionService {
         List<String> content = FileUtil.readFile(obj.getPath(), true);
         for (int i = 1; i < content.size(); i++){
             String[] split = content.get(i).split(",");
-            PowerPointData data = new PowerPointData(split);
+            PowerPointData data = new PowerPointData(split, true);
             if (data.getSpeed() < 0 || data.getPower() < 0)
                 continue;
             data.setWtId(obj.getWindturbine());
-            data.setFilter(Integer.parseInt(split[9]));
             ls.add(data);
         }
         return ls;
     }
 }
+

+ 10 - 12
power-fitting/src/main/java/com/gyee/power/fitting/service/custom/ratio/RatioService.java

@@ -6,7 +6,9 @@ import com.gyee.power.fitting.common.util.FileUtil;
 import com.gyee.power.fitting.model.Powerfittinganalysis;
 import com.gyee.power.fitting.model.custom.Point;
 import com.gyee.power.fitting.model.custom.PointVo;
+import com.gyee.power.fitting.model.custom.PowerPointData;
 import com.gyee.power.fitting.service.PowerfittinganalysisService;
+import lombok.val;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -34,7 +36,7 @@ public class RatioService {
         List<Powerfittinganalysis> listObj = powerService.selectListByIds(ids);
         if (mode == 0){
             listObj.forEach(obj -> {
-                List<PointVo> points = csvParse(obj);
+                List<PowerPointData> points = csvParse(obj);
                 int[] count = PowerFittingALG.windDeviationRatio(points);
                 List<Point> scatter = PowerFittingALG.windDeviationScatter(points);
                 Map<String, Object> map = new HashMap<>();
@@ -45,9 +47,9 @@ public class RatioService {
             });
         }
         if (mode == 1){
-            List<PointVo> ls = new ArrayList<>();
+            List<PowerPointData> ls = new ArrayList<>();
             listObj.forEach(obj -> {
-                List<PointVo> points = csvParse(obj);
+                List<PowerPointData> points = csvParse(obj);
                 ls.addAll(points);
             });
             int[] count = PowerFittingALG.windDeviationRatio(ls);
@@ -67,17 +69,13 @@ public class RatioService {
      * @param obj
      * @return
      */
-    private List<PointVo> csvParse(Powerfittinganalysis obj){
-        List<PointVo> list = new ArrayList<>();
-        DecimalFormat df = new DecimalFormat("0.00");
-        List<String> content = FileUtil.readFile(obj.getPath(), true);
+    private List<PowerPointData> csvParse(Powerfittinganalysis obj){
+        List<PowerPointData> list = new ArrayList<>();
+        val content = FileUtil.readFile(obj.getPath(), true);
         for (int i = 1; i < content.size(); i++){
             String[] split = content.get(i).split(",");
-            PointVo point = new PointVo();
-            point.setX(Double.parseDouble(df.format(Double.parseDouble(split[7]))));  //风向
-            point.setY(Double.parseDouble(df.format(Double.parseDouble(split[8]))));  //对风角度
-            point.setS(Double.parseDouble(df.format(Double.parseDouble(split[2]))));  //风速
-            list.add(point);
+            PowerPointData data = new PowerPointData(split, false);
+            list.add(data);
         }
 
         return list;

+ 4 - 2
power-fitting/src/main/resources/application.yaml

@@ -9,8 +9,8 @@ gyee:
   file-path-fitting: data\fitting\
   # 数据压缩下载
   file-path-download: data\zip\
-  # 风机实发功率\风机风速\发电机转速\明细状态\风机日发电量\实时欠发状态\风向\对风角度(对风误差)  顺序不能乱
-  points: AI130,AI022,AI128,ZTMX,RFDL,RSSQFZT,AI008,AI036
+  # 风机实发功率\风机风速\发电机转速\明细状态\风机日发电量\实时欠发状态\风向\对风角度(对风误差)\偏航角度  顺序不能乱
+  points: AI130,AI022,AI128,ZTMX,RFDL,RSSQFZT,AI008,AI036,AI034
   # 数据准备时由于数据量太大,初始一个默认间隔,用于适配器取数
   interval: 20
 
@@ -74,3 +74,5 @@ logging:
     com.example: debug
   file:
     path: ./logs
+
+

+ 2 - 2
power-fitting/src/main/resources/mapper/PowerfittinganalysisMapper.xml

@@ -13,7 +13,7 @@
         <result column="TIME" property="time" />
         <result column="PATH" property="path" />
         <result column="TYPE" property="type" />
-        <result column="PREPAREID" property="prepareid" />
+        <result column="PROCESSID" property="processID" />
         <result column="CPAVG" property="cpavg" />
         <result column="SPEEDAVG" property="speedavg" />
         <result column="FREQUENCY" property="frequency" />
@@ -26,7 +26,7 @@
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        ID, STATION, STATIONCN, WINDTURBINE, code, interval, TIME, PATH, TYPE, PREPAREID, CPAVG, SPEEDAVG, FREQUENCY, PCRATIO, PC5RATIO, PC10RATIO, PC12RATIO, PC25RATIO
+        ID, STATION, STATIONCN, WINDTURBINE, code, interval, TIME, PATH, TYPE, PROCESSID, CPAVG, SPEEDAVG, FREQUENCY, PCRATIO, PC5RATIO, PC10RATIO, PC12RATIO, PC25RATIO
     </sql>
 
 </mapper>

+ 4 - 0
power-fitting/src/main/resources/readme.md

@@ -0,0 +1,4 @@
+### 1.添加测点并保存文件
+1)application.yaml文件  gyee下的points增加测点统一编码
+
+2)model/custom包下的PowerPointData.java类增加对应的字段及描述