Browse Source

修改场站1、2、3、4、5、6表写入事件

shilin 2 years ago
parent
commit
5f63fe2516
23 changed files with 312 additions and 229 deletions
  1. 26 10
      realtime/generationXK-service/src/main/java/com/gyee/generation/GenerationMain.java
  2. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconCurveFittMonthMain.java
  3. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconCurveFittMonthSub.java
  4. 0 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconCurveFittYearMain.java
  5. 1 3
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconCurveFittYearSub.java
  6. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconCurveFittingMain.java
  7. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconCurveFittingSub.java
  8. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconEquipmentInfoDayTop.java
  9. 3 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconWtCurveFitting.java
  10. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconWtCurveFittingMonth.java
  11. 1 3
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconWtCurveFittingYear.java
  12. 11 17
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/ActivePowerService.java
  13. 4 4
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfoDayTopService.java
  14. 107 101
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/PowerCurveFittingByTimeService.java
  15. 3 3
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/PowerCurveFittingService.java
  16. 8 3
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo1Service.java
  17. 8 3
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo2Service.java
  18. 9 3
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo3Service.java
  19. 6 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo4Service.java
  20. 107 57
      realtime/generationXK-service/src/main/java/com/gyee/generation/task/SaticSchedulePgTask.java
  21. 5 4
      realtime/generationXK-service/src/main/java/com/gyee/generation/util/realtimesource/EdosUtil.java
  22. 6 5
      realtime/generationXK-service/src/main/resources/application-xk.yml
  23. 1 1
      realtime/generationXK-service/src/main/resources/application.yml

+ 26 - 10
realtime/generationXK-service/src/main/java/com/gyee/generation/GenerationMain.java

@@ -1,8 +1,5 @@
 package com.gyee.generation;
 
-import com.gyee.generation.service.EquipmentInfo5Service;
-import com.gyee.generation.util.DateUtils;
-import com.gyee.generation.util.SpringUtils;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -53,10 +50,12 @@ public class GenerationMain {
 //        {
 //            inputOrOutPutService.inputOrOutputSpeed(new Date());
 //        }
+
+        Date date =new Date();
 //        WindPowerInfo1Service windPowerInfo1Service= SpringUtils.getBean("windPowerInfo1Service");
 //
 //
-        Date date =new Date();
+//
 //        windPowerInfo1Service.calLineInfoDay(date);
 //        windPowerInfo1Service.calProjectInfoDay(date);
 //        windPowerInfo1Service.calWindpowerInfoDay(date);
@@ -97,7 +96,7 @@ public class GenerationMain {
 //        windPowerInfo6Service.calWindpowerInfoDay(date);
 //        windPowerInfo6Service.calCompanyInfoDay(date);
 //        windPowerInfo6Service.calRegionInfoDay(date);
-
+//
 //        EquipmentInfo1Service equipmentInfo1Service= SpringUtils.getBean("equipmentInfo1Service");
 //        equipmentInfo1Service.calEquipmentInfoDay(date);
 //        EquipmentInfo2Service equipmentInfo2Service= SpringUtils.getBean("equipmentInfo2Service");
@@ -106,10 +105,27 @@ public class GenerationMain {
 //        equipmentInfo3Service.calEquipmentInfoDay(date);
 //        EquipmentInfo4Service equipmentInfo4Service= SpringUtils.getBean("equipmentInfo4Service");
 //        equipmentInfo4Service.calEquipmentInfoDay(date);
-        EquipmentInfo5Service equipmentInfo5Service= SpringUtils.getBean("equipmentInfo5Service");
-        equipmentInfo5Service.calEquipmentInfoDay(date);
-        Date end=new Date();
-        System.out.println("执行用时"+ DateUtils.secondsDiff(date,end) +"秒");
-        System.out.println("计算完成");
+//        EquipmentInfo5Service equipmentInfo5Service= SpringUtils.getBean("equipmentInfo5Service");
+//        equipmentInfo5Service.calEquipmentInfoDay(date);
+
+//        EquipmentInfoDayTopService equipmentInfoDayTopService= SpringUtils.getBean("equipmentInfoDayTopService");
+//        equipmentInfoDayTopService.calEquipmentInfoDayTop(new Date());
+//        Calendar c=Calendar.getInstance();
+//        c.set(Calendar.MONTH,7);
+//        c.set(Calendar.DAY_OF_MONTH,31);
+//        PowerCurveFittingByTimeService powerCurveFittingByTimeService= SpringUtils.getBean("powerCurveFittingByTimeService");
+////        powerCurveFittingByTimeService.cureFittingDay(c.getTime());
+//        powerCurveFittingByTimeService.cureFittingMonth(c.getTime());
+////        powerCurveFittingByTimeService.cureFittingYear(c.getTime());
+//        Date end=new Date();
+//        System.out.println("执行用时"+ DateUtils.secondsDiff(date,end) +"秒");
+//        System.out.println("计算完成");
+//
+//        CacheService cacheService= SpringUtils.getBean("cacheService");
+//        cacheService.initRedisCache();
+//
+//        PowerCurveFittingModelService powerCurveFittingModelService= SpringUtils.getBean("powerCurveFittingModelService");
+//        powerCurveFittingModelService.cureFittingModel();
+
     }
 }

+ 1 - 1
realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconCurveFittMonthMain.java

@@ -24,7 +24,7 @@ public class ProEconCurveFittMonthMain extends Model {
     /**
      * 编号
      */
-    @TableId(value = "ID",type = IdType.ASSIGN_ID)
+    @TableId(value = "ID",type = IdType.ASSIGN_UUID)
     private String id;
 
     /**

+ 1 - 1
realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconCurveFittMonthSub.java

@@ -24,7 +24,7 @@ public class ProEconCurveFittMonthSub extends Model {
     /**
      * 编号
      */
-     @TableId(value = "ID",type = IdType.ASSIGN_ID)
+     @TableId(value = "ID",type = IdType.ASSIGN_UUID)
     private String id;
 
     /**

+ 0 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconCurveFittYearMain.java

@@ -1,7 +1,5 @@
 package com.gyee.generation.model.auto;
 
-import java.math.BigDecimal;
-
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.extension.activerecord.Model;

+ 1 - 3
realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconCurveFittYearSub.java

@@ -1,7 +1,5 @@
 package com.gyee.generation.model.auto;
 
-import java.math.BigDecimal;
-
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
@@ -25,7 +23,7 @@ public class ProEconCurveFittYearSub extends Model {
     /**
      * 编号
      */
-    @TableId(value = "ID",type = IdType.ASSIGN_ID)
+    @TableId(value = "ID",type = IdType.ASSIGN_UUID)
     private String id;
 
     /**

+ 1 - 1
realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconCurveFittingMain.java

@@ -26,7 +26,7 @@ public class ProEconCurveFittingMain extends Model {
     /**
      * 编号
      */
-    @TableId(value = "ID",type = IdType.ASSIGN_ID)
+    @TableId(value = "ID",type = IdType.ASSIGN_UUID)
     private String id;
 
     /**

+ 1 - 1
realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconCurveFittingSub.java

@@ -26,7 +26,7 @@ public class ProEconCurveFittingSub extends Model {
     /**
      * 编号
      */
-    @TableId(value = "ID",type = IdType.ASSIGN_ID)
+    @TableId(value = "ID",type = IdType.ASSIGN_UUID)
     private String id;
 
     /**

+ 1 - 1
realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconEquipmentInfoDayTop.java

@@ -27,7 +27,7 @@ public class ProEconEquipmentInfoDayTop extends Model {
      * 编号
      */
     @TableId(value = "ID",type = IdType.ASSIGN_ID)
-    private Integer id;
+    private Long id;
 
     /**
      * 风场编号

+ 3 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconWtCurveFitting.java

@@ -4,10 +4,11 @@ package com.gyee.generation.model.auto;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
-import java.util.Date;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.util.Date;
+
 /**
  * <p>
  * 风电机拟合曲线
@@ -26,7 +27,7 @@ public class ProEconWtCurveFitting extends Model {
      * 编号
      */
     @TableId(value = "ID",type = IdType.ASSIGN_ID)
-    private Integer id;
+    private Long id;
 
     /**
      * 风机编号

+ 1 - 1
realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconWtCurveFittingMonth.java

@@ -25,7 +25,7 @@ public class ProEconWtCurveFittingMonth extends Model {
      * 编号
      */
     @TableId(value = "ID",type = IdType.ASSIGN_ID)
-    private Integer id;
+    private Long id;
 
     /**
      * 风机编号

+ 1 - 3
realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconWtCurveFittingYear.java

@@ -1,7 +1,5 @@
 package com.gyee.generation.model.auto;
 
-import java.math.BigDecimal;
-
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
@@ -26,7 +24,7 @@ public class ProEconWtCurveFittingYear extends Model {
      * 编号
      */
     @TableId(value = "ID",type = IdType.ASSIGN_ID)
-    private Integer id;
+    private Long id;
 
     /**
      * 风机编号

+ 11 - 17
realtime/generationXK-service/src/main/java/com/gyee/generation/service/ActivePowerService.java

@@ -3,17 +3,13 @@ package com.gyee.generation.service;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.gyee.generation.init.CacheContext;
 import com.gyee.generation.model.auto.*;
-
-import com.gyee.generation.service.auto.*;
+import com.gyee.generation.service.auto.IProEconActivePowerDataService;
+import com.gyee.generation.service.auto.IProEconEquipmentInfo15minuteService;
 import com.gyee.generation.util.DateUtils;
 import com.gyee.generation.util.StringUtils;
-import com.gyee.generation.util.realtimesource.IEdosUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
-
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -21,9 +17,9 @@ import java.util.stream.Collectors;
 public class ActivePowerService {
 
 
-    private static final Logger logger = LoggerFactory.getLogger(ActivePowerService.class);
-    @Resource
-    private IEdosUtil edosUtil;
+//    private static final Logger logger = LoggerFactory.getLogger(ActivePowerService.class);
+//    @Resource
+//    private IEdosUtil edosUtil;
 
     @Resource
     private IProEconEquipmentInfo15minuteService proEconEquipmentInfo15minuteService;
@@ -31,8 +27,6 @@ public class ActivePowerService {
     @Resource
     private IProEconActivePowerDataService proEconActivePowerDataService;
 
-    @Resource
-    private IProEconWtPowerCurveFittingService proEconWtPowerCurveFittingService;
 
 
     public void calcActivePowerData(Date currentDate) {
@@ -44,7 +38,7 @@ public class ActivePowerService {
         for (ProBasicPowerstation station : CacheContext.wpls) {
 
             List<ProEconEquipmentInfo15minute> ei15ls = proEconEquipmentInfo15minuteService.list().stream()
-                    .filter(i -> i.getWindpowerstationId().equals(station)
+                    .filter(i -> i.getWindpowerstationId().equals(station.getId())
                             && ( i.getRecordDate().compareTo(beginDate)==0 || i.getRecordDate().after(beginDate))
                             && (i.getRecordDate().compareTo(endDate)==0 || i.getRecordDate().before(endDate))
                     ).collect(Collectors.toList());
@@ -52,7 +46,7 @@ public class ActivePowerService {
 
 
             Map<String/*风机编号*/, Map<Double/*风速*/, List<Double>>> map =
-                    new HashMap<String, Map<Double, List<Double>>>();
+                    new HashMap<>();
 
 
             Map<Double/*风速*/, List<Double>> speedMap;
@@ -61,7 +55,7 @@ public class ActivePowerService {
                 if (map.containsKey(item.getWindturbineId())) {
                     speedMap = map.get(item.getWindturbineId());
                 } else {
-                    speedMap = new HashMap<Double, List<Double>>();
+                    speedMap = new HashMap<>();
                     map.put(item.getWindturbineId(), speedMap);
                 }
                 Double speed = StringUtils.round(item.getFpjfs(), 2);
@@ -92,7 +86,7 @@ public class ActivePowerService {
 
             }
             for (String windturbineId : map.keySet()) {
-                List<ProEconActivePowerData> dataList = new ArrayList<ProEconActivePowerData>();
+//                List<ProEconActivePowerData> dataList = new ArrayList<>();
                 Map<Double/*风速*/, List<Double>> intnalMap = map.get(windturbineId);
                 for (Double speed : intnalMap.keySet()) {
                     List<Double> powers = intnalMap.get(speed);
@@ -103,7 +97,7 @@ public class ActivePowerService {
                                     && i.getSpeed() == speed
                             ).findFirst();
 
-                    ProEconActivePowerData apdata = new ProEconActivePowerData();
+                    ProEconActivePowerData apdata;
                     if (!data.isPresent()) {
 
                         QueryWrapper<ProEconActivePowerData> wrapper = new QueryWrapper<>();
@@ -116,7 +110,7 @@ public class ActivePowerService {
                     buildActivePowerData(beginDate, station.getId(), windturbineId, speed, powers, apdata);
                     proEconActivePowerDataService.save(apdata);
 
-                    dataList.add(apdata);
+//                    dataList.add(apdata);
                 }
             }
 

+ 4 - 4
realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfoDayTopService.java

@@ -38,7 +38,7 @@ public class EquipmentInfoDayTopService {
 
 
         //判断是否有重复记录,先删除重复记录
-        List<Integer> idls = proEconEquipmentInfoDayTopService.list().stream()
+        List<Long> idls = proEconEquipmentInfoDayTopService.list().stream()
                 .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate)) == 0
                         && CacheContext.wtmap.containsKey(i.getWindturbineId())).map(ProEconEquipmentInfoDayTop::getId)
                 .collect(Collectors.toList());
@@ -167,8 +167,8 @@ public class EquipmentInfoDayTopService {
             ProEconEquipmentInfoDay2 pepid2 = pepid2ls.get(0);
             //故障时间
             peeidt.setDaygzsj(pepid2.getRgzxsmx());
-            peeidt.setMonthfdl(pepid2.getYgzxsmx());
-            peeidt.setYearfdl(pepid2.getNgzxsmx());
+            peeidt.setMonthgzsj(pepid2.getYgzxsmx());
+            peeidt.setYeargzsj(pepid2.getNgzxsmx());
             //维护时间
             peeidt.setDaywhsj(pepid2.getRjxxsmx());
             peeidt.setMonthwhsj(pepid2.getYjxxsmx());
@@ -190,7 +190,7 @@ public class EquipmentInfoDayTopService {
 
             peeidt.setDaylyxs(BigDecimal.valueOf(peeidt.getDayfdl()).divide(new BigDecimal(defaultpower), 2, RoundingMode.HALF_EVEN).doubleValue());
             peeidt.setMonthlyxs(BigDecimal.valueOf(peeidt.getMonthfdl()).divide(new BigDecimal(defaultpower), 2, RoundingMode.HALF_EVEN).doubleValue());
-            peeidt.setDaylyxs(BigDecimal.valueOf(peeidt.getYearfdl()).divide(new BigDecimal(defaultpower), 2, RoundingMode.HALF_EVEN).doubleValue());
+            peeidt.setYearlyxs(BigDecimal.valueOf(peeidt.getYearfdl()).divide(new BigDecimal(defaultpower), 2, RoundingMode.HALF_EVEN).doubleValue());
 
 
             //设备可利用率

+ 107 - 101
realtime/generationXK-service/src/main/java/com/gyee/generation/service/PowerCurveFittingByTimeService.java

@@ -238,11 +238,11 @@ public class PowerCurveFittingByTimeService {
 
             cfmday = new ProEconCurveFittingMain();
             cfmday.setWindturbineId(key);
-            cfmday.setRecordDate(recordDate);
+            cfmday.setRecordDate(DateUtils.truncate(recordDate));
 
 
             //日---实际/最优
-            cfmday.setDeviationRate1(pcl(windMap.get(key).getYsjglPoints(), windMap.get(key).getYzyglPoints(), modelpower));
+            cfmday.setDeviationRate1(pcl(windMap.get(key).getRsjglPoints(), windMap.get(key).getRzyglPoints(), modelpower));
             //日---实际/保证
             cfmday.setDeviationRate2(pcl(windMap.get(key).getRsjglPoints(), bzglpowerPoints, modelpower));
             //日---最优/保证
@@ -268,7 +268,7 @@ public class PowerCurveFittingByTimeService {
             pLCBuild(key, recordDate, windMap, modelpower, 11, bzglpowerPoints, dayLastMonthPoints, dayLastYearPoints, dayStandardPoints);
             pLCBuild(key, recordDate, windMap, modelpower, 12, bzglpowerPoints, dayLastMonthPoints, dayLastYearPoints, dayStandardPoints);
             pLCBuild(key, recordDate, windMap, modelpower, 13, bzglpowerPoints, dayLastMonthPoints, dayLastYearPoints, dayStandardPoints);
-            pLCBuild(key, recordDate, windMap, modelpower, 3, bzglpowerPoints, dayLastMonthPoints, dayLastYearPoints, dayStandardPoints);
+
 
 
             insertPoints(recordDate,  windMap.get(key).getRsjglPoints(), windMap.get(key).getRzyglPoints(), key);
@@ -503,7 +503,7 @@ public class PowerCurveFittingByTimeService {
             pLCBuild(key, stringyear, stringmonth, windMap, modelpower, 10, bzglpowerPoints, monthLastMonthPoints, monthLastYearPoints, monthStandardPoints);
             pLCBuild(key, stringyear, stringmonth, windMap, modelpower, 11, bzglpowerPoints, monthLastMonthPoints, monthLastYearPoints, monthStandardPoints);
             pLCBuild(key, stringyear, stringmonth, windMap, modelpower, 12, bzglpowerPoints, monthLastMonthPoints, monthLastYearPoints, monthStandardPoints);
-            pLCBuild(key, stringyear, stringmonth, windMap, modelpower, 12, bzglpowerPoints, monthLastMonthPoints, monthLastYearPoints, monthStandardPoints);
+            pLCBuild(key, stringyear, stringmonth, windMap, modelpower, 13, bzglpowerPoints, monthLastMonthPoints, monthLastYearPoints, monthStandardPoints);
 
 
             insertPoints(stringyear, stringmonth, windMap.get(key).getYsjglPoints(), windMap.get(key).getYzyglPoints(), key);
@@ -737,7 +737,7 @@ public class PowerCurveFittingByTimeService {
             pLCBuild(key, stringyear, windMap, modelpower, 10, bzglpowerPoints, yearLastMonthPoints, yearLastYearPoints, yearStandardPoints);
             pLCBuild(key, stringyear, windMap, modelpower, 11, bzglpowerPoints, yearLastMonthPoints, yearLastYearPoints, yearStandardPoints);
             pLCBuild(key, stringyear, windMap, modelpower, 12, bzglpowerPoints, yearLastMonthPoints, yearLastYearPoints, yearStandardPoints);
-            pLCBuild(key, stringyear, windMap, modelpower, 12, bzglpowerPoints, yearLastMonthPoints, yearLastYearPoints, yearStandardPoints);
+            pLCBuild(key, stringyear, windMap, modelpower, 13, bzglpowerPoints, yearLastMonthPoints, yearLastYearPoints, yearStandardPoints);
 
 
             insertPoints(stringyear, windMap.get(key).getNsjglPoints(), windMap.get(key).getNzyglPoints(), key);
@@ -773,7 +773,7 @@ public class PowerCurveFittingByTimeService {
         cfms = new ProEconCurveFittingSub();
         cfms.setWindturbineId(key);
         cfms.setSpeed(String.valueOf(speed));
-        cfms.setRecordDate(current);
+        cfms.setRecordDate(DateUtils.truncate(current));
 
 
         cfms.setDeviationRate1(pcl2(windMap.get(key).getRsjglPoints(), windMap.get(key).getRzyglPoints(), modelpower, speed));
@@ -812,12 +812,13 @@ public class PowerCurveFittingByTimeService {
         }
 
         cfmsmonth = new ProEconCurveFittMonthSub();
+
         cfmsmonth.setWindturbineId(key);
         cfmsmonth.setYear(stringyear);
         cfmsmonth.setMonth(stringmonth);
         cfmsmonth.setSpeed(String.valueOf(speed));
 
-        proEconCurveFittMonthSubService.save(cfmsmonth);
+
 
         //月---实际/最优
         cfmsmonth.setDeviationRate1(pcl2(windMap.get(key).getYsjglPoints(), windMap.get(key).getYzyglPoints(), modelpower, speed));
@@ -883,7 +884,7 @@ public class PowerCurveFittingByTimeService {
     private void insertPoints(Date current, List<PointVo> sjglls, List<PointVo> zyglls, String windturbineId) {
 
         //*********************************************当日曲线偏差记录**********************************************************/
-        List<Integer> wtcfidls = proEconWtCurveFittingService.list().stream().filter(i -> i.getWindturbineId().equals(windturbineId) &&
+        List<Long> wtcfidls = proEconWtCurveFittingService.list().stream().filter(i -> i.getWindturbineId().equals(windturbineId) &&
                 i.getRecordDate().compareTo(current) == 0).map(ProEconWtCurveFitting::getId).collect(Collectors.toList());
 
 
@@ -902,10 +903,10 @@ public class PowerCurveFittingByTimeService {
                         continue;
                         // item.SPEED = Double.Truncate(pointsF2[i].X);
                     } else {
-                        boolean l = String.valueOf(sjglls.get(i).getX()).contains(".");
-                        if (l) {
-                            continue;
-                        }
+//                        boolean l = String.valueOf(sjglls.get(i).getX()).contains(".");
+//                        if (l) {
+//                            continue;
+//                        }
                         item.setSpeed(sjglls.get(i).getX());
 
                     }
@@ -913,7 +914,7 @@ public class PowerCurveFittingByTimeService {
 
                     item.setActualPower(sjglls.get(i).getY());
                     item.setOptimalPower(zyglls.get(i).getY());
-                    item.setRecordDate(current);
+                    item.setRecordDate(DateUtils.truncate(current));
 
                     proEconWtCurveFittingService.save(item);
 
@@ -964,7 +965,7 @@ public class PowerCurveFittingByTimeService {
     private void insertPoints(String year, String month, List<PointVo> sjglls, List<PointVo> zyglls, String windturbineId) {
 
         //*********************************************当月曲线偏差记录**********************************************************/
-        List<Integer> wtcfmmonthidls = proEconWtCurveFittingMonthService.list().stream().filter(i -> i.getWindturbineId().equals(windturbineId) &&
+        List<Long> wtcfmmonthidls = proEconWtCurveFittingMonthService.list().stream().filter(i -> i.getWindturbineId().equals(windturbineId) &&
                 i.getYear().equals(year) && i.getMonth().equals(month)).map(ProEconWtCurveFittingMonth::getId).collect(Collectors.toList());
 
 
@@ -1038,7 +1039,7 @@ public class PowerCurveFittingByTimeService {
 
     private void insertPoints(String year,  List<PointVo> sjglls, List<PointVo> zyglls, String windturbineId) {
         //*********************************************当年曲线偏差记录**********************************************************/
-        List<Integer> wtcfmyearidls = proEconWtCurveFittingYearService.list().stream().filter(i -> i.getWindturbineId().equals(windturbineId) &&
+        List<Long> wtcfmyearidls = proEconWtCurveFittingYearService.list().stream().filter(i -> i.getWindturbineId().equals(windturbineId) &&
                 i.getYear().equals(year)).map(ProEconWtCurveFittingYear::getId).collect(Collectors.toList());
 
         for (int i = 0; i < wtcfmyearidls.size(); i++) {
@@ -1284,90 +1285,90 @@ public class PowerCurveFittingByTimeService {
 
     //todo-sl 添加数据筛选
     private boolean filterData(PointData gl, PointData fs, PointData zt, double maxvalue, String windturbineId) throws Exception {
-        if (StringUtils.notEmp(gl)) {
-            //判定功率是否超过最大值
-            if (gl.getPointValueInDouble() > maxvalue) {
-                return false;
-            }
-        }
-
-        if (StringUtils.notEmp(fs)) {
-            //判定功率是否超过最大值
-            if (gl.getPointValueInDouble() > 25) {
-                return false;
-            }
-        }
-
-        //判定状态不为运行的进行过滤
-        if (zt.getPointValueInDouble() != 2) {
-            return false;
-        }
-
-
-        //设置时间为10分钟前,10钟前有停机事件数据进行过滤
-        Calendar c = Calendar.getInstance();
-        c.setTimeInMillis(zt.getPointTime());
-        Date end = c.getTime();
-        c.add(Calendar.MINUTE, -10);
-        Date bedin = c.getTime();
-        List<PointData> points = edosUtil.getHistoryDatasSnap(zt.getEdnaId(), bedin.getTime() / 1000, end.getTime() / 1000);
-        if (!points.isEmpty()) {
-            for (PointData p : points) {
-                if (p.getPointValueInDouble() == 4) {
-
-                    return false;
-                }
-
-            }
-
-        }
-
-        //设置时间为10分钟后,运行后10分钟数据进行过滤
-        c = Calendar.getInstance();
-        c.setTimeInMillis(zt.getPointTime());
-        bedin = c.getTime();
-        c.add(Calendar.MINUTE, 10);
-        end = c.getTime();
-        points = edosUtil.getHistoryDatasSnap(zt.getEdnaId(), bedin.getTime() / 1000, end.getTime() / 1000);
-        if (!points.isEmpty()) {
-            for (PointData p : points) {
-                if (p.getPointValueInDouble() != 2) {
-                    return false;
-
-                }
-
-            }
-
-        }
-        Map<String, Map<String, ProBasicEquipmentPoint>> wtpAimap = CacheContext.wtpAimap;
-        Map<String, ProBasicEquipmentPoint> wtpointmap = wtpAimap.get(windturbineId);
-        //与保证功率进行对比,偏差大于25%的进行过滤
-        List<String> pointid = new ArrayList<>();
-
-        pointid.add(wtpointmap.get(ContantXk.BZGL).getNemCode());
-        List<PointData> value = edosUtil.getHistMatrix(pointid, gl.getPointTime() / 1000);
-
-
-        if (null != value && value.size() > 0) {
-            double bzgl = value.get(0).getPointValueInDouble();
-            double sjgl = gl.getPointValueInDouble();
-
-            double temp = Math.abs(sjgl - bzgl);
-            if (temp > sjgl * 0.25) {
-                return false;
-            }
-        }
-
-        //欠发状态大于2过滤掉
-        pointid = new ArrayList<>();
-
-        pointid.add(wtpointmap.get(ContantXk.LSQFZT).getNemCode());
-        value = edosUtil.getHistMatrix(pointid, gl.getPointTime() / 1000);
-        if (null != value && value.size() > 0) {
-            double qfzt = value.get(0).getPointValueInDouble();
-
-            return !(qfzt > 2);
-        }
+//        if (StringUtils.notEmp(gl)) {
+//            //判定功率是否超过最大值
+//            if (gl.getPointValueInDouble() > maxvalue) {
+//                return false;
+//            }
+//        }
+//
+//        if (StringUtils.notEmp(fs)) {
+//            //判定功率是否超过最大值
+//            if (fs.getPointValueInDouble() > 25) {
+//                return false;
+//            }
+//        }
+//
+//        //判定状态不为运行的进行过滤
+//        if (zt.getPointValueInDouble() != 2) {
+//            return false;
+//        }
+//
+//
+//        //设置时间为10分钟前,10钟前有停机事件数据进行过滤
+//        Calendar c = Calendar.getInstance();
+//        c.setTimeInMillis(zt.getPointTime());
+//        Date end = c.getTime();
+//        c.add(Calendar.MINUTE, -10);
+//        Date bedin = c.getTime();
+//        List<PointData> points = edosUtil.getHistoryDatasSnap(zt.getEdnaId(), bedin.getTime() / 1000, end.getTime() / 1000);
+//        if (!points.isEmpty()) {
+//            for (PointData p : points) {
+//                if (p.getPointValueInDouble() == 4) {
+//
+//                    return false;
+//                }
+//
+//            }
+//
+//        }
+//
+//        //设置时间为10分钟后,运行后10分钟数据进行过滤
+//        c = Calendar.getInstance();
+//        c.setTimeInMillis(zt.getPointTime());
+//        bedin = c.getTime();
+//        c.add(Calendar.MINUTE, 10);
+//        end = c.getTime();
+//        points = edosUtil.getHistoryDatasSnap(zt.getEdnaId(), bedin.getTime() / 1000, end.getTime() / 1000);
+//        if (!points.isEmpty()) {
+//            for (PointData p : points) {
+//                if (p.getPointValueInDouble() != 2) {
+//                    return false;
+//
+//                }
+//
+//            }
+//
+//        }
+//        Map<String, Map<String, ProBasicEquipmentPoint>> wtpAimap = CacheContext.wtpAimap;
+//        Map<String, ProBasicEquipmentPoint> wtpointmap = wtpAimap.get(windturbineId);
+//        //与保证功率进行对比,偏差大于25%的进行过滤
+//        List<String> pointid = new ArrayList<>();
+//
+//        pointid.add(wtpointmap.get(ContantXk.BZGL).getNemCode());
+//        List<PointData> value = edosUtil.getHistMatrix(pointid, gl.getPointTime() / 1000);
+//
+//
+//        if (null != value && value.size() > 0) {
+//            double bzgl = value.get(0).getPointValueInDouble();
+//            double sjgl = gl.getPointValueInDouble();
+//
+//            double temp = Math.abs(sjgl - bzgl);
+//            if (temp > sjgl * 0.25) {
+//                return false;
+//            }
+//        }
+//
+//        //欠发状态大于2过滤掉
+//        pointid = new ArrayList<>();
+//
+//        pointid.add(wtpointmap.get(ContantXk.LSQFZT).getNemCode());
+//        value = edosUtil.getHistMatrix(pointid, gl.getPointTime() / 1000);
+//        if (null != value && value.size() > 0) {
+//            double qfzt = value.get(0).getPointValueInDouble();
+//
+//            return !(qfzt > 2);
+//        }
         return true;
     }
 
@@ -1408,14 +1409,14 @@ public class PowerCurveFittingByTimeService {
                         List<PointData> yArray = glpoints.stream().filter(it -> it.getPointTime().compareTo(fspoints.get(finalI1).getPointTime()) == 0).collect(Collectors.toList());
                         if (yArray.size() > 0) {
 
-                            y = yArray.get(i).getPointValueInDouble();
+                            y = yArray.get(0).getPointValueInDouble();
                         }
 
                         int finalI = i;
                         yArray = ztpoints.stream().filter(it -> it.getPointTime().compareTo(fspoints.get(finalI).getPointTime()) == 0).collect(Collectors.toList());
                         if (yArray.size() > 0) {
 
-                            z = yArray.get(i).getPointValueInDouble();
+                            z = yArray.get(0).getPointValueInDouble();
                         }
 
 
@@ -1524,6 +1525,11 @@ public class PowerCurveFittingByTimeService {
                 sjglnhpoints.add(new PointfVo(0.0, 0.0));
 
                 sjglnhpoints = sjglnhpoints.stream().filter(it -> it.getX() >= 3).sorted(Comparator.comparing(PointfVo::getX)).collect(Collectors.toList());
+                if (sjglnhpoints.stream().min(Comparator.comparing(PointfVo::getX)).isPresent()) {
+                    double  Xmax = sjglnhpoints.stream().max(Comparator.comparing(PointfVo::getX)).get().getX();
+                    double  Ymax = sjglnhpoints.stream().max(Comparator.comparing(PointfVo::getX)).get().getY();
+                    System.out.println("");
+                }
 
                 List<PointVo> temp = LineUtil.buildLine(sjglnhpoints.stream().mapToDouble(PointfVo::getX).toArray(), sjglnhpoints.stream().mapToDouble(PointfVo::getY).toArray(), sjglnhpoints.size(), dimension, scale);
 

+ 3 - 3
realtime/generationXK-service/src/main/java/com/gyee/generation/service/PowerCurveFittingService.java

@@ -559,7 +559,7 @@ public class PowerCurveFittingService {
 
     private void insertPoints(Date current, String year, String month, List<PointVo> monthSjglls, List<PointVo> monthZyglls, List<PointVo> daySjglls, List<PointVo> dayZyglls, List<PointVo> yearSjglls, List<PointVo> yearZyglls, String windturbineId) {
         //*********************************************当年曲线偏差记录**********************************************************/
-        List<Integer> wtcfmyearidls = proEconWtCurveFittingYearService.list().stream().filter(i -> i.getWindturbineId().equals(windturbineId) &&
+        List<Long> wtcfmyearidls = proEconWtCurveFittingYearService.list().stream().filter(i -> i.getWindturbineId().equals(windturbineId) &&
                 i.getYear().equals(year)).map(ProEconWtCurveFittingYear::getId).collect(Collectors.toList());
 
         for (int i = 0; i < wtcfmyearidls.size(); i++) {
@@ -625,7 +625,7 @@ public class PowerCurveFittingService {
         }
         //*********************************************当年曲线偏差记录**********************************************************/
         //*********************************************当月曲线偏差记录**********************************************************/
-        List<Integer> wtcfmmonthidls = proEconWtCurveFittingMonthService.list().stream().filter(i -> i.getWindturbineId().equals(windturbineId) &&
+        List<Long> wtcfmmonthidls = proEconWtCurveFittingMonthService.list().stream().filter(i -> i.getWindturbineId().equals(windturbineId) &&
                 i.getYear().equals(year) && i.getMonth().equals(month)).map(ProEconWtCurveFittingMonth::getId).collect(Collectors.toList());
 
 
@@ -694,7 +694,7 @@ public class PowerCurveFittingService {
         }
         //*********************************************当月曲线偏差记录**********************************************************/
         //*********************************************当日曲线偏差记录**********************************************************/
-        List<Integer> wtcfidls = proEconWtCurveFittingService.list().stream().filter(i -> i.getWindturbineId().equals(windturbineId) &&
+        List<Long> wtcfidls = proEconWtCurveFittingService.list().stream().filter(i -> i.getWindturbineId().equals(windturbineId) &&
                 i.getRecordDate().compareTo(current) == 0).map(ProEconWtCurveFitting::getId).collect(Collectors.toList());
 
 

+ 8 - 3
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo1Service.java

@@ -582,8 +582,10 @@ public class WindPowerInfo1Service {
                 if (cl.get(Calendar.DAY_OF_MONTH) != 1) {
                     pepid1ls = proEconPowerstationInfoDay1Service.list().stream()
                             .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+
+                                    && i.getLocation().equals(Location.wp.getValue())
                                     && i.getWindpowerstationId().equals(wp.getId())
-                                    && i.getLocation().equals(Location.wp.getValue()))
+                            )
                             .collect(Collectors.toList());
                 }
                 extracted(recordDate, end, begin, pointmap, pewp, pepid1ls);
@@ -648,8 +650,10 @@ public class WindPowerInfo1Service {
                 if (cl.get(Calendar.DAY_OF_MONTH) != 1) {
                     pepid1ls = proEconPowerstationInfoDay1Service.list().stream()
                             .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+                                    && i.getLocation().equals(Location.pj.getValue())
                                     && i.getProjectId().equals(pj.getId())
-                                    && i.getLocation().equals(Location.pj.getValue()))
+
+                            )
                             .collect(Collectors.toList());
                 }
                 extracted(recordDate, end, begin, pointmap, pewp, pepid1ls);
@@ -718,8 +722,9 @@ public class WindPowerInfo1Service {
                 if (cl.get(Calendar.DAY_OF_MONTH) != 1) {
                     pepid1ls = proEconPowerstationInfoDay1Service.list().stream()
                             .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+                                    && i.getLocation().equals(Location.ln.getValue())
                                     && i.getLineId().equals(ln.getId())
-                                    && i.getLocation().equals(Location.ln.getValue()))
+                            )
                             .collect(Collectors.toList());
                 }
                 extracted(recordDate, end, begin, pointmap, pewp, pepid1ls);

+ 8 - 3
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo2Service.java

@@ -418,8 +418,10 @@ public class WindPowerInfo2Service {
                 if (cl.get(Calendar.DAY_OF_MONTH) != 1) {
                     pepidls = proEconPowerstationInfoDay2Service.list().stream()
                             .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+
+                                    && i.getLocation().equals(Location.wp.getValue())
                                     && i.getWindpowerstationId().equals(wp.getId())
-                                    && i.getLocation().equals(Location.wp.getValue()))
+                            )
                             .collect(Collectors.toList());
                 }
                 calDetiall(pewp, end, begin, CacheContext.wpwtmap.get(wp.getId()), pepidls);
@@ -486,8 +488,10 @@ public class WindPowerInfo2Service {
             if (cl.get(Calendar.DAY_OF_MONTH) != 1) {
                 pepidls = proEconPowerstationInfoDay2Service.list().stream()
                         .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+
+                                && i.getLocation().equals(Location.pj.getValue())
                                 && i.getProjectId().equals(pj.getId())
-                                && i.getLocation().equals(Location.pj.getValue()))
+                        )
                         .collect(Collectors.toList());
             }
             calDetiall(pewp, end, begin, CacheContext.pjwtmap.get(pj.getId()), pepidls);
@@ -558,8 +562,9 @@ public class WindPowerInfo2Service {
             if (cl.get(Calendar.DAY_OF_MONTH) != 1) {
                 pepidls = proEconPowerstationInfoDay2Service.list().stream()
                         .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+                                && i.getLocation().equals(Location.ln.getValue())
                                 && i.getLineId().equals(ln.getId())
-                                && i.getLocation().equals(Location.ln.getValue()))
+                        )
                         .collect(Collectors.toList());
             }
             calDetiall(pewp, end, begin, CacheContext.lnwtmap.get(ln.getId()), pepidls);

+ 9 - 3
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo3Service.java

@@ -420,8 +420,10 @@ public class WindPowerInfo3Service {
                 if (cl.get(Calendar.DAY_OF_MONTH) != 1) {
                     pepidls = proEconPowerstationInfoDay3Service.list().stream()
                             .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+                                    && i.getLocation().equals(Location.wp.getValue())
                                     && i.getWindpowerstationId().equals(wp.getId())
-                                    && i.getLocation().equals(Location.wp.getValue()))
+
+                            )
                             .collect(Collectors.toList());
                 }
                 calDetiall(pewp, end, begin, CacheContext.wpwtmap.get(wp.getId()), pepidls);
@@ -487,8 +489,10 @@ public class WindPowerInfo3Service {
             if (cl.get(Calendar.DAY_OF_MONTH) != 1) {
                 pepidls = proEconPowerstationInfoDay3Service.list().stream()
                         .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+                                && i.getLocation().equals(Location.pj.getValue())
                                 && i.getProjectId().equals(pj.getId())
-                                && i.getLocation().equals(Location.pj.getValue()))
+
+                        )
                         .collect(Collectors.toList());
             }
             calDetiall(pewp, end, begin, CacheContext.pjwtmap.get(pj.getId()), pepidls);
@@ -558,8 +562,10 @@ public class WindPowerInfo3Service {
             if (cl.get(Calendar.DAY_OF_MONTH) != 1) {
                 pepidls = proEconPowerstationInfoDay3Service.list().stream()
                         .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+                                && i.getLocation().equals(Location.ln.getValue())
                                 && i.getLineId().equals(ln.getId())
-                                && i.getLocation().equals(Location.ln.getValue()))
+
+                        )
                         .collect(Collectors.toList());
             }
             calDetiall(pewp, end, begin, CacheContext.lnwtmap.get(ln.getId()), pepidls);

+ 6 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo4Service.java

@@ -572,8 +572,10 @@ public class WindPowerInfo4Service {
             if (cl.get(Calendar.DAY_OF_MONTH) != 1) {
                 pepidls = proEconPowerstationInfoDay4Service.list().stream()
                         .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+                                && i.getLocation().equals(Location.pj.getValue())
                                 && i.getProjectId().equals(pj.getId())
-                                && i.getLocation().equals(Location.pj.getValue()))
+
+                        )
                         .collect(Collectors.toList());
             }
 
@@ -671,8 +673,10 @@ public class WindPowerInfo4Service {
             if (cl.get(Calendar.DAY_OF_MONTH) != 1) {
                 pepidls = proEconPowerstationInfoDay4Service.list().stream()
                         .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+                                && i.getLocation().equals(Location.ln.getValue())
                                 && i.getLineId().equals(ln.getId())
-                                && i.getLocation().equals(Location.ln.getValue()))
+
+                        )
                         .collect(Collectors.toList());
             }
 

+ 107 - 57
realtime/generationXK-service/src/main/java/com/gyee/generation/task/SaticSchedulePgTask.java

@@ -131,114 +131,164 @@ public class SaticSchedulePgTask {
         XxlJobHelper.log("日、月、年功率曲线拟合调度任务处理完成!........");
     }
 
+
     /**
-     * 设备指标统计
+     * 场站1表
      *  15分钟只执行一次
      *
      */
-    @XxlJob("equipment_PowerInfo_PG")
-    public void equipment_PowerInfo_PG() throws Exception {
+    @XxlJob("windPowerInfo1_PG")
+    public void windPowerInfo1_PG() throws Exception {
 
-        XxlJobHelper.log("项目指标调度程序执行开始!........");
-        Date date=new Date();
+            XxlJobHelper.log("场站指标1调度程序执行开始!........");
 
-        equipmentInfo1Service.calEquipmentInfoDay(date);
-        equipmentInfo2Service.calEquipmentInfoDay(date);
-        equipmentInfo3Service.calEquipmentInfoDay(date);
-        equipmentInfo4Service.calEquipmentInfoDay(date);
-        equipmentInfo5Service.calEquipmentInfoDay(date);
+            Date date=new Date();
 
+        windPowerInfo1Service.calLineInfoDay(date);
+        windPowerInfo1Service.calProjectInfoDay(date);
+        windPowerInfo1Service.calWindpowerInfoDay(date);
+        windPowerInfo1Service.calCompanyInfoDay(date);
+        windPowerInfo1Service.calRegionInfoDay(date);
 
-        XxlJobHelper.log("项目指标调度程序执行完成!........");
+          XxlJobHelper.log("场站指标1指标调度程序执行完成!........");
 
     }
+
     /**
-     * 线路指标统计
+     * 场站2表
      *  15分钟只执行一次
      *
      */
-    @XxlJob("Line_PowerInfo_PG")
-    public void Line_PowerInfo_PG() throws Exception {
+    @XxlJob("windPowerInfo2_PG")
+    public void windPowerInfo2_PG() throws Exception {
 
-            XxlJobHelper.log("线路指标调度程序执行开始!........");
+        XxlJobHelper.log("场站指标2调度程序执行开始!........");
 
-            Date date=new Date();
+        Date date=new Date();
 
-            windPowerInfo1Service.calLineInfoDay(date);
-            windPowerInfo2Service.calLineInfoDay(date);
-            windPowerInfo3Service.calLineInfoDay(date);
-            windPowerInfo4Service.calLineInfoDay(date);
-            windPowerInfo5Service.calLineInfoDay(date);
-            windPowerInfo6Service.calLineInfoDay(date);
+        windPowerInfo2Service.calLineInfoDay(date);
+        windPowerInfo2Service.calProjectInfoDay(date);
+        windPowerInfo2Service.calWindpowerInfoDay(date);
+        windPowerInfo2Service.calCompanyInfoDay(date);
+        windPowerInfo2Service.calRegionInfoDay(date);
 
-          XxlJobHelper.log("线路指标调度程序执行完成!........");
+        XxlJobHelper.log("场站指标2指标调度程序执行完成!........");
 
     }
 
+
     /**
-     * 线路指标统计
+     * 场站3表
      *  15分钟只执行一次
      *
      */
-    @XxlJob("project_PowerInfo_PG")
-    public void project_PowerInfo_PG() throws Exception {
+    @XxlJob("windPowerInfo3_PG")
+    public void windPowerInfo3_PG() throws Exception {
+
+        XxlJobHelper.log("场站指标3调度程序执行开始!........");
 
-        XxlJobHelper.log("项目指标调度程序执行开始!........");
         Date date=new Date();
 
-        windPowerInfo1Service.calProjectInfoDay(date);
-        windPowerInfo2Service.calProjectInfoDay(date);
+        windPowerInfo3Service.calLineInfoDay(date);
         windPowerInfo3Service.calProjectInfoDay(date);
+        windPowerInfo3Service.calWindpowerInfoDay(date);
+        windPowerInfo3Service.calCompanyInfoDay(date);
+        windPowerInfo3Service.calRegionInfoDay(date);
+
+        XxlJobHelper.log("场站指标3指标调度程序执行完成!........");
+
+    }
+
+    /**
+     * 场站4表
+     *  15分钟只执行一次
+     *
+     */
+    @XxlJob("windPowerInfo4_PG")
+    public void windPowerInfo4_PG() throws Exception {
+
+        XxlJobHelper.log("场站指标4调度程序执行开始!........");
+
+        Date date=new Date();
+
+        windPowerInfo4Service.calLineInfoDay(date);
         windPowerInfo4Service.calProjectInfoDay(date);
+        windPowerInfo4Service.calWindpowerInfoDay(date);
+        windPowerInfo4Service.calCompanyInfoDay(date);
+        windPowerInfo4Service.calRegionInfoDay(date);
+
+        XxlJobHelper.log("场站指标4指标调度程序执行完成!........");
+
+    }
+    /**
+     * 场站5表
+     *  15分钟只执行一次
+     *
+     */
+    @XxlJob("windPowerInfo5_PG")
+    public void windPowerInfo5_PG() throws Exception {
+
+        XxlJobHelper.log("场站指标5调度程序执行开始!........");
+
+        Date date=new Date();
+
+        windPowerInfo5Service.calLineInfoDay(date);
         windPowerInfo5Service.calProjectInfoDay(date);
-        windPowerInfo6Service.calProjectInfoDay(date);
+        windPowerInfo5Service.calWindpowerInfoDay(date);
+        windPowerInfo5Service.calCompanyInfoDay(date);
+        windPowerInfo5Service.calRegionInfoDay(date);
 
-        XxlJobHelper.log("项目指标调度程序执行完成!........");
+        XxlJobHelper.log("场站指标5指标调度程序执行完成!........");
 
     }
 
 
     /**
-     * 区域、公司、场站指标统计
+     * 场站6表
      *  15分钟只执行一次
      *
      */
-    @XxlJob("station_PowerInfo_PG")
-    public void station_PowerInfo_PG() throws Exception {
+    @XxlJob("windPowerInfo6_PG")
+    public void windPowerInfo6_PG() throws Exception {
+
+        XxlJobHelper.log("场站指标6调度程序执行开始!........");
 
-        XxlJobHelper.log("场站指标统计调度程序执行开始!........");
         Date date=new Date();
 
-        windPowerInfo1Service.calWindpowerInfoDay(date);
-        windPowerInfo2Service.calWindpowerInfoDay(date);
-        windPowerInfo3Service.calWindpowerInfoDay(date);
-        windPowerInfo4Service.calWindpowerInfoDay(date);
-        windPowerInfo5Service.calWindpowerInfoDay(date);
+        windPowerInfo6Service.calLineInfoDay(date);
+        windPowerInfo6Service.calProjectInfoDay(date);
         windPowerInfo6Service.calWindpowerInfoDay(date);
+        windPowerInfo6Service.calCompanyInfoDay(date);
+        windPowerInfo6Service.calRegionInfoDay(date);
 
-        XxlJobHelper.log("场站指标统计调度程序执行完成!........");
-        XxlJobHelper.log("公司指标统计调度程序执行开始!........");
+        XxlJobHelper.log("场站指标6指标调度程序执行完成!........");
 
+    }
 
-        windPowerInfo1Service.calWindpowerInfoDay(date);
-        windPowerInfo2Service.calWindpowerInfoDay(date);
-        windPowerInfo3Service.calWindpowerInfoDay(date);
-        windPowerInfo4Service.calWindpowerInfoDay(date);
-        windPowerInfo5Service.calWindpowerInfoDay(date);
-        windPowerInfo6Service.calWindpowerInfoDay(date);
+    /**
+     * 设备1-6表
+     *  15分钟只执行一次
+     *
+     */
+    @XxlJob("equipment_PowerInfo_PG")
+    public void equipment_PowerInfo_PG() throws Exception {
 
-        XxlJobHelper.log("公司指标统计调度程序执行完成!........");
-        XxlJobHelper.log("区域指标统计调度程序执行开始!........");
+        XxlJobHelper.log("设备指标调度程序执行开始!........");
 
+        Date date=new Date();
 
-        windPowerInfo1Service.calWindpowerInfoDay(date);
-        windPowerInfo2Service.calWindpowerInfoDay(date);
-        windPowerInfo3Service.calWindpowerInfoDay(date);
-        windPowerInfo4Service.calWindpowerInfoDay(date);
-        windPowerInfo5Service.calWindpowerInfoDay(date);
-        windPowerInfo6Service.calWindpowerInfoDay(date);
 
-        XxlJobHelper.log("区域统计调度程序执行完成!........");
+        equipmentInfo1Service.calEquipmentInfoDay(date);
+
+        equipmentInfo2Service.calEquipmentInfoDay(date);
+
+        equipmentInfo3Service.calEquipmentInfoDay(date);
+
+        equipmentInfo4Service.calEquipmentInfoDay(date);
+
+        equipmentInfo5Service.calEquipmentInfoDay(date);
+
+        XxlJobHelper.log("设备指标调度程序执行完成!........");
 
     }
 

+ 5 - 4
realtime/generationXK-service/src/main/java/com/gyee/generation/util/realtimesource/EdosUtil.java

@@ -1696,15 +1696,16 @@ public class EdosUtil implements IEdosUtil {
                 if (endTs.isPresent())
                     url = url + "&endTs=" + endTs.get();
                 if (interval.isPresent())
-                    url = url + "&interval=" + interval.get();
+                    url = url + "&interval=60" ;
+
 
                 ResponseEntity<JSONArray> resp = restTemplate.getForEntity(url, JSONArray.class);
                 JSONArray jsonArray = resp.getBody();
                 if (jsonArray != null) {
-                    List<PointData> list = JsonObjectHelper.phrasePointData(jsonArray,tagName.get());
-                    List<PointData> resultList = new ArrayList<>();
+                    List<PointData> resultList = JsonObjectHelper.phrasePointData(jsonArray,tagName.get());
+//                    List<PointData> resultList = new ArrayList<>();
 
-                    if(list.isEmpty())
+                    if(resultList.isEmpty())
                     {
 
                         getHistsnapSameTiem(pointid, beginDate, finalInterval, resultList);

+ 6 - 5
realtime/generationXK-service/src/main/resources/application-xk.yml

@@ -9,7 +9,8 @@ spring:
     allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
   #redis集群
   redis:
-    host: 192.168.11.250
+    host: 127.0.0.1
+    #host: 192.168.11.250
     port: 6379
     timeout: 100000
     #    集群环境打开下面注释,单机不需要打开
@@ -33,7 +34,7 @@ spring:
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
     driver-class-name: org.postgresql.Driver
-    url: jdbc:postgresql://192.168.11.248:5432/IMS_NEM_SD
+    url: jdbc:postgresql://192.168.11.248:5432/IMS_NEM_TEST
     username: postgres
     password: postgres
 #    url: jdbc:postgresql://120.46.148.180:5432/postgres
@@ -86,8 +87,8 @@ logging:
     com.example: debug
 #db url
 db:
-#  url: http://127.0.0.1:8011/ts
-  url: http://192.168.11.250:8011/ts
+  url: http://127.0.0.1:8011/ts
+#  url: http://192.168.11.250:8011/ts
 #参与计算的场站
 #runWindpowerstation: SD_GDDL_RZLX_FDC_STA,SD_GDDL_QDJN_FDC_STA,SD_GDDL_WHWD_FDC_STA,SD_GDDL_WHXQ_FDC_STA,SD_GDDL_RZWL_FDC_STA,SD_GDDL_WFZC_FDC_STA,SD_GDDL_DZXJ_FDC_STA,SD_GDDL_XTTA_FDC_STA,SD_GDDL_BH1_FDC_STA,SD_GDDL_BH2_FDC_STA,SD_GDDL_CG_FDC_STA,SD_GDDL_FJ_FDC_STA,SD_GDDL_YS_FDC_STA,SD_GDDL_FXFC_FDC_STA,SD_GDDL_JNSS_FDC_STA,SD_GDDL_WFBH_FDC_STA,SD_GDDL_PLHS_FDC_STA,SD_GDDL_JNCQ_FDC_STA,SD_GDDL_LXLN_FDC_STA,SD_GDDL_LQJS_FDC_STA,SD_GDDL_ZYXD_FDC_STA,SD_GDDL_ZYFS_FDC_STA
 runWindpowerstation: SD_GDDL_RZLX_FDC_STA
@@ -98,7 +99,7 @@ clauStatus:
 #判断数据终端
 second: 1800
 #判断降出力
-AI134: 17.4    #叶轮转速给定
+AI110: 17.4    #叶轮转速给定
 AI178: 17.4    #转矩给定
 #AI443:容量
 

+ 1 - 1
realtime/generationXK-service/src/main/resources/application.yml

@@ -1,6 +1,6 @@
 spring:
   profiles:
     active: dev
-#    active: xk
+#    active: dev
 
 #    active: td