Jelajahi Sumber

温度与功率分析;AGC分析;

chenminghua 1 tahun lalu
induk
melakukan
098638db73
21 mengubah file dengan 378 tambahan dan 34 penghapusan
  1. 1 0
      .gitignore
  2. 1 1
      power-fitting/src/main/java/com/gyee/power/fitting/common/alg/PowerFittingALG.java
  3. 1 1
      power-fitting/src/main/java/com/gyee/power/fitting/common/alg/PowerTemperatureAlg.java
  4. 19 0
      power-fitting/src/main/java/com/gyee/power/fitting/common/spring/InitialRunner.java
  5. 75 0
      power-fitting/src/main/java/com/gyee/power/fitting/common/util/DateUtil.java
  6. 25 0
      power-fitting/src/main/java/com/gyee/power/fitting/controller/analyse/PowerTemperatureController.java
  7. 11 0
      power-fitting/src/main/java/com/gyee/power/fitting/model/Powerfittinganalysis.java
  8. 29 0
      power-fitting/src/main/java/com/gyee/power/fitting/model/custom/PowerTemperatureData.java
  9. 8 0
      power-fitting/src/main/java/com/gyee/power/fitting/schedule/FiveLossScheduleTask.java
  10. 5 0
      power-fitting/src/main/java/com/gyee/power/fitting/service/LineService.java
  11. 2 0
      power-fitting/src/main/java/com/gyee/power/fitting/service/PowerfittinganalysisService.java
  12. 5 0
      power-fitting/src/main/java/com/gyee/power/fitting/service/ProjectService.java
  13. 1 17
      power-fitting/src/main/java/com/gyee/power/fitting/service/custom/curve/AgcDeviateService.java
  14. 1 0
      power-fitting/src/main/java/com/gyee/power/fitting/service/custom/curve/DataPrepareService.java
  15. 39 3
      power-fitting/src/main/java/com/gyee/power/fitting/service/custom/fiveloss/FiveLossService.java
  16. 89 7
      power-fitting/src/main/java/com/gyee/power/fitting/service/custom/temperature/PowerTemperatureService.java
  17. 18 0
      power-fitting/src/main/java/com/gyee/power/fitting/service/impl/LineServiceImpl.java
  18. 16 0
      power-fitting/src/main/java/com/gyee/power/fitting/service/impl/PowerfittinganalysisServiceImpl.java
  19. 18 0
      power-fitting/src/main/java/com/gyee/power/fitting/service/impl/ProjectServiceImpl.java
  20. 11 4
      power-fitting/src/main/resources/application.yaml
  21. 3 1
      power-fitting/src/main/resources/mapper/PowerfittinganalysisMapper.xml

+ 1 - 0
.gitignore

@@ -38,3 +38,4 @@ build/
 /gyee-sample-impala/logs
 /gyee-sample-impala/logs
 /*.log
+/data

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

@@ -339,7 +339,7 @@ public class PowerFittingALG {
 
     /**
      * 对风偏差散点过滤  统计-50 到 50的
-     *
+     * 频次
      * @param list
      *
      *

+ 1 - 1
power-fitting/src/main/java/com/gyee/power/fitting/common/alg/PowerTemperatureAlg.java

@@ -23,7 +23,7 @@ public class PowerTemperatureAlg {
         Map<Integer, int[]> map = new TreeMap<>(); //[0]计数  [1]功率求和
         int mint = (int) minT;
         int maxt = (int) maxT;
-        int split = 3;  //温度间隔步调3°
+        int split = 2;  //温度间隔步调2°
 
         points.stream().filter(f -> !(f.getSpeed() < 12.0 || f.getSpeed() > 25.0 || f.getMxzt() != 2))
                 .sorted(Comparator.comparing(PowerPointData::getHjwd)).forEach(item -> {

+ 19 - 0
power-fitting/src/main/java/com/gyee/power/fitting/common/spring/InitialRunner.java

@@ -38,6 +38,10 @@ public class InitialRunner implements CommandLineRunner {
     private ModelpowerService modelpowerService;
     @Resource
     private ModelpowerdetailsService modelpowerdetailsService;
+    @Resource
+    private ProjectService projectService;
+    @Resource
+    private LineService lineService;
 
 
     /**场站所有信息**/
@@ -52,6 +56,11 @@ public class InitialRunner implements CommandLineRunner {
     /**场站的风机**/
     public static Map<String, List<Windturbine>> wpMap = new HashMap<>();
 
+    /**期次**/
+    public static List<Project> projectList = new ArrayList<>();
+    /**线路**/
+    public static List<Line> lineList = new ArrayList<>();
+
     public static Map<String, List<Windturbinetestingpointai2>> pointMap = new HashMap<>();
 
     /**所有设备型号**/
@@ -73,6 +82,8 @@ public class InitialRunner implements CommandLineRunner {
         cachePoints();
         cacheEquipment();
         cacheModelPower();
+        cacheProject();
+        cacheLine();
 
         System.out.println(">>>>>>>>>>>>>>>数据缓存完成<<<<<<<<<<<<<<");
     }
@@ -122,4 +133,12 @@ public class InitialRunner implements CommandLineRunner {
         modelPowerDetailMap.putAll(lsMPD.stream().collect(Collectors.groupingBy(u -> u.getModelid())));
     }
 
+    private void cacheProject(){
+        projectList.addAll(projectService.selectList());
+    }
+
+    private void cacheLine(){
+        lineList.addAll(lineService.selectList());
+    }
+
 }

+ 75 - 0
power-fitting/src/main/java/com/gyee/power/fitting/common/util/DateUtil.java

@@ -524,4 +524,79 @@ public class DateUtil extends DateUtils {
         day.set(Calendar.MILLISECOND, 0);
         return day.getTime();
     }
+
+    /**
+     * 在指定时间上加指定的天数
+     *
+     * @param date
+     * @param day
+     * @return
+     */
+    public static Date addDays(Date date, int day) {
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(date);
+        cal.add(Calendar.DAY_OF_MONTH, day);
+        return cal.getTime();
+    }
+
+    /**
+     * 在指定的时间上加指定的月数
+     *
+     * @param date
+     * @param month
+     * @return
+     */
+    public static Date addMonths(Date date, int month) {
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(date);
+        cal.add(Calendar.MONTH, month);
+        return cal.getTime();
+    }
+
+    /**
+     * 在指定的时间上加指定的月数
+     *
+     * @param date
+     * @param year
+     * @return
+     */
+    public static Date addYears(Date date, int year) {
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(date);
+        cal.add(Calendar.YEAR, year);
+        return cal.getTime();
+    }
+
+    /**
+     * 在指定时间上加指定的小时
+     *
+     * @param date
+     * @param hour
+     * @return
+     */
+    public static Date addHours(Date date, int hour) {
+        return new Date(date.getTime() + hour * 3600 * 1000);
+    }
+
+    /**
+     * 在指定时间上加指定的分钟
+     *
+     * @param date
+     * @param m
+     * @return
+     */
+    public static Date addMinutes(Date date, int m) {
+        return new Date(date.getTime() + m * 60 * 1000);
+    }
+
+    /**
+     * 在指定时间上加指定的秒
+     *
+     * @param date
+     * @param s
+     * @return
+     */
+    public static Date addSeconds(Date date, int s) {
+        return new Date(date.getTime() + s * 1000);
+    }
 }

+ 25 - 0
power-fitting/src/main/java/com/gyee/power/fitting/controller/analyse/PowerTemperatureController.java

@@ -8,6 +8,8 @@ import com.gyee.power.fitting.service.custom.temperature.PowerTemperatureService
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.Map;
+
 /**
  * 功率温度分析
  */
@@ -29,4 +31,27 @@ public class PowerTemperatureController {
         Object o = powerTemperatureService.ratedPower(ids);
         return JsonResult.successData(ResultCode.SUCCESS, o);
     }
+
+
+    /***
+     * 温度曲线分析
+     * @param id  预处理数据的id
+     * @return
+     */
+    @GetMapping("curve/analysis")
+    public JSONObject curveAnalysis(String id){
+        Object o = powerTemperatureService.curveAnalysis(id);
+        return JsonResult.successData(ResultCode.SUCCESS, o);
+    }
+
+    /**
+     * file 文件数据展示
+     * @param id
+     * @return
+     */
+    @GetMapping("show")
+    public JSONObject temperatureShow(String id){
+        Map<String, Object> result = powerTemperatureService.temperatureDataShow(id);
+        return JsonResult.successData(ResultCode.SUCCESS, result);
+    }
 }

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

@@ -76,7 +76,18 @@ public class Powerfittinganalysis extends Model<Powerfittinganalysis> {
     @TableField("PC25RATIO")
     private Double pc25ratio;
 
+    @TableField("INTERP")
+    private Integer interp;
 
+    @TableField("ISCAL")
+    private Integer iscal;  //0-没有计算  1-已计算
+
+
+    public void setIscal(Integer iscal) {
+        if (null == iscal)
+            iscal = 0;
+        this.iscal = iscal;
+    }
 
     @Override
     protected Serializable pkVal() {

+ 29 - 0
power-fitting/src/main/java/com/gyee/power/fitting/model/custom/PowerTemperatureData.java

@@ -0,0 +1,29 @@
+package com.gyee.power.fitting.model.custom;
+
+import com.gyee.power.fitting.model.anno.Desc;
+import lombok.Data;
+
+@Data
+public class PowerTemperatureData {
+
+    public PowerTemperatureData(){}
+
+    public PowerTemperatureData(String[] str) {
+        if (str.length >= 2){
+            this.speed = Double.valueOf(str[0]);
+            this.power = Double.valueOf(str[1]);
+            this.hjwd = Double.valueOf(str[2]);
+        }
+    }
+
+
+    //风速
+    @Desc(des = "风速", remark = "1")
+    private Double speed;
+    //功率
+    @Desc(des = "功率", remark = "1")
+    private Double power;
+    //温度
+    @Desc(des = "温度", remark = "1")
+    private Double hjwd;
+}

+ 8 - 0
power-fitting/src/main/java/com/gyee/power/fitting/schedule/FiveLossScheduleTask.java

@@ -0,0 +1,8 @@
+package com.gyee.power.fitting.schedule;
+
+
+import org.springframework.stereotype.Component;
+
+@Component
+public class FiveLossScheduleTask {
+}

+ 5 - 0
power-fitting/src/main/java/com/gyee/power/fitting/service/LineService.java

@@ -3,6 +3,8 @@ package com.gyee.power.fitting.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.gyee.power.fitting.model.Line;
 
+import java.util.List;
+
 
 /**
  * <p>
@@ -14,4 +16,7 @@ import com.gyee.power.fitting.model.Line;
  */
 public interface LineService extends IService<Line> {
 
+
+    List<Line> selectList();
+
 }

+ 2 - 0
power-fitting/src/main/java/com/gyee/power/fitting/service/PowerfittinganalysisService.java

@@ -30,4 +30,6 @@ public interface PowerfittinganalysisService extends IService<Powerfittinganalys
     List<Powerfittinganalysis> selectListByIds(String ids);
 
     void deleteList(String ids);
+
+    List<Powerfittinganalysis> selectListByIsCal(int isCal);
 }

+ 5 - 0
power-fitting/src/main/java/com/gyee/power/fitting/service/ProjectService.java

@@ -3,6 +3,8 @@ package com.gyee.power.fitting.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.gyee.power.fitting.model.Project;
 
+import java.util.List;
+
 
 /**
  * <p>
@@ -14,4 +16,7 @@ import com.gyee.power.fitting.model.Project;
  */
 public interface ProjectService extends IService<Project> {
 
+
+    List<Project> selectList();
+
 }

+ 1 - 17
power-fitting/src/main/java/com/gyee/power/fitting/service/custom/curve/AgcDeviateService.java

@@ -23,7 +23,7 @@ import java.util.stream.Collectors;
  */
 @Order(0)
 @Component
-public class AgcDeviateService /*implements ApplicationRunner*/ {
+public class AgcDeviateService {
 
     /**
      * 是否是离线版本
@@ -41,23 +41,7 @@ public class AgcDeviateService /*implements ApplicationRunner*/ {
 
     private Map<String, List<String>> files;
 
-   /* @Override
-    public void run(ApplicationArguments args) throws Exception {
-        long l = 1672502400000L;
 
-        for(AgcDeviateConfig adc : agcDeviateConfigMap.values()){
-            // 7
-            long start = l;
-            for(int i=0;i<36;++i){
-                long end = start+24*3600000;
-                List<AgcDeviateTag> datas = getAgcDeviateTags(adc.getId(), start, end, 60);
-
-                fileService.saveObjectToFile(filePathPower+adc.getId()+","+start+".json",datas);
-
-                start=end;
-            }
-        }
-    }*/
 
     private final AgcDeviateMapper agcDeviateMapper;
     /**

+ 1 - 0
power-fitting/src/main/java/com/gyee/power/fitting/service/custom/curve/DataPrepareService.java

@@ -89,6 +89,7 @@ public class DataPrepareService {
                     obj.setInterval(NumberUtil.toNum(interval));
                     obj.setPath(fileName);
                     obj.setType(Constants.DATA_PREPARE);
+                    obj.setInterp(interval);
                     powerService.insertItem(obj);
                 }
                 socketServer.sendInfo(JsonResult.successData(ResultCode.SUCCESS, new DecimalFormat("0.00").format((double)(k + 1)/wtId.size())), null);

+ 39 - 3
power-fitting/src/main/java/com/gyee/power/fitting/service/custom/fiveloss/FiveLossService.java

@@ -1,15 +1,29 @@
 package com.gyee.power.fitting.service.custom.fiveloss;
 
 
+import com.gyee.power.fitting.common.spring.InitialRunner;
+import com.gyee.power.fitting.common.util.DateUtil;
+import com.gyee.power.fitting.common.util.FileUtil;
+import com.gyee.power.fitting.model.*;
+import com.gyee.power.fitting.service.PowerfittinganalysisService;
+import lombok.val;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
+import javax.annotation.Resource;
+import java.util.Date;
 import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 
 @Service
 public class FiveLossService {
 
+    @Resource
+    private PowerfittinganalysisService analysisService;
+
 //    @Autowired
 //    private
 //
@@ -18,7 +32,29 @@ public class FiveLossService {
 //    }
 
 
-//    public void fiveLossCal(String station, String date){
-//
-//    }
+    //明细状态
+    // 0-待机  1-手动停机  2-正常发电  3-缺陷降出力  4-限电降出力  5-限电停机  6-故障停机
+    // 7-场内受累停机  8-检修停机  9-场内受累检修  10-电网受累  11-环境受累  12-风机离线
+    @Transactional
+    public void fiveLossCal(){
+        Date currentDate = DateUtil.getNowDate();
+        Date date = DateUtil.addSeconds(currentDate, -1);
+        Date date15age = DateUtil.addMinutes(currentDate, -15);
+
+        List<Windpowerstation> wpls = InitialRunner.wpList;
+        List<Windturbine> wtls = InitialRunner.wtList;
+        List<Project> pjls = InitialRunner.projectList;
+        List<Line> lnls = InitialRunner.lineList;
+
+        Map<String, Windturbine> wtmap = InitialRunner.wtMap;
+        List<Powerfittinganalysis> analyses = analysisService.selectListByIsCal(1);
+
+        wtls.forEach(item -> {
+            Windturbine wt = wtmap.get(item.getId());
+            List<Powerfittinganalysis> collect = analyses.stream().filter(f -> f.getWindturbine().equals(wt.getId())).collect(Collectors.toList());
+            collect.forEach(p -> {
+                List<String> content = FileUtil.readFile(p.getPath(), true);
+            });
+        });
+    }
 }

+ 89 - 7
power-fitting/src/main/java/com/gyee/power/fitting/service/custom/temperature/PowerTemperatureService.java

@@ -5,15 +5,15 @@ import com.gyee.power.fitting.common.spring.InitialRunner;
 import com.gyee.power.fitting.common.util.FileUtil;
 import com.gyee.power.fitting.model.Modelpowerdetails;
 import com.gyee.power.fitting.model.Powerfittinganalysis;
-import com.gyee.power.fitting.model.custom.PowerPointData;
+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 org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
+import java.util.stream.Collectors;
 
 
 @Service
@@ -43,8 +43,8 @@ public class PowerTemperatureService {
             Map<String, Object> mp = new HashMap<>();
             mp.put("wt", obj.getWindturbine());
             mp.put("power", InitialRunner.equipmentMap.get(InitialRunner.wtMap.get(obj.getWindturbine()).getModelid()));
-            mp.put("res1", res);
-            mp.put("res2", rp);
+            mp.put("res1", res); //额定功率vs.温度分析
+            mp.put("res2", rp);  //额定功率vs.温度分析
             result.add(mp);
         }
 
@@ -52,6 +52,55 @@ public class PowerTemperatureService {
     }
 
 
+    public Object curveAnalysis(String id) {
+        Powerfittinganalysis obj = powerService.selectItemById(id);
+        if (obj == null)
+            return null;
+
+        Map<String, Object> map = new HashMap<>();
+
+        //实际功率
+        List<Object> sjglList = new ArrayList<>();
+        List<String> ls = FileUtil.readFile(obj.getPath(), true);
+        for (int i = 1; i < ls.size(); i++){
+            PowerFittingData data = new PowerFittingData(ls.get(i).split(","));
+            sjglList.add(new double[]{Double.valueOf(data.getSpeed()), data.getNhdata()});
+        }
+
+        //保证功率
+        List<Modelpowerdetails> modelPower = InitialRunner.modelPowerDetailMap.get(InitialRunner.wtMap.get(obj.getWindturbine()).getModelid());
+        List<Object> bzglList = modelPower.stream().sorted(Comparator.comparing(Modelpowerdetails::getSpeed)).map(m -> new double[]{m.getSpeed(), m.getEnsurepower()}).collect(Collectors.toList());
+
+        //散点
+        List<Object[]> scatter = new ArrayList<>();
+
+        //散点ID
+        String[] ids = obj.getProcessid().split(",");
+        for (String pid : ids) {
+            Powerfittinganalysis pf = powerService.selectItemById(pid);
+            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, true);
+                if (pd.getSpeed() < 0 || pd.getPower() < 0)
+                    continue;
+
+                Object[] temp = new Object[3];
+                temp[0] = pd.getSpeed();
+                temp[1] = pd.getPower();
+                temp[2] = pd.getHjwd();
+                scatter.add(temp);
+            }
+        }
+
+        map.put("sjgl", sjglList);    //实际功率
+        map.put("llgl", bzglList);    //保证功率
+        map.put("scatter", scatter);  //散点
+        map.put("obj", obj);          //对象
+
+        return map;
+    }
+
 
     /**
      * csv 文件解析成对象
@@ -80,4 +129,37 @@ public class PowerTemperatureService {
         map.put("maxT", maxT);
         return map;
     }
+
+
+    /**
+     * 组装表格数据
+     * @param id
+     * @return
+     */
+    public Map<String, Object> temperatureDataShow(String id) {
+        Map<String, Object> map = new HashMap<>();
+
+        /** 添加标题 **/
+        List<FixedVo> fxList = AnnotationTool.getFixedVoList(PowerTemperatureData.class);
+        List<TableTitle> lt = fxList.stream().filter(f -> f.getRemark().equals("1"))
+                .map(d -> new TableTitle(d.getName(), d.getDes())).collect(Collectors.toList());
+
+        /** 添加内容 **/
+        List<PowerPointData> list = new ArrayList<>();
+        Powerfittinganalysis obj = powerService.selectItemById(id);
+        if (obj == null)
+            return map;
+        String[] ids = obj.getProcessid().split(",");
+        Powerfittinganalysis item = powerService.selectItemById(ids[0]);
+        List<String> ls = FileUtil.readFile(item.getPath(), false);
+        for (int i = 1; i < ls.size(); i++){
+            PowerPointData data = new PowerPointData(ls.get(i).split(","), false);
+            list.add(data);
+        }
+
+        map.put("title", lt);
+        map.put("data", list);
+
+        return map;
+    }
 }

+ 18 - 0
power-fitting/src/main/java/com/gyee/power/fitting/service/impl/LineServiceImpl.java

@@ -1,11 +1,15 @@
 package com.gyee.power.fitting.service.impl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.power.fitting.common.base.ExcludeQueryWrapper;
 import com.gyee.power.fitting.mapper.LineMapper;
 import com.gyee.power.fitting.model.Line;
 import com.gyee.power.fitting.service.LineService;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * <p>
  *  服务实现类
@@ -17,4 +21,18 @@ import org.springframework.stereotype.Service;
 @Service
 public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements LineService {
 
+    @Override
+    public List<Line> selectList() {
+        List<Line> list = new ArrayList();
+
+        ExcludeQueryWrapper wrapper = new ExcludeQueryWrapper();
+
+        try{
+            list = baseMapper.selectList(wrapper);
+        }catch (Exception e){
+            log.error("LineServiceImpl--selectList", e);
+        }
+
+        return list;
+    }
 }

+ 16 - 0
power-fitting/src/main/java/com/gyee/power/fitting/service/impl/PowerfittinganalysisServiceImpl.java

@@ -89,4 +89,20 @@ public class PowerfittinganalysisServiceImpl extends ServiceImpl<Powerfittingana
             log.error("PowerfittinganalysisServiceImpl--deleteList", e);
         }
     }
+
+    @Override
+    public List<Powerfittinganalysis> selectListByIsCal(int isCal) {
+        List<Powerfittinganalysis> list = new ArrayList();
+
+        ExcludeQueryWrapper wrapper = new ExcludeQueryWrapper();
+        wrapper.eq("iscal", isCal);
+
+        try{
+            list = baseMapper.selectList(wrapper);
+        }catch (Exception e){
+            log.error("PowerfittinganalysisServiceImpl--selectListByIsCal", e);
+        }
+
+        return list;
+    }
 }

+ 18 - 0
power-fitting/src/main/java/com/gyee/power/fitting/service/impl/ProjectServiceImpl.java

@@ -1,11 +1,15 @@
 package com.gyee.power.fitting.service.impl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.power.fitting.common.base.ExcludeQueryWrapper;
 import com.gyee.power.fitting.mapper.ProjectMapper;
 import com.gyee.power.fitting.model.Project;
 import com.gyee.power.fitting.service.ProjectService;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * <p>
  *  服务实现类
@@ -17,4 +21,18 @@ import org.springframework.stereotype.Service;
 @Service
 public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> implements ProjectService {
 
+    @Override
+    public List<Project> selectList() {
+        List<Project> list = new ArrayList();
+
+        ExcludeQueryWrapper wrapper = new ExcludeQueryWrapper();
+
+        try{
+            list = baseMapper.selectList(wrapper);
+        }catch (Exception e){
+            log.error("ProjectServiceImpl--selectList", e);
+        }
+
+        return list;
+    }
 }

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

@@ -34,12 +34,19 @@ spring:
     allow-bean-definition-overriding: false #当遇到同样名字的时候,是否允许覆盖注册
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
-    #宁夏三区oracle
+    # 宁夏三区oracle
+#    driver-class-name: oracle.jdbc.OracleDriver
+#    url: jdbc:oracle:thin:@192.168.1.105:1521:gdnxfd
+#    username: nxfdprod
+#    password: gdnxfd123
+
+    # 华为云oracle(功率预测的环境)
     driver-class-name: oracle.jdbc.OracleDriver
-    url: jdbc:oracle:thin:@192.168.1.105:1521:gdnxfd
-    username: nxfdprod
-    password: gdnxfd123
+    url: jdbc:oracle:thin:@120.46.129.85:1521:ORCL
+    username: gyee
+    password: FRWIND
 
+    # 本地sql-lite
 #    driver-class-name: org.sqlite.JDBC
 #    url: jdbc:sqlite::resource:gdnx.db
 #    username:

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

@@ -22,11 +22,13 @@
         <result column="PC10RATIO" property="pc10ratio" />
         <result column="PC12RATIO" property="pc12ratio" />
         <result column="PC25RATIO" property="pc25ratio" />
+        <result column="INTERP" property="interp" />
+        <result column="ISCAL" property="iscal" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        ID, STATION, STATIONCN, WINDTURBINE, code, interval, TIME, PATH, TYPE, PROCESSID, 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, INTERP, ISCAL
     </sql>
 
 </mapper>