Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

wangchangsheng 2 лет назад
Родитель
Сommit
9f56d0a695
55 измененных файлов с 3591 добавлено и 1051 удалено
  1. 1 1
      common/src/main/java/com/gyee/common/contant/ContantXk.java
  2. 1 0
      common/src/main/java/com/gyee/common/vo/specific/SpecificTarget.java
  3. 74 74
      realtime/generationXK-service/src/main/java/com/gyee/generation/GenerationMain.java
  4. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/config/XxlJobConfig.java
  5. 19 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/vo/CompanyType.java
  6. 18 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/vo/CurveType.java
  7. 17 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/vo/WpType.java
  8. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/ActivePowerService.java
  9. 2 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/CoefficientService.java
  10. 18 6
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo15minuteService.java
  11. 39 12
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo1Service.java
  12. 3 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo4Service.java
  13. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo5Service.java
  14. 5 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/GoodnessOfFitService.java
  15. 7 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/InputOrOutPutService.java
  16. 3 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/LimitService.java
  17. 1732 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/PowerCurveFittingByTimeGfService.java
  18. 43 35
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/PowerCurveFittingByTimeService.java
  19. 0 8
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/ShutdownnewService.java
  20. 57 31
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo1Service.java
  21. 24 22
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo2Service.java
  22. 22 20
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo3Service.java
  23. 22 20
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo4Service.java
  24. 22 20
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo5Service.java
  25. 23 21
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo6Service.java
  26. 5 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindturbineGoodnessService.java
  27. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WpwindDayInfoService.java
  28. 384 370
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WtwindDayInfoService.java
  29. 5 5
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/AccessStatusService.java
  30. 4 3
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/RealtimeService.java
  31. 224 224
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/RegionCalService.java
  32. 95 68
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/RegionCalreService.java
  33. 56 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/SafetyDayService.java
  34. 3 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/StatusService.java
  35. 2 6
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/TheoreticalPowerService.java
  36. 20 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/task/SaticScheduleCALTask.java
  37. 33 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/task/SaticSchedulePgTask.java
  38. 32 19
      realtime/generationXK-service/src/main/resources/application-td.yml
  39. 36 21
      realtime/generationXK-service/src/main/resources/application-jn.yml
  40. 5 5
      realtime/generationXK-service/src/main/resources/xxl-job-executorWP.properties
  41. 108 0
      realtime/generationXK-service/src/test/java/com/gyee/generation/CurveTest.java
  42. 7 3
      realtime/generationXK-service/src/test/java/com/gyee/generation/GenerationTest.java
  43. 6 6
      realtime/meteorologicalcollection/src/main/java/com/gyee/meteorological/config/GeneratorCodeConfig.java
  44. 20 0
      realtime/meteorologicalcollection/src/main/java/com/gyee/meteorological/controller/ProBasicPowerstationController.java
  45. 16 0
      realtime/meteorologicalcollection/src/main/java/com/gyee/meteorological/mapper/auto/ProBasicPowerstationMapper.java
  46. 261 0
      realtime/meteorologicalcollection/src/main/java/com/gyee/meteorological/model/auto/ProBasicPowerstation.java
  47. 16 0
      realtime/meteorologicalcollection/src/main/java/com/gyee/meteorological/service/auto/IProBasicPowerstationService.java
  48. 20 0
      realtime/meteorologicalcollection/src/main/java/com/gyee/meteorological/service/auto/impl/ProBasicPowerstationServiceImpl.java
  49. 13 13
      realtime/meteorologicalcollection/src/main/java/com/gyee/meteorological/service/collection/CollectionService.java
  50. 3 3
      realtime/meteorologicalcollection/src/main/resources/application-test.yml
  51. 4 1
      realtime/meteorologicalcollection/src/test/java/com/gyee/meteorological/MeteorologicalTest.java
  52. 1 1
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/goodness/WindturbinegoodnessController.java
  53. 1 1
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/singleanalysis/SingleAnalysisService.java
  54. 53 13
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/specific/SpecificService.java
  55. 1 1
      web/runeconomy-xk/src/main/resources/application.yml

+ 1 - 1
common/src/main/java/com/gyee/common/contant/ContantXk.java

@@ -5,7 +5,7 @@ package com.gyee.common.contant;
  */
 
 public class ContantXk {
-
+    public static final String  AQTS= "AQTS";//安全天数
     public static final String  CZZT= "CZZT";//场站状态
     public static final String  SBJRZT= "SBJRZT";//场站设备接入状态
     public static final String  DQJRZT= "DQJRZT";//场站电气接入状态

+ 1 - 0
common/src/main/java/com/gyee/common/vo/specific/SpecificTarget.java

@@ -12,4 +12,5 @@ public class SpecificTarget {
     private String wpname;
 //    private Integer year;
     List<SpecificTargetVo> targetList;
+    private Integer orderNum;
 }

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

@@ -59,80 +59,80 @@ public class GenerationMain {
 
 //        Date date =new Date();
 //
-        Calendar c=Calendar.getInstance();
-        c.set(Calendar.MONTH,7);
-        c.set(Calendar.DAY_OF_MONTH,2);
-        Date date =c.getTime();
-
-        for (int i = 0; i < 30; i++) {
-            WindPowerInfo1Service windPowerInfo1Service = SpringUtils.getBean("windPowerInfo1Service");
-
-            windPowerInfo1Service.calLineInfoDay(date);
-            windPowerInfo1Service.calProjectInfoDay(date);
-            windPowerInfo1Service.calWindpowerInfoDay(date);
-            windPowerInfo1Service.calCompanyInfoDay(date);
-            windPowerInfo1Service.calRegionInfoDay(date);
-
-            WindPowerInfo2Service windPowerInfo2Service = SpringUtils.getBean("windPowerInfo2Service");
-            windPowerInfo2Service.calLineInfoDay(date);
-            windPowerInfo2Service.calProjectInfoDay(date);
-            windPowerInfo2Service.calWindpowerInfoDay(date);
-            windPowerInfo2Service.calCompanyInfoDay(date);
-            windPowerInfo2Service.calRegionInfoDay(date);
-
-            WindPowerInfo3Service windPowerInfo3Service = SpringUtils.getBean("windPowerInfo3Service");
-            windPowerInfo3Service.calLineInfoDay(date);
-            windPowerInfo3Service.calProjectInfoDay(date);
-            windPowerInfo3Service.calWindpowerInfoDay(date);
-            windPowerInfo3Service.calCompanyInfoDay(date);
-            windPowerInfo3Service.calRegionInfoDay(date);
-
-            WindPowerInfo4Service windPowerInfo4Service = SpringUtils.getBean("windPowerInfo4Service");
-            windPowerInfo4Service.calLineInfoDay(date);
-            windPowerInfo4Service.calProjectInfoDay(date);
-            windPowerInfo4Service.calWindpowerInfoDay(date);
-            windPowerInfo4Service.calCompanyInfoDay(date);
-            windPowerInfo4Service.calRegionInfoDay(date);
-
-            WindPowerInfo5Service windPowerInfo5Service = SpringUtils.getBean("windPowerInfo5Service");
-            windPowerInfo5Service.calLineInfoDay(date);
-            windPowerInfo5Service.calProjectInfoDay(date);
-            windPowerInfo5Service.calWindpowerInfoDay(date);
-            windPowerInfo5Service.calCompanyInfoDay(date);
-            windPowerInfo5Service.calRegionInfoDay(date);
-
-            WindPowerInfo6Service windPowerInfo6Service = SpringUtils.getBean("windPowerInfo6Service");
-            windPowerInfo6Service.calLineInfoDay(date);
-            windPowerInfo6Service.calProjectInfoDay(date);
-            windPowerInfo6Service.calWindpowerInfoDay(date);
-            windPowerInfo6Service.calCompanyInfoDay(date);
-            windPowerInfo6Service.calRegionInfoDay(date);
-
-
-            EquipmentInfo1Service equipmentInfo1Service = SpringUtils.getBean("equipmentInfo1Service");
-            equipmentInfo1Service.calEquipmentInfoDay(date);
-            EquipmentInfo2Service equipmentInfo2Service = SpringUtils.getBean("equipmentInfo2Service");
-            equipmentInfo2Service.calEquipmentInfoDay(date);
-            EquipmentInfo3Service equipmentInfo3Service = SpringUtils.getBean("equipmentInfo3Service");
-            equipmentInfo3Service.calEquipmentInfoDay(date);
-            EquipmentInfo4Service equipmentInfo4Service = SpringUtils.getBean("equipmentInfo4Service");
-            equipmentInfo4Service.calEquipmentInfoDay(date);
-            EquipmentInfo5Service equipmentInfo5Service = SpringUtils.getBean("equipmentInfo5Service");
-            equipmentInfo5Service.calEquipmentInfoDay(date);
-
-
-            WtAlysisDayService wtAlysisDayService = SpringUtils.getBean("wtAlysisDayService");
-            wtAlysisDayService.calEquipmentInfoDay(date);
-
-            EquipmentInfoDayTopService equipmentInfoDayTopService = SpringUtils.getBean("equipmentInfoDayTopService");
-            equipmentInfoDayTopService.calEquipmentInfoDayTop(date);
-            equipmentInfoDayTopService.calEquipmentInfoMonthTop(date);
-            equipmentInfoDayTopService.calEquipmentInfoYearTop(date);
-            c.add(Calendar.DAY_OF_MONTH, 1);
-            date = c.getTime();
-
-
-        }
+//        Calendar c=Calendar.getInstance();
+//        c.set(Calendar.MONTH,7);
+//        c.set(Calendar.DAY_OF_MONTH,2);
+//        Date date =c.getTime();
+//
+//        for (int i = 0; i < 30; i++) {
+//            WindPowerInfo1Service windPowerInfo1Service = SpringUtils.getBean("windPowerInfo1Service");
+//
+//            windPowerInfo1Service.calLineInfoDay(date);
+//            windPowerInfo1Service.calProjectInfoDay(date);
+//            windPowerInfo1Service.calWindpowerInfoDay(date);
+//            windPowerInfo1Service.calCompanyInfoDay(date);
+//            windPowerInfo1Service.calRegionInfoDay(date);
+//
+//            WindPowerInfo2Service windPowerInfo2Service = SpringUtils.getBean("windPowerInfo2Service");
+//            windPowerInfo2Service.calLineInfoDay(date);
+//            windPowerInfo2Service.calProjectInfoDay(date);
+//            windPowerInfo2Service.calWindpowerInfoDay(date);
+//            windPowerInfo2Service.calCompanyInfoDay(date);
+//            windPowerInfo2Service.calRegionInfoDay(date);
+//
+//            WindPowerInfo3Service windPowerInfo3Service = SpringUtils.getBean("windPowerInfo3Service");
+//            windPowerInfo3Service.calLineInfoDay(date);
+//            windPowerInfo3Service.calProjectInfoDay(date);
+//            windPowerInfo3Service.calWindpowerInfoDay(date);
+//            windPowerInfo3Service.calCompanyInfoDay(date);
+//            windPowerInfo3Service.calRegionInfoDay(date);
+//
+//            WindPowerInfo4Service windPowerInfo4Service = SpringUtils.getBean("windPowerInfo4Service");
+//            windPowerInfo4Service.calLineInfoDay(date);
+//            windPowerInfo4Service.calProjectInfoDay(date);
+//            windPowerInfo4Service.calWindpowerInfoDay(date);
+//            windPowerInfo4Service.calCompanyInfoDay(date);
+//            windPowerInfo4Service.calRegionInfoDay(date);
+//
+//            WindPowerInfo5Service windPowerInfo5Service = SpringUtils.getBean("windPowerInfo5Service");
+//            windPowerInfo5Service.calLineInfoDay(date);
+//            windPowerInfo5Service.calProjectInfoDay(date);
+//            windPowerInfo5Service.calWindpowerInfoDay(date);
+//            windPowerInfo5Service.calCompanyInfoDay(date);
+//            windPowerInfo5Service.calRegionInfoDay(date);
+//
+//            WindPowerInfo6Service windPowerInfo6Service = SpringUtils.getBean("windPowerInfo6Service");
+//            windPowerInfo6Service.calLineInfoDay(date);
+//            windPowerInfo6Service.calProjectInfoDay(date);
+//            windPowerInfo6Service.calWindpowerInfoDay(date);
+//            windPowerInfo6Service.calCompanyInfoDay(date);
+//            windPowerInfo6Service.calRegionInfoDay(date);
+//
+//
+//            EquipmentInfo1Service equipmentInfo1Service = SpringUtils.getBean("equipmentInfo1Service");
+//            equipmentInfo1Service.calEquipmentInfoDay(date);
+//            EquipmentInfo2Service equipmentInfo2Service = SpringUtils.getBean("equipmentInfo2Service");
+//            equipmentInfo2Service.calEquipmentInfoDay(date);
+//            EquipmentInfo3Service equipmentInfo3Service = SpringUtils.getBean("equipmentInfo3Service");
+//            equipmentInfo3Service.calEquipmentInfoDay(date);
+//            EquipmentInfo4Service equipmentInfo4Service = SpringUtils.getBean("equipmentInfo4Service");
+//            equipmentInfo4Service.calEquipmentInfoDay(date);
+//            EquipmentInfo5Service equipmentInfo5Service = SpringUtils.getBean("equipmentInfo5Service");
+//            equipmentInfo5Service.calEquipmentInfoDay(date);
+//
+//
+//            WtAlysisDayService wtAlysisDayService = SpringUtils.getBean("wtAlysisDayService");
+//            wtAlysisDayService.calEquipmentInfoDay(date);
+//
+//            EquipmentInfoDayTopService equipmentInfoDayTopService = SpringUtils.getBean("equipmentInfoDayTopService");
+//            equipmentInfoDayTopService.calEquipmentInfoDayTop(date);
+//            equipmentInfoDayTopService.calEquipmentInfoMonthTop(date);
+//            equipmentInfoDayTopService.calEquipmentInfoYearTop(date);
+//            c.add(Calendar.DAY_OF_MONTH, 1);
+//            date = c.getTime();
+//
+//
+//        }
 
 
 //        Calendar c=Calendar.getInstance();

+ 1 - 1
realtime/generationXK-service/src/main/java/com/gyee/generation/config/XxlJobConfig.java

@@ -19,7 +19,7 @@ import org.springframework.core.env.Environment;
 
 @Configuration
 @PropertySource("classpath:xxl-job-executor.properties")
-//@PropertySource("classpath:xxl-job-executorWP.properties")
+//@PropertySource("classpath:xxl-job-executorWPGD.properties")
 //@PropertySource("classpath:xxl-job-executorRG.properties")
 public class XxlJobConfig implements EnvironmentAware {
     private Environment env;

+ 19 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/model/vo/CompanyType.java

@@ -0,0 +1,19 @@
+package com.gyee.generation.model.vo;
+
+public enum CompanyType {
+
+
+    qb("qb"),
+    fd("fd"),
+    gf("gf");
+
+    public String id;
+    CompanyType(final  String c) {
+        id = c;
+    }
+
+    public String getValue()
+    {
+        return id;
+    }
+}

+ 18 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/model/vo/CurveType.java

@@ -0,0 +1,18 @@
+package com.gyee.generation.model.vo;
+
+public enum CurveType {
+
+    dayCurve("dayCurve"),
+    monthCurve("monthCurve"),
+    yearCurve("yearCurve");
+
+    public String id;
+    CurveType(final  String c) {
+        id = c;
+    }
+
+    public String getValue()
+    {
+        return id;
+    }
+}

+ 17 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/model/vo/WpType.java

@@ -0,0 +1,17 @@
+package com.gyee.generation.model.vo;
+
+public enum WpType {
+
+    FDC("FDC"),
+    GDC("GDC");
+
+    public String id;
+    WpType(final  String c) {
+        id = c;
+    }
+
+    public String getValue()
+    {
+        return id;
+    }
+}

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

@@ -36,11 +36,11 @@ public class ActivePowerService {
         Date endDate=c.getTime();
         for (ProBasicPowerstation station : CacheContext.wpls) {
 
-            QueryWrapper<ProEconInOrOutSpeedTotal> queryWrapper = new QueryWrapper<>();
+            QueryWrapper<ProEconEquipmentInfo15minute> queryWrapper = new QueryWrapper<>();
             queryWrapper.ge("record_date",beginDate)
                     .le("record_date",endDate)
                     .eq("windPowerStation_Id",station.getId());
-            List<ProEconEquipmentInfo15minute> ei15ls = proEconEquipmentInfo15minuteService.list();
+            List<ProEconEquipmentInfo15minute> ei15ls = proEconEquipmentInfo15minuteService.list(queryWrapper);
 //                    .stream()
 //                    .filter(i -> i.getWindpowerstationId().equals(station.getId())
 //                            && ( i.getRecordDate().compareTo(beginDate)==0 || i.getRecordDate().after(beginDate))

+ 2 - 1
realtime/generationXK-service/src/main/java/com/gyee/generation/service/CoefficientService.java

@@ -6,6 +6,7 @@ import com.gyee.common.model.PointData;
 import com.gyee.generation.init.CacheContext;
 import com.gyee.generation.model.auto.*;
 import com.gyee.generation.model.vo.StatData;
+import com.gyee.generation.model.vo.WpType;
 import com.gyee.generation.service.auto.IProEconWtPowerCurveFittingService;
 import com.gyee.generation.util.DateUtils;
 import com.gyee.generation.util.StringUtils;
@@ -220,7 +221,7 @@ public class CoefficientService {
                 if (CacheContext.wtmap.containsKey(windturbineId)) {
                     ProBasicEquipment wt = CacheContext.wtmap.get(windturbineId);
 
-                    if (wt.getWindpowerstationId().contains("GDC")) {
+                    if (wt.getWindpowerstationId().contains(WpType.GDC.id)) {
                         speed /= 100;
                         speed = StringUtils.round(speed, 2);
                         speed *= 100;

+ 18 - 6
realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo15minuteService.java

@@ -35,20 +35,34 @@ public class EquipmentInfo15minuteService {
     /**
      * 计算设备15分钟信息
      */
-    public void calLineInfoMinute15(Date recordDate) throws Exception {
+    public void calEquipmentInfo15minute(Date recordDate) throws Exception {
         Calendar c=Calendar.getInstance();
         c.setTime(recordDate);
 
+       int minute= c.get(Calendar.MINUTE);
+        if(minute>=0 && minute<15){
+            c.set(Calendar.MINUTE,0);
+        }
+        else if(minute>=15 && minute<30)
+        {
+            c.set(Calendar.MINUTE,15);
+        }else if(minute>=30 && minute<45){
+           c.set(Calendar.MINUTE,30);
+       }else if(minute>=45 ){
+           c.set(Calendar.MINUTE,45);
+       }
+       c.set(Calendar.SECOND,0);
         Date end=c.getTime();
         c.add(Calendar.MINUTE,-15);
         Date begin= DateUtils.truncate(c.getTime());
 
         QueryWrapper<ProEconEquipmentInfo15minute> queryWrapper = new QueryWrapper<>();
-        queryWrapper.ge("record_date",DateUtils.truncate(recordDate));
+        queryWrapper.ge("record_date",recordDate);
+
         //判断是否有重复记录,先删除重复记录
         List<String> idls = proEconEquipmentInfo15minuteService.list(queryWrapper)
                .stream()
-//                .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate))==0
+//                .filter(i -> i.getRecordDate().compareTo(recordDate)==0
 //                        && CacheContext.wtmap.containsKey(i.getWindturbineId())
 //           )
                 .map(ProEconEquipmentInfo15minute::getId)
@@ -72,7 +86,7 @@ public class EquipmentInfo15minuteService {
                 pewp.setLineId(wt.getLineId());
                 pewp.setProjectId(wt.getProjectId());
                 pewp.setRegionId(wt.getRegionId());
-                pewp.setRecordDate(DateUtils.truncate(recordDate));
+                pewp.setRecordDate(recordDate);
 
 
 
@@ -336,8 +350,6 @@ public class EquipmentInfo15minuteService {
 
                     }
 
-
-
                 }
 
             }

+ 39 - 12
realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo1Service.java

@@ -8,6 +8,7 @@ import com.gyee.generation.init.CacheContext;
 import com.gyee.generation.model.auto.ProBasicEquipment;
 import com.gyee.generation.model.auto.ProBasicEquipmentPoint;
 import com.gyee.generation.model.auto.ProEconEquipmentInfoDay1;
+import com.gyee.generation.model.vo.WpType;
 import com.gyee.generation.service.auto.IProEconEquipmentInfoDay1Service;
 import com.gyee.generation.util.DateUtils;
 import com.gyee.generation.util.realtimesource.IEdosUtil;
@@ -96,24 +97,50 @@ public class EquipmentInfo1Service {
     }
 
     private void extracted(Date recordDate, Date end, Date begin,Map<String, ProBasicEquipmentPoint> pointmap, ProEconEquipmentInfoDay1 pewp,List<ProEconEquipmentInfoDay1> pepid1ls) throws Exception {
-        //*******************************************日信息统计*********************************************************/
-        if(pointmap.containsKey(ContantXk.RPJFS))
+
+
+        if(pewp.getWindpowerstationId().contains(WpType.FDC.id))
         {
-            ProBasicEquipmentPoint point= pointmap.get(ContantXk.RPJFS);
-            List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(), begin.getTime()/1000, end.getTime()/1000);
-            if(!pointls.isEmpty())
+            //*******************************************日信息统计*********************************************************/
+            if(pointmap.containsKey(ContantXk.RPJFS))
             {
-                DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(PointData::getPointValueInDouble).summaryStatistics();
-                //日最大风速
-                pewp.setRzdfs(summaryStatistics.getMax());
-                //日最小风速
-                pewp.setRzxfs(summaryStatistics.getMin());
-                //日平均风速
-                pewp.setRpjfs(summaryStatistics.getAverage());
+                ProBasicEquipmentPoint point= pointmap.get(ContantXk.RPJFS);
+                List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(), begin.getTime()/1000, end.getTime()/1000);
+                if(!pointls.isEmpty())
+                {
+                    DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(PointData::getPointValueInDouble).summaryStatistics();
+                    //日最大风速
+                    pewp.setRzdfs(summaryStatistics.getMax());
+                    //日最小风速
+                    pewp.setRzxfs(summaryStatistics.getMin());
+                    //日平均风速
+                    pewp.setRpjfs(summaryStatistics.getAverage());
+                }
+
             }
+        }else
+        {
+            //*******************************************日信息统计*********************************************************/
+            if(pointmap.containsKey(ContantXk.RPJGZD))
+            {
+                ProBasicEquipmentPoint point= pointmap.get(ContantXk.RPJGZD);
+                List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(), begin.getTime()/1000, end.getTime()/1000);
+                if(!pointls.isEmpty())
+                {
+                    DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(PointData::getPointValueInDouble).summaryStatistics();
+                    //日最大风速
+                    pewp.setRzdfs(summaryStatistics.getMax());
+                    //日最小风速
+                    pewp.setRzxfs(summaryStatistics.getMin());
+                    //日平均风速
+                    pewp.setRpjfs(summaryStatistics.getAverage());
+                }
 
+            }
         }
 
+
+
         if(pointmap.containsKey(ContantXk.RPJGL))
         {
             ProBasicEquipmentPoint point= pointmap.get(ContantXk.RPJGL);

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

@@ -71,6 +71,8 @@ public class EquipmentInfo4Service {
 
         Date begin = DateUtils.truncate(c.getTime());
 
+        Date lastDay=DateUtils.addDays(begin,-1);
+
         //判断是否有重复记录,先删除重复记录
         QueryWrapper<ProEconEquipmentInfoDay4> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("record_date",begin);
@@ -103,7 +105,7 @@ public class EquipmentInfo4Service {
         Map<String,ProEconWindturbineGoodness> wgmap=new HashMap<>();
 
         QueryWrapper<ProEconWindturbineGoodness> queryWrapper3 = new QueryWrapper<>();
-        queryWrapper3.eq("record_date",DateUtils.truncate(begin));
+        queryWrapper3.eq("record_date",lastDay);
 
         List<ProEconWindturbineGoodness> wgls = proEconWindturbineGoodnessService.list(queryWrapper3);
 //                .stream()

+ 1 - 1
realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo5Service.java

@@ -48,7 +48,7 @@ public class EquipmentInfo5Service {
                 .isNotNull("stop_Type_Id").isNotNull("stop_Hours").ne("stop_Type_Id","wh");
         List<ProEconShutdownEvent2> shutdownevents = proEconShutdownEvent2Service.list(queryWrapper);
 //                .stream().filter(i ->
-//                i.getWinpowerstationId().contains("FDC")
+//                i.getWinpowerstationId().contains(WpType.FDC.id)
 //                        && (i.getStopTime().compareTo(currentDate) == 0 || i.getStopTime().after(currentDate))
 //                        && (i.getStopTime().compareTo(endDate) == 0 || i.getStopTime().before(endDate))
 //                        && i.getStopTypeId() != null && i.getStopHours() != null

+ 5 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/GoodnessOfFitService.java

@@ -10,6 +10,7 @@ import com.gyee.generation.model.auto.ProBasicEquipmentPoint;
 import com.gyee.generation.model.auto.ProEconWtCurveFittingMonth;
 import com.gyee.generation.model.vo.FitClassVo;
 import com.gyee.generation.model.vo.StatData;
+import com.gyee.generation.model.vo.WpType;
 import com.gyee.generation.service.auto.IProEconWtCurveFittingMonthService;
 import com.gyee.generation.util.DateUtils;
 import com.gyee.generation.util.StringUtils;
@@ -30,8 +31,10 @@ public class GoodnessOfFitService {
         private IProEconWtCurveFittingMonthService proEconWtCurveFittingMonthService;
 
     public Map<String,Map<String,Double>> goodnessOfFit(String wtId,Date nowDate) throws Exception {
+
+        Date endDate =DateUtils.truncate(nowDate);
         Date startDate = DateUtils.addDays(nowDate,-1);
-        Date endDate =new Date();
+
 
 
         Calendar c= Calendar.getInstance();
@@ -221,7 +224,7 @@ public class GoodnessOfFitService {
         for (FitClassVo item : fitsY)
         {
             Double speed;
-            if (windpowerstationId.contains("GDC"))
+            if (windpowerstationId.contains(WpType.GDC.id))
             {
                 speed = item.getSpeed();
                 speed /= 100;

+ 7 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/InputOrOutPutService.java

@@ -5,6 +5,7 @@ import com.gyee.common.contant.ContantXk;
 import com.gyee.common.model.PointData;
 import com.gyee.generation.init.CacheContext;
 import com.gyee.generation.model.auto.*;
+import com.gyee.generation.model.vo.WpType;
 import com.gyee.generation.service.auto.IProEconInOrOutSpeedTotal2Service;
 import com.gyee.generation.service.auto.IProEconInOrOutSpeedTotalService;
 import com.gyee.generation.service.auto.IProEconInputOrOutputSpeedService;
@@ -47,6 +48,10 @@ public class InputOrOutPutService {
         Date end = recordDate;
         for(ProBasicEquipment wt:CacheContext.wtls)
         {
+            if(wt.getWindpowerstationId().contains(WpType.GDC.id))
+            {
+                continue;
+            }
 
             Map<String, ProBasicEquipmentPoint> pointmap= CacheContext.wtpAimap.get(wt.getNemCode());
 
@@ -215,7 +220,7 @@ public class InputOrOutPutService {
                     total1.setRecordDate(daybegin);
                     total1.setCompanyId(wt.getCompanyId());
                     total1.setRegionId(wt.getRegionId());
-                    if(wt.getWindpowerstationId().contains("FDC"))
+                    if(wt.getWindpowerstationId().contains(WpType.FDC.id))
                     {
                         total1.setTypes("-1");
                     }else
@@ -230,7 +235,7 @@ public class InputOrOutPutService {
                     total2.setRecordDate(daybegin);
                     total2.setRegionId(wt.getRegionId());
                     total2.setCompanyId(wt.getCompanyId());
-                    if(wt.getWindpowerstationId().contains("FDC"))
+                    if(wt.getWindpowerstationId().contains(WpType.FDC.id))
                     {
                         total2.setTypes("-1");
                     }else

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

@@ -7,6 +7,7 @@ import com.gyee.generation.model.auto.ProBasicEquipment;
 import com.gyee.generation.model.auto.ProBasicEquipmentPoint;
 import com.gyee.generation.model.auto.ProBasicPowerstationPoint;
 import com.gyee.generation.model.vo.StatData;
+import com.gyee.generation.model.vo.WpType;
 import com.gyee.generation.util.DateUtils;
 import com.gyee.generation.util.StringUtils;
 import com.gyee.generation.util.realtimesource.IEdosUtil;
@@ -63,7 +64,7 @@ public  class LimitService {
             Map<String,Map<String, ProBasicPowerstationPoint>> wppointmap =CacheContext.wppointmap;
             CacheContext.wpls.forEach(wp->{
             Map<String, ProBasicPowerstationPoint> wppMap = wppointmap.get(wp.getId());
-            if(wp.getId().contains("FDC"))
+            if(wp.getId().contains(WpType.FDC.id))
             {
                 if(wppMap.containsKey(ContantXk.TPOINT_WP_AGC))
                 {
@@ -115,7 +116,7 @@ public  class LimitService {
                 //风机转速限值1.5MV && 有功控制给定值2MV
 
             wtls.stream().forEach(wt->{
-                if(wt.getWindpowerstationId().contains("FDC"))
+                if(wt.getWindpowerstationId().contains(WpType.FDC.id))
                 {
                     Map<String, ProBasicEquipmentPoint> windturbinetestingpointnewMap = wtpAimap.get(wt.getId());
                     if(windturbinetestingpointnewMap.containsKey(ContantXk.XDZT))

Разница между файлами не показана из-за своего большого размера
+ 1732 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/PowerCurveFittingByTimeGfService.java


+ 43 - 35
realtime/generationXK-service/src/main/java/com/gyee/generation/service/PowerCurveFittingByTimeService.java

@@ -1,22 +1,23 @@
 package com.gyee.generation.service;
 
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.gyee.common.contant.ContantXk;
 import com.gyee.common.model.PointData;
 import com.gyee.generation.init.CacheContext;
 import com.gyee.generation.model.auto.*;
-import com.gyee.generation.model.vo.CureFittingVo;
-import com.gyee.generation.model.vo.PointVo;
-import com.gyee.generation.model.vo.PointfVo;
+import com.gyee.generation.model.vo.*;
 import com.gyee.generation.service.auto.*;
 import com.gyee.generation.util.DateUtils;
 import com.gyee.generation.util.StringUtils;
 import com.gyee.generation.util.realtimesource.IEdosUtil;
 import com.gyee.generation.util.realtimesource.math.LineUtil;
+import com.gyee.generation.util.redis.RedisService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
+
 import javax.annotation.Resource;
 import java.util.*;
 import java.util.stream.Collectors;
@@ -36,6 +37,9 @@ public class PowerCurveFittingByTimeService {
     private String initialcode;
     public Map<String, Double> windturbineCapacity;
 
+
+    @Resource
+    private RedisService redisService;
     @Resource
     private IProEconWtCurveFittingMonthService proEconWtCurveFittingMonthService;
 
@@ -90,33 +94,31 @@ public class PowerCurveFittingByTimeService {
         for (ProBasicEquipment wt : CacheContext.wtls) {
             String windturbineId = wt.getId();
 
+            if(wt.getWindpowerstationId().contains(WpType.GDC.id))
+            {
+                continue;
+            }
+
 
             Map<String, ProBasicEquipmentPoint> windturbinetestingpointnewMap = CacheContext.wtpAimap.get(wt.getId());
             //设备有功功率
-            String pointIdGL = windturbinetestingpointnewMap.get(ContantXk.CJ_SSGL).getNemCode();
+            String pointIdGL = null;
             //设备明细状态
-            String pointIdZT = windturbinetestingpointnewMap.get(ContantXk.MXZT).getNemCode();
-
-            String pointIdFS;
-            if (wt.getWindpowerstationId().contains("GDC")) {   //测风塔70米风速
-
-                if (windturbinetestingpointnewMap.containsKey(ContantXk.FCCFTFS70)) {
-                    ProBasicEquipmentPoint point = windturbinetestingpointnewMap.get(ContantXk.FCCFTFS70);
-
-                    if (StringUtils.notEmp(point.getNemCode()) && !point.getNemCode().equals(initialcode)) {
-                        pointIdFS = windturbinetestingpointnewMap.get(ContantXk.FCCFTFS70).getNemCode();
-                    } else {
-                        pointIdFS = windturbinetestingpointnewMap.get(ContantXk.CJ_SSFS).getNemCode();
-                    }
-                } else {
-                    pointIdFS = windturbinetestingpointnewMap.get(ContantXk.CJ_SSFS).getNemCode();
-                }
+            String pointIdZT =  null;
 
+            String pointIdFS = null;
+            if (windturbinetestingpointnewMap.containsKey(ContantXk.CJ_SSFS)) {
 
-            } else {   //设备风速
                 pointIdFS = windturbinetestingpointnewMap.get(ContantXk.CJ_SSFS).getNemCode();
             }
+            if (windturbinetestingpointnewMap.containsKey(ContantXk.CJ_SSGL)) {
 
+                pointIdGL = windturbinetestingpointnewMap.get(ContantXk.CJ_SSGL).getNemCode();
+            }
+            if (windturbinetestingpointnewMap.containsKey(ContantXk.MXZT)) {
+
+                pointIdZT = windturbinetestingpointnewMap.get(ContantXk.MXZT).getNemCode();
+            }
 
             CureFittingVo item = new CureFittingVo();
 
@@ -345,7 +347,7 @@ public class PowerCurveFittingByTimeService {
             String pointIdZT = windturbinetestingpointnewMap.get(ContantXk.MXZT).getNemCode();
 
             String pointIdFS;
-            if (wt.getWindpowerstationId().contains("GDC")) {   //测风塔70米风速
+            if (wt.getWindpowerstationId().contains(WpType.GDC.id)) {   //测风塔70米风速
 
                 if (windturbinetestingpointnewMap.containsKey(ContantXk.FCCFTFS70)) {
                     ProBasicEquipmentPoint point = windturbinetestingpointnewMap.get(ContantXk.FCCFTFS70);
@@ -599,7 +601,7 @@ public class PowerCurveFittingByTimeService {
             String pointIdZT = windturbinetestingpointnewMap.get(ContantXk.MXZT).getNemCode();
 
             String pointIdFS;
-            if (wt.getWindpowerstationId().contains("GDC")) {   //测风塔70米风速
+            if (wt.getWindpowerstationId().contains(WpType.GDC.id)) {   //测风塔70米风速
 
                 if (windturbinetestingpointnewMap.containsKey(ContantXk.FCCFTFS70)) {
                     ProBasicEquipmentPoint point = windturbinetestingpointnewMap.get(ContantXk.FCCFTFS70);
@@ -879,9 +881,9 @@ public class PowerCurveFittingByTimeService {
         String speedStr = String.valueOf(speed);
 
         //*********************************************当月曲线偏差子表记录**********************************************************/
-        QueryWrapper<ProEconCurveFittingSub> queryWrapper2 = new QueryWrapper<>();
+        QueryWrapper<ProEconCurveFittMonthSub> queryWrapper2 = new QueryWrapper<>();
         queryWrapper2.eq("year",stringyear).eq("month",stringmonth).eq("speed",speedStr).eq("windturbine_id",key);
-        Optional<ProEconCurveFittMonthSub> cfmsmontho = proEconCurveFittMonthSubService.list().stream()
+        Optional<ProEconCurveFittMonthSub> cfmsmontho = proEconCurveFittMonthSubService.list(queryWrapper2).stream()
 //                .filter(i -> i.getWindturbineId().equals(key)
 //                && i.getYear().equals(stringyear) && i.getMonth().equals(stringmonth) && i.getSpeed().equals(speedStr))
                 .findFirst();
@@ -990,7 +992,7 @@ public class PowerCurveFittingByTimeService {
 
                 if (CacheContext.wtmap.containsKey(windturbineId)) {
                     ProBasicEquipment wt = CacheContext.wtmap.get(windturbineId);
-                    if (wt.getWindpowerstationId().contains("GDC")) {
+                    if (wt.getWindpowerstationId().contains(WpType.GDC.id)) {
                         continue;
                         // item.SPEED = Double.Truncate(pointsF2[i].X);
                     } else {
@@ -1022,7 +1024,7 @@ public class PowerCurveFittingByTimeService {
 
                 if (CacheContext.wtmap.containsKey(windturbineId)) {
                     ProBasicEquipment wt = CacheContext.wtmap.get(windturbineId);
-                    if (wt.getWindpowerstationId().contains("GDC")) {
+                    if (wt.getWindpowerstationId().contains(WpType.GDC.id)) {
                         continue;
                         //item.SPEED = Double.Truncate(pointsF2[i].X);
                     } else {
@@ -1053,6 +1055,8 @@ public class PowerCurveFittingByTimeService {
             //*********************************************当日曲线偏差记录**********************************************************/
         }
         proEconWtCurveFittingService.saveBatch(wtcfls);
+        String s = JSONObject.toJSONString(wtcfls);
+        redisService.set(CurveType.dayCurve.id+"_"+windturbineId, s);
 
     }
 
@@ -1075,7 +1079,7 @@ public class PowerCurveFittingByTimeService {
                 item.setWindturbineId(windturbineId);
                 if (CacheContext.wtmap.containsKey(windturbineId)) {
                     ProBasicEquipment wt = CacheContext.wtmap.get(windturbineId);
-                    if (wt.getWindpowerstationId().contains("GDC")) {
+                    if (wt.getWindpowerstationId().contains(WpType.GDC.id)) {
                         continue;
                         // item.SPEED = Double.Truncate(pointsF1[i].X);
                     } else {
@@ -1101,7 +1105,7 @@ public class PowerCurveFittingByTimeService {
                 if (CacheContext.wtmap.containsKey(windturbineId)) {
 
                     ProBasicEquipment wt = CacheContext.wtmap.get(windturbineId);
-                    if (wt.getWindpowerstationId().contains("GDC")) {
+                    if (wt.getWindpowerstationId().contains(WpType.GDC.id)) {
                         continue;
                         //item.SPEED = Double.Truncate(pointsF1[i].X);
                     } else {
@@ -1130,6 +1134,8 @@ public class PowerCurveFittingByTimeService {
         //*********************************************当月曲线偏差记录**********************************************************/
 
         proEconWtCurveFittingMonthService.saveBatch(wtcfls);
+        String s = JSONObject.toJSONString(wtcfls);
+        redisService.set(CurveType.monthCurve.id+"_"+windturbineId, s);
     }
 
     private void insertPoints(String year,  List<PointVo> sjglls, List<PointVo> zyglls, String windturbineId) {
@@ -1148,7 +1154,7 @@ public class PowerCurveFittingByTimeService {
                 item.setWindturbineId(windturbineId);
                 if (CacheContext.wtmap.containsKey(windturbineId)) {
                     ProBasicEquipment wt = CacheContext.wtmap.get(windturbineId);
-                    if (wt.getWindpowerstationId().contains("GDC")) {
+                    if (wt.getWindpowerstationId().contains(WpType.GDC.id)) {
                         continue;
                         // item.SPEED = Double.Truncate(pointsF1[i].X);
                     } else {
@@ -1173,7 +1179,7 @@ public class PowerCurveFittingByTimeService {
                 if (CacheContext.wtmap.containsKey(windturbineId)) {
 
                     ProBasicEquipment wt = CacheContext.wtmap.get(windturbineId);
-                    if (wt.getWindpowerstationId().contains("GDC")) {
+                    if (wt.getWindpowerstationId().contains(WpType.GDC.id)) {
                         continue;
                         //item.SPEED = Double.Truncate(pointsF1[i].X);
                     } else {
@@ -1201,6 +1207,8 @@ public class PowerCurveFittingByTimeService {
         //*********************************************当年曲线偏差记录**********************************************************/
 
         proEconWtCurveFittingYearService.saveBatch(wtcfls);
+        String s = JSONObject.toJSONString(wtcfls);
+        redisService.set(CurveType.yearCurve.id+"_"+windturbineId, s);
     }
     private void insertPoints2(List<PointVo> monthSjglls, List<PointVo> monthZyglls, String windturbineId) {
 
@@ -1226,7 +1234,7 @@ public class PowerCurveFittingByTimeService {
                 if (CacheContext.wtmap.containsKey(windturbineId)) {
 
                     ProBasicEquipment wt = CacheContext.wtmap.get(windturbineId);
-                    if (wt.getWindpowerstationId().contains("GDC")) {
+                    if (wt.getWindpowerstationId().contains(WpType.GDC.id)) {
                         continue;
                         // item.SPEED = Double.Truncate(pointsF1[i].X);
                     } else {
@@ -1258,7 +1266,7 @@ public class PowerCurveFittingByTimeService {
                 if (CacheContext.wtmap.containsKey(windturbineId)) {
 
                     ProBasicEquipment wt = CacheContext.wtmap.get(windturbineId);
-                    if (wt.getWindpowerstationId().contains("GDC")) {
+                    if (wt.getWindpowerstationId().contains(WpType.GDC.id)) {
                         continue;
                         //item.SPEED = Double.Truncate(pointsF1[i].X);
                     } else {
@@ -1549,7 +1557,7 @@ public class PowerCurveFittingByTimeService {
                         if (CacheContext.wtmap.containsKey(windturbineId)) {
 
                             ProBasicEquipment wt = CacheContext.wtmap.get(windturbineId);
-                            if (wt.getWindpowerstationId().contains("GDC")) {
+                            if (wt.getWindpowerstationId().contains(WpType.GDC.id)) {
                                 b = (x >= 0 && y > 0);
                             } else {
                                 if (z == 2) {
@@ -1605,7 +1613,7 @@ public class PowerCurveFittingByTimeService {
                         if (CacheContext.wtmap.containsKey(windturbineId)) {
 
                             ProBasicEquipment wt = CacheContext.wtmap.get(windturbineId);
-                            if (wt.getWindpowerstationId().contains("GDC")) {
+                            if (wt.getWindpowerstationId().contains(WpType.GDC.id)) {
                                 b = (x >= 0 && y > 0);
                             } else {
                                 if (z == 2) {

+ 0 - 8
realtime/generationXK-service/src/main/java/com/gyee/generation/service/ShutdownnewService.java

@@ -586,8 +586,6 @@ public class ShutdownnewService {
     }
 
 
-
-
     private  String newMethod( String windturbineId, Date begin, Date end)
     {
         String result = "";
@@ -665,21 +663,16 @@ public class ShutdownnewService {
                 }
             }
 
-
-
-
             //日故障损失电量
             if(wtpointmap.containsKey(ContantXk.NGZSSDL) )
             {
 
                 double endvalue;
 
-
                 List<String> pointid=new ArrayList<>();
                 pointid.add(wtpointmap.get(ContantXk.NGZSSDL).getNemCode());
                 List<PointData> xdend=edosUtil.getHistMatrix(pointid,startDate.getTime()/1000);
 
-
                 if(xdend.size()==1)
                 {
 
@@ -691,7 +684,6 @@ public class ShutdownnewService {
                 }
             }
 
-
         }
 
         return result;

+ 57 - 31
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo1Service.java

@@ -6,7 +6,9 @@ import com.gyee.common.model.PointData;
 import com.gyee.common.model.StringUtils;
 import com.gyee.generation.init.CacheContext;
 import com.gyee.generation.model.auto.*;
+import com.gyee.generation.model.vo.CompanyType;
 import com.gyee.generation.model.vo.Location;
+import com.gyee.generation.model.vo.WpType;
 import com.gyee.generation.service.auto.IProEconPowerstationInfoDay1Service;
 import com.gyee.generation.util.DateUtils;
 import com.gyee.generation.util.realtimesource.IEdosUtil;
@@ -50,9 +52,9 @@ public class WindPowerInfo1Service {
 
                 if (rgmap.containsKey(wpinfo.getRegionId())) {
                     Map<String, List<ProEconPowerstationInfoDay1>> map = rgmap.get(wpinfo.getRegionId());
-                    List<ProEconPowerstationInfoDay1> qbls = map.get("qb");
-                    List<ProEconPowerstationInfoDay1> fdls = map.get("fd");
-                    List<ProEconPowerstationInfoDay1> gfls = map.get("gf");
+                    List<ProEconPowerstationInfoDay1> qbls = map.get(CompanyType.qb.id);
+                    List<ProEconPowerstationInfoDay1> fdls = map.get(CompanyType.fd.id);
+                    List<ProEconPowerstationInfoDay1> gfls = map.get(CompanyType.gf.id);
 
                     if (wpinfo.getForeignKeyId().contains("-1")) {
                         fdls.add(wpinfo);
@@ -77,9 +79,9 @@ public class WindPowerInfo1Service {
                         qbls.add(wpinfo);
                     }
 
-                    map.put("qb", qbls);
-                    map.put("fd", fdls);
-                    map.put("gf", gfls);
+                    map.put(CompanyType.qb.id, qbls);
+                    map.put(CompanyType.fd.id, fdls);
+                    map.put(CompanyType.gf.id, gfls);
                     rgmap.put(wpinfo.getRegionId(), map);
                 }
             }
@@ -103,9 +105,9 @@ public class WindPowerInfo1Service {
             }
             for (Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay1>>> entry : rgmap.entrySet()) {
                 Map<String, List<ProEconPowerstationInfoDay1>> map = entry.getValue();
-                List<ProEconPowerstationInfoDay1> qbls = map.get("qb");
-                List<ProEconPowerstationInfoDay1> fdls = map.get("fd");
-                List<ProEconPowerstationInfoDay1> gfls = map.get("gf");
+                List<ProEconPowerstationInfoDay1> qbls = map.get(CompanyType.qb.id);
+                List<ProEconPowerstationInfoDay1> fdls = map.get(CompanyType.fd.id);
+                List<ProEconPowerstationInfoDay1> gfls = map.get(CompanyType.gf.id);
 //                if(CacheContext.cpwpmap.size()==qbls.size())
 //                {
 
@@ -182,11 +184,11 @@ public class WindPowerInfo1Service {
 
                 if (cpmap.containsKey(wpinfo.getCompanyId())) {
                     Map<String, List<ProEconPowerstationInfoDay1>> map = cpmap.get(wpinfo.getCompanyId());
-                    List<ProEconPowerstationInfoDay1> qbls = map.get("qb");
-                    List<ProEconPowerstationInfoDay1> fdls = map.get("fd");
-                    List<ProEconPowerstationInfoDay1> gfls = map.get("gf");
+                    List<ProEconPowerstationInfoDay1> qbls = map.get(CompanyType.qb.id);
+                    List<ProEconPowerstationInfoDay1> fdls = map.get(CompanyType.fd.id);
+                    List<ProEconPowerstationInfoDay1> gfls = map.get(CompanyType.gf.id);
 
-                    if (wpinfo.getWindpowerstationId().contains("FDC")) {
+                    if (wpinfo.getWindpowerstationId().contains(WpType.FDC.id)) {
                         fdls.add(wpinfo);
                     } else {
                         gfls.add(wpinfo);
@@ -199,15 +201,15 @@ public class WindPowerInfo1Service {
                     List<ProEconPowerstationInfoDay1> gfls = new ArrayList<>();
                     List<ProEconPowerstationInfoDay1> fdls = new ArrayList<>();
 
-                    if (wpinfo.getWindpowerstationId().contains("FDC")) {
+                    if (wpinfo.getWindpowerstationId().contains(WpType.FDC.id)) {
                         fdls.add(wpinfo);
                     } else {
                         gfls.add(wpinfo);
                     }
                     qbls.add(wpinfo);
-                    map.put("qb", qbls);
-                    map.put("fd", fdls);
-                    map.put("gf", gfls);
+                    map.put(CompanyType.qb.id, qbls);
+                    map.put(CompanyType.fd.id, fdls);
+                    map.put(CompanyType.gf.id, gfls);
                     cpmap.put(wpinfo.getCompanyId(), map);
                 }
             }
@@ -229,9 +231,9 @@ public class WindPowerInfo1Service {
             }
             for (Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay1>>> entry : cpmap.entrySet()) {
                 Map<String, List<ProEconPowerstationInfoDay1>> map = entry.getValue();
-                List<ProEconPowerstationInfoDay1> qbls = map.get("qb");
-                List<ProEconPowerstationInfoDay1> fdls = map.get("fd");
-                List<ProEconPowerstationInfoDay1> gfls = map.get("gf");
+                List<ProEconPowerstationInfoDay1> qbls = map.get(CompanyType.qb.id);
+                List<ProEconPowerstationInfoDay1> fdls = map.get(CompanyType.fd.id);
+                List<ProEconPowerstationInfoDay1> gfls = map.get(CompanyType.gf.id);
 //                if(CacheContext.cpwpmap.size()==qbls.size())
 //                {
 
@@ -784,22 +786,46 @@ public class WindPowerInfo1Service {
     }
 
     private void extracted(Date recordDate, Date end, Date begin, Map<String, ProBasicPowerstationPoint> pointmap, ProEconPowerstationInfoDay1 pewp, List<ProEconPowerstationInfoDay1> pepid1ls) throws Exception {
+
+
         //*******************************************日信息统计*********************************************************/
-        if (pointmap.containsKey(ContantXk.RPJFS)) {
-            ProBasicPowerstationPoint point = pointmap.get(ContantXk.RPJFS);
-            List<PointData> pointls = edosUtil.getHistoryDatasSnap(point.getNemCode(), begin.getTime() / 1000, end.getTime() / 1000);
-            if (!pointls.isEmpty()) {
-                DoubleSummaryStatistics summaryStatistics = pointls.stream().mapToDouble(PointData::getPointValueInDouble).summaryStatistics();
-                //日最大风速
-                pewp.setRzdfs(summaryStatistics.getMax());
-                //日最小风速
-                pewp.setRzxfs(summaryStatistics.getMin());
-                //日平均风速
-                pewp.setRpjfs(summaryStatistics.getAverage());
+
+        if(pewp.getWindpowerstationId().contains(WpType.FDC.id))
+        {
+            if (pointmap.containsKey(ContantXk.RPJFS)) {
+                ProBasicPowerstationPoint point = pointmap.get(ContantXk.RPJFS);
+                List<PointData> pointls = edosUtil.getHistoryDatasSnap(point.getNemCode(), begin.getTime() / 1000, end.getTime() / 1000);
+                if (!pointls.isEmpty()) {
+                    DoubleSummaryStatistics summaryStatistics = pointls.stream().mapToDouble(PointData::getPointValueInDouble).summaryStatistics();
+                    //日最大风速
+                    pewp.setRzdfs(summaryStatistics.getMax());
+                    //日最小风速
+                    pewp.setRzxfs(summaryStatistics.getMin());
+                    //日平均风速
+                    pewp.setRpjfs(summaryStatistics.getAverage());
+                }
+
             }
+        }else{
+
+            if (pointmap.containsKey(ContantXk.RPJGZD)) {
+                ProBasicPowerstationPoint point = pointmap.get(ContantXk.RPJGZD);
+                List<PointData> pointls = edosUtil.getHistoryDatasSnap(point.getNemCode(), begin.getTime() / 1000, end.getTime() / 1000);
+                if (!pointls.isEmpty()) {
+                    DoubleSummaryStatistics summaryStatistics = pointls.stream().mapToDouble(PointData::getPointValueInDouble).summaryStatistics();
+                    //日最大风速
+                    pewp.setRzdfs(summaryStatistics.getMax());
+                    //日最小风速
+                    pewp.setRzxfs(summaryStatistics.getMin());
+                    //日平均风速
+                    pewp.setRpjfs(summaryStatistics.getAverage());
+                }
 
+            }
         }
 
+
+
         if (pointmap.containsKey(ContantXk.RPJGL)) {
             ProBasicPowerstationPoint point = pointmap.get(ContantXk.RPJGL);
             List<PointData> pointls = edosUtil.getHistoryDatasSnap(point.getNemCode(), begin.getTime() / 1000, end.getTime() / 1000);

+ 24 - 22
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo2Service.java

@@ -6,7 +6,9 @@ import com.gyee.common.model.PointData;
 import com.gyee.common.model.StringUtils;
 import com.gyee.generation.init.CacheContext;
 import com.gyee.generation.model.auto.*;
+import com.gyee.generation.model.vo.CompanyType;
 import com.gyee.generation.model.vo.Location;
+import com.gyee.generation.model.vo.WpType;
 import com.gyee.generation.service.auto.IProEconPowerstationInfoDay2Service;
 import com.gyee.generation.util.DateUtils;
 import com.gyee.generation.util.realtimesource.IEdosUtil;
@@ -52,9 +54,9 @@ public class WindPowerInfo2Service {
 
                 if (rgmap.containsKey(wpinfo.getRegionId())) {
                     Map<String, List<ProEconPowerstationInfoDay2>> map = rgmap.get(wpinfo.getRegionId());
-                    List<ProEconPowerstationInfoDay2> qbls = map.get("qb");
-                    List<ProEconPowerstationInfoDay2> fdls = map.get("fd");
-                    List<ProEconPowerstationInfoDay2> gfls = map.get("gf");
+                    List<ProEconPowerstationInfoDay2> qbls = map.get(CompanyType.qb.id);
+                    List<ProEconPowerstationInfoDay2> fdls = map.get(CompanyType.fd.id);
+                    List<ProEconPowerstationInfoDay2> gfls = map.get(CompanyType.gf.id);
 
                     if (wpinfo.getForeignKeyId().contains("-1")) {
                         fdls.add(wpinfo);
@@ -77,9 +79,9 @@ public class WindPowerInfo2Service {
                     } else if (wpinfo.getForeignKeyId().contains("0")) {
                         qbls.add(wpinfo);
                     }
-                    map.put("qb", qbls);
-                    map.put("fd", fdls);
-                    map.put("gf", gfls);
+                    map.put(CompanyType.qb.id, qbls);
+                    map.put(CompanyType.fd.id, fdls);
+                    map.put(CompanyType.gf.id, gfls);
                     rgmap.put(wpinfo.getRegionId(), map);
                 }
             }
@@ -102,9 +104,9 @@ public class WindPowerInfo2Service {
             }
             for (Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay2>>> entry : rgmap.entrySet()) {
                 Map<String, List<ProEconPowerstationInfoDay2>> map = entry.getValue();
-                List<ProEconPowerstationInfoDay2> qbls = map.get("qb");
-                List<ProEconPowerstationInfoDay2> fdls = map.get("fd");
-                List<ProEconPowerstationInfoDay2> gfls = map.get("gf");
+                List<ProEconPowerstationInfoDay2> qbls = map.get(CompanyType.qb.id);
+                List<ProEconPowerstationInfoDay2> fdls = map.get(CompanyType.fd.id);
+                List<ProEconPowerstationInfoDay2> gfls = map.get(CompanyType.gf.id);
 //                if(CacheContext.cpwpmap.size()==qbls.size())
 //                {
 
@@ -181,11 +183,11 @@ public class WindPowerInfo2Service {
 
                 if (cpmap.containsKey(wpinfo.getCompanyId())) {
                     Map<String, List<ProEconPowerstationInfoDay2>> map = cpmap.get(wpinfo.getCompanyId());
-                    List<ProEconPowerstationInfoDay2> qbls = map.get("qb");
-                    List<ProEconPowerstationInfoDay2> fdls = map.get("fd");
-                    List<ProEconPowerstationInfoDay2> gfls = map.get("gf");
+                    List<ProEconPowerstationInfoDay2> qbls = map.get(CompanyType.qb.id);
+                    List<ProEconPowerstationInfoDay2> fdls = map.get(CompanyType.fd.id);
+                    List<ProEconPowerstationInfoDay2> gfls = map.get(CompanyType.gf.id);
 
-                    if (wpinfo.getWindpowerstationId().contains("FDC")) {
+                    if (wpinfo.getWindpowerstationId().contains(WpType.FDC.id)) {
                         fdls.add(wpinfo);
                     } else {
                         gfls.add(wpinfo);
@@ -198,15 +200,15 @@ public class WindPowerInfo2Service {
                     List<ProEconPowerstationInfoDay2> gfls = new ArrayList<>();
                     List<ProEconPowerstationInfoDay2> fdls = new ArrayList<>();
 
-                    if (wpinfo.getWindpowerstationId().contains("FDC")) {
+                    if (wpinfo.getWindpowerstationId().contains(WpType.FDC.id)) {
                         fdls.add(wpinfo);
                     } else {
                         gfls.add(wpinfo);
                     }
                     qbls.add(wpinfo);
-                    map.put("qb", qbls);
-                    map.put("fd", fdls);
-                    map.put("gf", gfls);
+                    map.put(CompanyType.qb.id, qbls);
+                    map.put(CompanyType.fd.id, fdls);
+                    map.put(CompanyType.gf.id, gfls);
                     cpmap.put(wpinfo.getCompanyId(), map);
                 }
             }
@@ -229,9 +231,9 @@ public class WindPowerInfo2Service {
             }
             for (Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay2>>> entry : cpmap.entrySet()) {
                 Map<String, List<ProEconPowerstationInfoDay2>> map = entry.getValue();
-                List<ProEconPowerstationInfoDay2> qbls = map.get("qb");
-                List<ProEconPowerstationInfoDay2> fdls = map.get("fd");
-                List<ProEconPowerstationInfoDay2> gfls = map.get("gf");
+                List<ProEconPowerstationInfoDay2> qbls = map.get(CompanyType.qb.id);
+                List<ProEconPowerstationInfoDay2> fdls = map.get(CompanyType.fd.id);
+                List<ProEconPowerstationInfoDay2> gfls = map.get(CompanyType.gf.id);
 //                if(CacheContext.cpwpmap.size()==qbls.size())
 //                {
 
@@ -518,11 +520,11 @@ public class WindPowerInfo2Service {
             //昨日的统计结果
             cl.add(Calendar.DAY_OF_MONTH, -1);
             if (cl.get(Calendar.DAY_OF_MONTH) != 1) {
-                QueryWrapper<ProEconPowerstationInfoDay1> queryWrapper2 = new QueryWrapper<>();
+                QueryWrapper<ProEconPowerstationInfoDay2> queryWrapper2 = new QueryWrapper<>();
                 queryWrapper2.eq("record_date",DateUtils.truncate(cl.getTime()))
                         .eq("location",Location.pj.getValue())
                         .eq("project_id",pj.getId());
-                pepidls = proEconPowerstationInfoDay2Service.list();
+                pepidls = proEconPowerstationInfoDay2Service.list(queryWrapper2);
 //                        .stream()
 //                        .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
 //

+ 22 - 20
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo3Service.java

@@ -6,7 +6,9 @@ import com.gyee.common.model.PointData;
 import com.gyee.common.model.StringUtils;
 import com.gyee.generation.init.CacheContext;
 import com.gyee.generation.model.auto.*;
+import com.gyee.generation.model.vo.CompanyType;
 import com.gyee.generation.model.vo.Location;
+import com.gyee.generation.model.vo.WpType;
 import com.gyee.generation.service.auto.IProEconPowerstationInfoDay3Service;
 import com.gyee.generation.util.DateUtils;
 import com.gyee.generation.util.realtimesource.IEdosUtil;
@@ -50,9 +52,9 @@ public class WindPowerInfo3Service {
 
                 if (rgmap.containsKey(wpinfo.getRegionId())) {
                     Map<String, List<ProEconPowerstationInfoDay3>> map = rgmap.get(wpinfo.getRegionId());
-                    List<ProEconPowerstationInfoDay3> qbls = map.get("qb");
-                    List<ProEconPowerstationInfoDay3> fdls = map.get("fd");
-                    List<ProEconPowerstationInfoDay3> gfls = map.get("gf");
+                    List<ProEconPowerstationInfoDay3> qbls = map.get(CompanyType.qb.id);
+                    List<ProEconPowerstationInfoDay3> fdls = map.get(CompanyType.fd.id);
+                    List<ProEconPowerstationInfoDay3> gfls = map.get(CompanyType.gf.id);
 
                     if (wpinfo.getForeignKeyId().contains("-1")) {
                         fdls.add(wpinfo);
@@ -75,9 +77,9 @@ public class WindPowerInfo3Service {
                     } else if (wpinfo.getForeignKeyId().contains("0")) {
                         qbls.add(wpinfo);
                     }
-                    map.put("qb", qbls);
-                    map.put("fd", fdls);
-                    map.put("gf", gfls);
+                    map.put(CompanyType.qb.id, qbls);
+                    map.put(CompanyType.fd.id, fdls);
+                    map.put(CompanyType.gf.id, gfls);
                     rgmap.put(wpinfo.getRegionId(), map);
                 }
             }
@@ -100,9 +102,9 @@ public class WindPowerInfo3Service {
             }
             for (Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay3>>> entry : rgmap.entrySet()) {
                 Map<String, List<ProEconPowerstationInfoDay3>> map = entry.getValue();
-                List<ProEconPowerstationInfoDay3> qbls = map.get("qb");
-                List<ProEconPowerstationInfoDay3> fdls = map.get("fd");
-                List<ProEconPowerstationInfoDay3> gfls = map.get("gf");
+                List<ProEconPowerstationInfoDay3> qbls = map.get(CompanyType.qb.id);
+                List<ProEconPowerstationInfoDay3> fdls = map.get(CompanyType.fd.id);
+                List<ProEconPowerstationInfoDay3> gfls = map.get(CompanyType.gf.id);
 //                if(CacheContext.cpwpmap.size()==qbls.size())
 //                {
 
@@ -181,11 +183,11 @@ public class WindPowerInfo3Service {
 
                 if (cpmap.containsKey(wpinfo.getCompanyId())) {
                     Map<String, List<ProEconPowerstationInfoDay3>> map = cpmap.get(wpinfo.getCompanyId());
-                    List<ProEconPowerstationInfoDay3> qbls = map.get("qb");
-                    List<ProEconPowerstationInfoDay3> fdls = map.get("fd");
-                    List<ProEconPowerstationInfoDay3> gfls = map.get("gf");
+                    List<ProEconPowerstationInfoDay3> qbls = map.get(CompanyType.qb.id);
+                    List<ProEconPowerstationInfoDay3> fdls = map.get(CompanyType.fd.id);
+                    List<ProEconPowerstationInfoDay3> gfls = map.get(CompanyType.gf.id);
 
-                    if (wpinfo.getWindpowerstationId().contains("FDC")) {
+                    if (wpinfo.getWindpowerstationId().contains(WpType.FDC.id)) {
                         fdls.add(wpinfo);
                     } else {
                         gfls.add(wpinfo);
@@ -198,15 +200,15 @@ public class WindPowerInfo3Service {
                     List<ProEconPowerstationInfoDay3> gfls = new ArrayList<>();
                     List<ProEconPowerstationInfoDay3> fdls = new ArrayList<>();
 
-                    if (wpinfo.getWindpowerstationId().contains("FDC")) {
+                    if (wpinfo.getWindpowerstationId().contains(WpType.FDC.id)) {
                         fdls.add(wpinfo);
                     } else {
                         gfls.add(wpinfo);
                     }
                     qbls.add(wpinfo);
-                    map.put("qb", qbls);
-                    map.put("fd", fdls);
-                    map.put("gf", gfls);
+                    map.put(CompanyType.qb.id, qbls);
+                    map.put(CompanyType.fd.id, fdls);
+                    map.put(CompanyType.gf.id, gfls);
                     cpmap.put(wpinfo.getCompanyId(), map);
                 }
             }
@@ -229,9 +231,9 @@ public class WindPowerInfo3Service {
             }
             for (Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay3>>> entry : cpmap.entrySet()) {
                 Map<String, List<ProEconPowerstationInfoDay3>> map = entry.getValue();
-                List<ProEconPowerstationInfoDay3> qbls = map.get("qb");
-                List<ProEconPowerstationInfoDay3> fdls = map.get("fd");
-                List<ProEconPowerstationInfoDay3> gfls = map.get("gf");
+                List<ProEconPowerstationInfoDay3> qbls = map.get(CompanyType.qb.id);
+                List<ProEconPowerstationInfoDay3> fdls = map.get(CompanyType.fd.id);
+                List<ProEconPowerstationInfoDay3> gfls = map.get(CompanyType.gf.id);
 //                if(CacheContext.cpwpmap.size()==qbls.size())
 //                {
 

+ 22 - 20
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo4Service.java

@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.gyee.common.model.StringUtils;
 import com.gyee.generation.init.CacheContext;
 import com.gyee.generation.model.auto.*;
+import com.gyee.generation.model.vo.CompanyType;
 import com.gyee.generation.model.vo.Location;
+import com.gyee.generation.model.vo.WpType;
 import com.gyee.generation.service.auto.*;
 import com.gyee.generation.util.DateUtils;
 import com.gyee.generation.util.statisticcs.Initial;
@@ -58,9 +60,9 @@ public class WindPowerInfo4Service {
 
                 if (rgmap.containsKey(wpinfo.getRegionId())) {
                     Map<String, List<ProEconPowerstationInfoDay4>> map = rgmap.get(wpinfo.getRegionId());
-                    List<ProEconPowerstationInfoDay4> qbls = map.get("qb");
-                    List<ProEconPowerstationInfoDay4> fdls = map.get("fd");
-                    List<ProEconPowerstationInfoDay4> gfls = map.get("gf");
+                    List<ProEconPowerstationInfoDay4> qbls = map.get(CompanyType.qb.id);
+                    List<ProEconPowerstationInfoDay4> fdls = map.get(CompanyType.fd.id);
+                    List<ProEconPowerstationInfoDay4> gfls = map.get(CompanyType.gf.id);
 
                     if (wpinfo.getForeignKeyId().contains("-1")) {
                         fdls.add(wpinfo);
@@ -83,9 +85,9 @@ public class WindPowerInfo4Service {
                     }else if (wpinfo.getForeignKeyId().contains("0")) {
                         qbls.add(wpinfo);
                     }
-                    map.put("qb", qbls);
-                    map.put("fd", fdls);
-                    map.put("gf", gfls);
+                    map.put(CompanyType.qb.id, qbls);
+                    map.put(CompanyType.fd.id, fdls);
+                    map.put(CompanyType.gf.id, gfls);
                     rgmap.put(wpinfo.getRegionId(), map);
                 }
             }
@@ -108,9 +110,9 @@ public class WindPowerInfo4Service {
             }
             for (Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay4>>> entry : rgmap.entrySet()) {
                 Map<String, List<ProEconPowerstationInfoDay4>> map = entry.getValue();
-                List<ProEconPowerstationInfoDay4> qbls = map.get("qb");
-                List<ProEconPowerstationInfoDay4> fdls = map.get("fd");
-                List<ProEconPowerstationInfoDay4> gfls = map.get("gf");
+                List<ProEconPowerstationInfoDay4> qbls = map.get(CompanyType.qb.id);
+                List<ProEconPowerstationInfoDay4> fdls = map.get(CompanyType.fd.id);
+                List<ProEconPowerstationInfoDay4> gfls = map.get(CompanyType.gf.id);
 //                if(CacheContext.cpwpmap.size()==qbls.size())
 //                {
 
@@ -190,11 +192,11 @@ public class WindPowerInfo4Service {
 
                 if (cpmap.containsKey(wpinfo.getCompanyId())) {
                     Map<String, List<ProEconPowerstationInfoDay4>> map = cpmap.get(wpinfo.getCompanyId());
-                    List<ProEconPowerstationInfoDay4> qbls = map.get("qb");
-                    List<ProEconPowerstationInfoDay4> fdls = map.get("fd");
-                    List<ProEconPowerstationInfoDay4> gfls = map.get("gf");
+                    List<ProEconPowerstationInfoDay4> qbls = map.get(CompanyType.qb.id);
+                    List<ProEconPowerstationInfoDay4> fdls = map.get(CompanyType.fd.id);
+                    List<ProEconPowerstationInfoDay4> gfls = map.get(CompanyType.gf.id);
 
-                    if (wpinfo.getWindpowerstationId().contains("FDC")) {
+                    if (wpinfo.getWindpowerstationId().contains(WpType.FDC.id)) {
                         fdls.add(wpinfo);
                     } else {
                         gfls.add(wpinfo);
@@ -207,15 +209,15 @@ public class WindPowerInfo4Service {
                     List<ProEconPowerstationInfoDay4> gfls = new ArrayList<>();
                     List<ProEconPowerstationInfoDay4> fdls = new ArrayList<>();
 
-                    if (wpinfo.getWindpowerstationId().contains("FDC")) {
+                    if (wpinfo.getWindpowerstationId().contains(WpType.FDC.id)) {
                         fdls.add(wpinfo);
                     } else {
                         gfls.add(wpinfo);
                     }
                     qbls.add(wpinfo);
-                    map.put("qb", qbls);
-                    map.put("fd", fdls);
-                    map.put("gf", gfls);
+                    map.put(CompanyType.qb.id, qbls);
+                    map.put(CompanyType.fd.id, fdls);
+                    map.put(CompanyType.gf.id, gfls);
                     cpmap.put(wpinfo.getCompanyId(), map);
                 }
             }
@@ -238,9 +240,9 @@ public class WindPowerInfo4Service {
             }
             for (Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay4>>> entry : cpmap.entrySet()) {
                 Map<String, List<ProEconPowerstationInfoDay4>> map = entry.getValue();
-                List<ProEconPowerstationInfoDay4> qbls = map.get("qb");
-                List<ProEconPowerstationInfoDay4> fdls = map.get("fd");
-                List<ProEconPowerstationInfoDay4> gfls = map.get("gf");
+                List<ProEconPowerstationInfoDay4> qbls = map.get(CompanyType.qb.id);
+                List<ProEconPowerstationInfoDay4> fdls = map.get(CompanyType.fd.id);
+                List<ProEconPowerstationInfoDay4> gfls = map.get(CompanyType.gf.id);
 //                if(CacheContext.cpwpmap.size()==qbls.size())
 //                {
 

+ 22 - 20
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo5Service.java

@@ -6,7 +6,9 @@ import com.gyee.common.model.PointData;
 import com.gyee.common.model.StringUtils;
 import com.gyee.generation.init.CacheContext;
 import com.gyee.generation.model.auto.*;
+import com.gyee.generation.model.vo.CompanyType;
 import com.gyee.generation.model.vo.Location;
+import com.gyee.generation.model.vo.WpType;
 import com.gyee.generation.service.auto.IProEconPowerstationInfoDay5Service;
 import com.gyee.generation.util.DateUtils;
 import com.gyee.generation.util.realtimesource.IEdosUtil;
@@ -50,9 +52,9 @@ public class WindPowerInfo5Service {
 
                 if (rgmap.containsKey(wpinfo.getRegionId())) {
                     Map<String, List<ProEconPowerstationInfoDay5>> map = rgmap.get(wpinfo.getRegionId());
-                    List<ProEconPowerstationInfoDay5> qbls = map.get("qb");
-                    List<ProEconPowerstationInfoDay5> fdls = map.get("fd");
-                    List<ProEconPowerstationInfoDay5> gfls = map.get("gf");
+                    List<ProEconPowerstationInfoDay5> qbls = map.get(CompanyType.qb.id);
+                    List<ProEconPowerstationInfoDay5> fdls = map.get(CompanyType.fd.id);
+                    List<ProEconPowerstationInfoDay5> gfls = map.get(CompanyType.gf.id);
 
                     if (wpinfo.getForeignKeyId().contains("-1")) {
                         fdls.add(wpinfo);
@@ -76,9 +78,9 @@ public class WindPowerInfo5Service {
                     }else if (wpinfo.getForeignKeyId().contains("0")) {
                         qbls.add(wpinfo);
                     }
-                    map.put("qb", qbls);
-                    map.put("fd", fdls);
-                    map.put("gf", gfls);
+                    map.put(CompanyType.qb.id, qbls);
+                    map.put(CompanyType.fd.id, fdls);
+                    map.put(CompanyType.gf.id, gfls);
                     rgmap.put(wpinfo.getRegionId(), map);
                 }
             }
@@ -101,9 +103,9 @@ public class WindPowerInfo5Service {
             }
             for (Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay5>>> entry : rgmap.entrySet()) {
                 Map<String, List<ProEconPowerstationInfoDay5>> map = entry.getValue();
-                List<ProEconPowerstationInfoDay5> qbls = map.get("qb");
-                List<ProEconPowerstationInfoDay5> fdls = map.get("fd");
-                List<ProEconPowerstationInfoDay5> gfls = map.get("gf");
+                List<ProEconPowerstationInfoDay5> qbls = map.get(CompanyType.qb.id);
+                List<ProEconPowerstationInfoDay5> fdls = map.get(CompanyType.fd.id);
+                List<ProEconPowerstationInfoDay5> gfls = map.get(CompanyType.gf.id);
 //                if(CacheContext.cpwpmap.size()==qbls.size())
 //                {
 
@@ -181,11 +183,11 @@ public class WindPowerInfo5Service {
 
                 if (cpmap.containsKey(wpinfo.getCompanyId())) {
                     Map<String, List<ProEconPowerstationInfoDay5>> map = cpmap.get(wpinfo.getCompanyId());
-                    List<ProEconPowerstationInfoDay5> qbls = map.get("qb");
-                    List<ProEconPowerstationInfoDay5> fdls = map.get("fd");
-                    List<ProEconPowerstationInfoDay5> gfls = map.get("gf");
+                    List<ProEconPowerstationInfoDay5> qbls = map.get(CompanyType.qb.id);
+                    List<ProEconPowerstationInfoDay5> fdls = map.get(CompanyType.fd.id);
+                    List<ProEconPowerstationInfoDay5> gfls = map.get(CompanyType.gf.id);
 
-                    if (wpinfo.getWindpowerstationId().contains("FDC")) {
+                    if (wpinfo.getWindpowerstationId().contains(WpType.FDC.id)) {
                         fdls.add(wpinfo);
                     } else {
                         gfls.add(wpinfo);
@@ -198,15 +200,15 @@ public class WindPowerInfo5Service {
                     List<ProEconPowerstationInfoDay5> gfls = new ArrayList<>();
                     List<ProEconPowerstationInfoDay5> fdls = new ArrayList<>();
 
-                    if (wpinfo.getWindpowerstationId().contains("FDC")) {
+                    if (wpinfo.getWindpowerstationId().contains(WpType.FDC.id)) {
                         fdls.add(wpinfo);
                     } else {
                         gfls.add(wpinfo);
                     }
                     qbls.add(wpinfo);
-                    map.put("qb", qbls);
-                    map.put("fd", fdls);
-                    map.put("gf", gfls);
+                    map.put(CompanyType.qb.id, qbls);
+                    map.put(CompanyType.fd.id, fdls);
+                    map.put(CompanyType.gf.id, gfls);
                     cpmap.put(wpinfo.getCompanyId(), map);
                 }
             }
@@ -229,9 +231,9 @@ public class WindPowerInfo5Service {
             }
             for (Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay5>>> entry : cpmap.entrySet()) {
                 Map<String, List<ProEconPowerstationInfoDay5>> map = entry.getValue();
-                List<ProEconPowerstationInfoDay5> qbls = map.get("qb");
-                List<ProEconPowerstationInfoDay5> fdls = map.get("fd");
-                List<ProEconPowerstationInfoDay5> gfls = map.get("gf");
+                List<ProEconPowerstationInfoDay5> qbls = map.get(CompanyType.qb.id);
+                List<ProEconPowerstationInfoDay5> fdls = map.get(CompanyType.fd.id);
+                List<ProEconPowerstationInfoDay5> gfls = map.get(CompanyType.gf.id);
 //                if(CacheContext.cpwpmap.size()==qbls.size())
 //                {
 

+ 23 - 21
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo6Service.java

@@ -5,7 +5,9 @@ import com.gyee.common.contant.ContantXk;
 import com.gyee.common.model.PointData;
 import com.gyee.generation.init.CacheContext;
 import com.gyee.generation.model.auto.*;
+import com.gyee.generation.model.vo.CompanyType;
 import com.gyee.generation.model.vo.Location;
+import com.gyee.generation.model.vo.WpType;
 import com.gyee.generation.service.auto.IProEconPowerstationInfoDay6Service;
 import com.gyee.generation.util.DateUtils;
 import com.gyee.generation.util.StringUtils;
@@ -56,9 +58,9 @@ public class WindPowerInfo6Service {
 
                 if (rgmap.containsKey(wpinfo.getRegionId())) {
                     Map<String, List<ProEconPowerstationInfoDay6>> map = rgmap.get(wpinfo.getRegionId());
-                    List<ProEconPowerstationInfoDay6> qbls = map.get("qb");
-                    List<ProEconPowerstationInfoDay6> fdls = map.get("fd");
-                    List<ProEconPowerstationInfoDay6> gfls = map.get("gf");
+                    List<ProEconPowerstationInfoDay6> qbls = map.get(CompanyType.qb.id);
+                    List<ProEconPowerstationInfoDay6> fdls = map.get(CompanyType.fd.id);
+                    List<ProEconPowerstationInfoDay6> gfls = map.get(CompanyType.gf.id);
 
                     if (wpinfo.getForeignKeyId().contains("-1")) {
                         fdls.add(wpinfo);
@@ -82,9 +84,9 @@ public class WindPowerInfo6Service {
                     }else if (wpinfo.getForeignKeyId().contains("0")) {
                         qbls.add(wpinfo);
                     }
-                    map.put("qb", qbls);
-                    map.put("fd", fdls);
-                    map.put("gf", gfls);
+                    map.put(CompanyType.qb.id, qbls);
+                    map.put(CompanyType.fd.id, fdls);
+                    map.put(CompanyType.gf.id, gfls);
                     rgmap.put(wpinfo.getRegionId(), map);
                 }
             }
@@ -107,9 +109,9 @@ public class WindPowerInfo6Service {
             }
             for (Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay6>>> entry : rgmap.entrySet()) {
                 Map<String, List<ProEconPowerstationInfoDay6>> map = entry.getValue();
-                List<ProEconPowerstationInfoDay6> qbls = map.get("qb");
-                List<ProEconPowerstationInfoDay6> fdls = map.get("fd");
-                List<ProEconPowerstationInfoDay6> gfls = map.get("gf");
+                List<ProEconPowerstationInfoDay6> qbls = map.get(CompanyType.qb.id);
+                List<ProEconPowerstationInfoDay6> fdls = map.get(CompanyType.fd.id);
+                List<ProEconPowerstationInfoDay6> gfls = map.get(CompanyType.gf.id);
 //                if(CacheContext.cpwpmap.size()==qbls.size())
 //                {
 
@@ -186,11 +188,11 @@ public class WindPowerInfo6Service {
 
                 if (cpmap.containsKey(wpinfo.getCompanyId())) {
                     Map<String, List<ProEconPowerstationInfoDay6>> map = cpmap.get(wpinfo.getCompanyId());
-                    List<ProEconPowerstationInfoDay6> qbls = map.get("qb");
-                    List<ProEconPowerstationInfoDay6> fdls = map.get("fd");
-                    List<ProEconPowerstationInfoDay6> gfls = map.get("gf");
+                    List<ProEconPowerstationInfoDay6> qbls = map.get(CompanyType.qb.id);
+                    List<ProEconPowerstationInfoDay6> fdls = map.get(CompanyType.fd.id);
+                    List<ProEconPowerstationInfoDay6> gfls = map.get(CompanyType.gf.id);
 
-                    if (wpinfo.getWindpowerstationId().contains("FDC")) {
+                    if (wpinfo.getWindpowerstationId().contains(WpType.FDC.id)) {
                         fdls.add(wpinfo);
                     } else {
                         gfls.add(wpinfo);
@@ -203,15 +205,15 @@ public class WindPowerInfo6Service {
                     List<ProEconPowerstationInfoDay6> gfls = new ArrayList<>();
                     List<ProEconPowerstationInfoDay6> fdls = new ArrayList<>();
 
-                    if (wpinfo.getWindpowerstationId().contains("FDC")) {
+                    if (wpinfo.getWindpowerstationId().contains(WpType.FDC.id)) {
                         fdls.add(wpinfo);
                     } else {
                         gfls.add(wpinfo);
                     }
                     qbls.add(wpinfo);
-                    map.put("qb", qbls);
-                    map.put("fd", fdls);
-                    map.put("gf", gfls);
+                    map.put(CompanyType.qb.id, qbls);
+                    map.put(CompanyType.fd.id, fdls);
+                    map.put(CompanyType.gf.id, gfls);
                     cpmap.put(wpinfo.getCompanyId(), map);
                 }
             }
@@ -234,9 +236,9 @@ public class WindPowerInfo6Service {
             }
             for (Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay6>>> entry : cpmap.entrySet()) {
                 Map<String, List<ProEconPowerstationInfoDay6>> map = entry.getValue();
-                List<ProEconPowerstationInfoDay6> qbls = map.get("qb");
-                List<ProEconPowerstationInfoDay6> fdls = map.get("fd");
-                List<ProEconPowerstationInfoDay6> gfls = map.get("gf");
+                List<ProEconPowerstationInfoDay6> qbls = map.get(CompanyType.qb.id);
+                List<ProEconPowerstationInfoDay6> fdls = map.get(CompanyType.fd.id);
+                List<ProEconPowerstationInfoDay6> gfls = map.get(CompanyType.gf.id);
 //                if(CacheContext.cpwpmap.size()==qbls.size())
 //                {
 
@@ -429,7 +431,7 @@ public class WindPowerInfo6Service {
                     queryWrapper2.eq("record_date",DateUtils.truncate(cl.getTime()))
                             .eq("windPowerStation_Id",wp.getId())
                             .eq("location",Location.wp.getValue());
-                    pepid1ls = proEconPowerstationInfoDay6Service.list();
+                    pepid1ls = proEconPowerstationInfoDay6Service.list(queryWrapper2);
 //                            .stream()
 //                            .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
 //                                    && i.getLocation().equals(Location.wp.getValue())

+ 5 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindturbineGoodnessService.java

@@ -6,6 +6,7 @@ import com.gyee.generation.init.CacheContext;
 import com.gyee.generation.model.auto.ProBasicEquipment;
 import com.gyee.generation.model.auto.ProEconEquipmentInfoDay1;
 import com.gyee.generation.model.auto.ProEconWindturbineGoodness;
+import com.gyee.generation.model.vo.WpType;
 import com.gyee.generation.service.auto.IProEconEquipmentInfoDay1Service;
 import com.gyee.generation.service.auto.IProEconWindturbineGoodnessService;
 import com.gyee.generation.util.DateUtils;
@@ -57,7 +58,9 @@ public class WindturbineGoodnessService {
             Map<String, Map<String, Double>> coefficientMap=coefficientService.coefficient(wt.getId(),DateUtils.truncate(recordDate));
             Map<String, Map<String,Double>> fitMap=goodnessOfFitService.goodnessOfFit(wt.getId(),DateUtils.truncate(recordDate));
 
-          List<ProEconEquipmentInfoDay1> day1ls=  proEconEquipmentInfoDay1Service.list().stream().filter(i->
+            QueryWrapper<ProEconEquipmentInfoDay1> queryWrapper2 = new QueryWrapper<>();
+            queryWrapper2.eq("windturbine_id",wt.getId());
+          List<ProEconEquipmentInfoDay1> day1ls=  proEconEquipmentInfoDay1Service.list(queryWrapper2).stream().filter(i->
                     i.getWindturbineId().equals(wt.getId())
             && i.getRecordDate().compareTo(DateUtils.truncate(recordDate))==0
             ).collect(Collectors.toList());
@@ -69,7 +72,7 @@ public class WindturbineGoodnessService {
             po.setWindtpowerstationId(wt.getWindpowerstationId());
             po.setCompanyId(wt.getCompanyId());
             po.setRegionId(wt.getRegionId());
-            if(wt.getWindpowerstationId().contains("FDC"))
+            if(wt.getWindpowerstationId().contains(WpType.FDC.id))
             {
                 po.setTypes("-1");
             }else

+ 1 - 1
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WpwindDayInfoService.java

@@ -76,7 +76,7 @@ public class WpwindDayInfoService {
                 if (cl.get(Calendar.DAY_OF_MONTH) != 1) {
                     QueryWrapper<ProEconWpwindDayInfo> queryWrapper2 = new QueryWrapper<>();
                     queryWrapper2.eq("record_date",DateUtils.truncate(cl.getTime())).eq("Weather_Id",ws.getId());
-                    pepid1ls = proEconWpwindDayInfoService.list();
+                    pepid1ls = proEconWpwindDayInfoService.list(queryWrapper2);
 //                            .stream()
 //                            .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
 //                                    && i.getWeatherId().equals(ws.getId())

+ 384 - 370
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WtwindDayInfoService.java

@@ -7,6 +7,7 @@ import com.gyee.generation.init.CacheContext;
 import com.gyee.generation.model.auto.ProBasicEquipment;
 import com.gyee.generation.model.auto.ProBasicEquipmentPoint;
 import com.gyee.generation.model.auto.ProEconWtwindDayInfo;
+import com.gyee.generation.model.vo.WpType;
 import com.gyee.generation.service.auto.IProEconWtwindDayInfoService;
 import com.gyee.generation.util.DateUtils;
 import com.gyee.generation.util.realtimesource.IEdosUtil;
@@ -210,9 +211,33 @@ public class WtwindDayInfoService {
         double nwn_dayjfcs = 0.0;
         double nwn_dayfcs = 0.0;
 
+        List<PointData> fxpointls =new ArrayList<>();
+        List<PointData> fspointls =new ArrayList<>();
+
+        if(wt.getWindpowerstationId().contains(WpType.FDC.id))
+        {
+            if(pointmap.containsKey(ContantXk.CJ_FX) && pointmap.containsKey(ContantXk.RPJFS))
+            {
+                ProBasicEquipmentPoint fxpoint = pointmap.get(ContantXk.CJ_FX);
+                ProBasicEquipmentPoint fspoint = pointmap.get(ContantXk.RPJFS);
+                fxpointls = edosUtil.getHistoryDatasSnap(fxpoint.getNemCode(), begin.getTime() / 1000, end.getTime() / 1000);
+
+
+                fspointls = edosUtil.getHistoryDatasSnap(fspoint.getNemCode(), begin.getTime() / 1000, end.getTime() / 1000);
+            }
+
+        }else
+        {
+            if(pointmap.containsKey(ContantXk.CJ_FX) && pointmap.containsKey(ContantXk.RPJGZD))
+            {
+                ProBasicEquipmentPoint fxpoint = pointmap.get(ContantXk.CJ_FX);
+                ProBasicEquipmentPoint fspoint = pointmap.get(ContantXk.RPJGZD);
+                fxpointls = edosUtil.getHistoryDatasSnap(fxpoint.getNemCode(), begin.getTime() / 1000, end.getTime() / 1000);
+
+                fspointls = edosUtil.getHistoryDatasSnap(fspoint.getNemCode(), begin.getTime() / 1000, end.getTime() / 1000);
+            }
+        }
 
-        ProBasicEquipmentPoint fspoint = pointmap.get(ContantXk.RPJFS);
-        List<PointData> fspointls = edosUtil.getHistoryDatasSnap(fspoint.getNemCode(), begin.getTime() / 1000, end.getTime() / 1000);
         if (!fspointls.isEmpty()) {
 
 //            //切入切出统计
@@ -235,509 +260,498 @@ public class WtwindDayInfoService {
 
             }
 
-//                //日静风次数
-//                pewp.setCa(dayjfcs);
-//                //日风次数
-//                pewp.setCh(dayfcs);
-//
-//                if (dayfcs != 0) {
-//                    pewp.setCb(BigDecimal.valueOf(dayjfcs).divide(new BigDecimal(dayfcs), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue());
-//                }
         }
 
-        if (pointmap.containsKey(ContantXk.CJ_FX) && pointmap.containsKey(ContantXk.RPJFS)) {
-            ProBasicEquipmentPoint fxpoint = pointmap.get(ContantXk.CJ_FX);
-            List<PointData> fxpointls = edosUtil.getHistoryDatasSnap(fxpoint.getNemCode(), begin.getTime() / 1000, end.getTime() / 1000);
 
-            if (!fxpointls.isEmpty() && !fspointls.isEmpty() && fxpointls.size() == fspointls.size()) {
 
 
-                for (int i = 0; i < fxpointls.size(); i++) {
-                    double fx = fxpointls.get(i).getPointValueInDouble();
+        if (!fxpointls.isEmpty() && !fspointls.isEmpty() && fxpointls.size() == fspointls.size()) {
 
-                    double lastfx = -1;
-                    for (PointData po : fxpointls) {
-                        if (lastfx != po.getPointValueInDouble()) {
-                            zfxcs++;
-                            lastfx=po.getPointValueInDouble();
-                        }
-                    }
-                    //北
-                    if ((fx >= 348.76 && fx <= 360) || (fx >= 0 && fx <= 11.25)) {
-                        if (!fspointls.isEmpty()) {
-                            //切入切出统计
-                            //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
-
-                            double lastvalue = -1;
-                            for (PointData po : fspointls) {
-                                //小风切入风速
-                               // double xfqr = peiost.getDayInputSmall();
-
-                                if (lastvalue != po.getPointValueInDouble()) {
-                                    //小于小风切入算静风次数累计
-                                    if (po.getPointValueInDouble() < 3.0) {
-                                        n_dayjfcs++;
-                                        lastvalue=po.getPointValueInDouble();
-                                    }
-
-                                    n_fsls.add(fspointls.get(i).getPointValueInDouble());
-                                    n_fxls.add(fxpointls.get(i).getPointValueInDouble());
-
-                                    n_dayfcs++;
-                                }
 
-                            }
+            for (int i = 0; i < fxpointls.size(); i++) {
+                double fx = fxpointls.get(i).getPointValueInDouble();
 
-                        }
+                double lastfx = -1;
+                for (PointData po : fxpointls) {
+                    if (lastfx != po.getPointValueInDouble()) {
+                        zfxcs++;
+                        lastfx=po.getPointValueInDouble();
                     }
-
-                    //北东北
-                    else if (fx >= 11.26 && fx <= 33.75) {
-
-                        if (!fspointls.isEmpty()) {
-                            //切入切出统计
-                            //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
-
-                            double lastvalue = -1;
-                            for (PointData po : fspointls) {
-                                //小风切入风速
-                               // double xfqr = peiost.getDayInputSmall();
-
-                                if (lastvalue != po.getPointValueInDouble()) {
-                                    //小于小风切入算静风次数累计
-                                    if (po.getPointValueInDouble() < 3.0) {
-                                        nen_dayjfcs++;
-                                        lastvalue=po.getPointValueInDouble();
-                                    }
-
-                                    nen_fsls.add(fspointls.get(i).getPointValueInDouble());
-                                    nen_fxls.add(fxpointls.get(i).getPointValueInDouble());
-
-                                    nen_dayfcs++;
+                }
+                //北
+                if ((fx >= 348.76 && fx <= 360) || (fx >= 0 && fx <= 11.25)) {
+                    if (!fspointls.isEmpty()) {
+                        //切入切出统计
+                        //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
+
+                        double lastvalue = -1;
+                        for (PointData po : fspointls) {
+                            //小风切入风速
+                            // double xfqr = peiost.getDayInputSmall();
+
+                            if (lastvalue != po.getPointValueInDouble()) {
+                                //小于小风切入算静风次数累计
+                                if (po.getPointValueInDouble() < 3.0) {
+                                    n_dayjfcs++;
+                                    lastvalue=po.getPointValueInDouble();
                                 }
 
+                                n_fsls.add(fspointls.get(i).getPointValueInDouble());
+                                n_fxls.add(fxpointls.get(i).getPointValueInDouble());
+
+                                n_dayfcs++;
                             }
 
                         }
-                    }
-
-                    //东北
-                    else if (fx >= 33.76 && fx <= 56.25) {
 
-                        if (!fspointls.isEmpty()) {
-                            //切入切出统计
-                            //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
+                    }
+                }
 
-                            double lastvalue = -1;
-                            for (PointData po : fspointls) {
-                                //小风切入风速
-                               // double xfqr = peiost.getDayInputSmall();
+                //北东北
+                else if (fx >= 11.26 && fx <= 33.75) {
 
-                                if (lastvalue != po.getPointValueInDouble()) {
-                                    //小于小风切入算静风次数累计
-                                    if (po.getPointValueInDouble() < 3.0) {
-                                        en_dayjfcs++;
-                                        lastvalue=po.getPointValueInDouble();
-                                    }
+                    if (!fspointls.isEmpty()) {
+                        //切入切出统计
+                        //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
 
-                                    en_fsls.add(fspointls.get(i).getPointValueInDouble());
-                                    en_fxls.add(fxpointls.get(i).getPointValueInDouble());
+                        double lastvalue = -1;
+                        for (PointData po : fspointls) {
+                            //小风切入风速
+                            // double xfqr = peiost.getDayInputSmall();
 
-                                    en_dayfcs++;
+                            if (lastvalue != po.getPointValueInDouble()) {
+                                //小于小风切入算静风次数累计
+                                if (po.getPointValueInDouble() < 3.0) {
+                                    nen_dayjfcs++;
+                                    lastvalue=po.getPointValueInDouble();
                                 }
 
+                                nen_fsls.add(fspointls.get(i).getPointValueInDouble());
+                                nen_fxls.add(fxpointls.get(i).getPointValueInDouble());
+
+                                nen_dayfcs++;
                             }
 
                         }
-                    }
-                    //东东北
-                    else if (fx >= 56.26 && fx <= 78.75) {
 
-                        if (!fspointls.isEmpty()) {
-                            //切入切出统计
-                            //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
+                    }
+                }
 
-                            double lastvalue = -1;
-                            for (PointData po : fspointls) {
-                                //小风切入风速
-                               // double xfqr = peiost.getDayInputSmall();
+                //东北
+                else if (fx >= 33.76 && fx <= 56.25) {
 
-                                if (lastvalue != po.getPointValueInDouble()) {
-                                    //小于小风切入算静风次数累计
-                                    if (po.getPointValueInDouble() < 3.0) {
-                                        een_dayjfcs++;
-                                        lastvalue=po.getPointValueInDouble();
-                                    }
+                    if (!fspointls.isEmpty()) {
+                        //切入切出统计
+                        //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
 
-                                    een_fsls.add(fspointls.get(i).getPointValueInDouble());
-                                    een_fxls.add(fxpointls.get(i).getPointValueInDouble());
+                        double lastvalue = -1;
+                        for (PointData po : fspointls) {
+                            //小风切入风速
+                            // double xfqr = peiost.getDayInputSmall();
 
-                                    een_dayfcs++;
+                            if (lastvalue != po.getPointValueInDouble()) {
+                                //小于小风切入算静风次数累计
+                                if (po.getPointValueInDouble() < 3.0) {
+                                    en_dayjfcs++;
+                                    lastvalue=po.getPointValueInDouble();
                                 }
 
+                                en_fsls.add(fspointls.get(i).getPointValueInDouble());
+                                en_fxls.add(fxpointls.get(i).getPointValueInDouble());
+
+                                en_dayfcs++;
                             }
 
                         }
-                    }
-                    //东
-                    else if (fx >= 78.76 && fx <= 101.25) {
-
-                        if (!fspointls.isEmpty()) {
-                            //切入切出统计
-                            //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
-
-                            double lastvalue = -1;
-                            for (PointData po : fspointls) {
-                                //小风切入风速
-                               // double xfqr = peiost.getDayInputSmall();
-
-                                if (lastvalue != po.getPointValueInDouble()) {
-                                    //小于小风切入算静风次数累计
-                                    if (po.getPointValueInDouble() < 3.0) {
-                                        e_dayjfcs++;
-                                        lastvalue=po.getPointValueInDouble();
-                                    }
 
-                                    e_fsls.add(fspointls.get(i).getPointValueInDouble());
-                                    e_fxls.add(fxpointls.get(i).getPointValueInDouble());
-
-                                    e_dayfcs++;
+                    }
+                }
+                //东东北
+                else if (fx >= 56.26 && fx <= 78.75) {
+
+                    if (!fspointls.isEmpty()) {
+                        //切入切出统计
+                        //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
+
+                        double lastvalue = -1;
+                        for (PointData po : fspointls) {
+                            //小风切入风速
+                            // double xfqr = peiost.getDayInputSmall();
+
+                            if (lastvalue != po.getPointValueInDouble()) {
+                                //小于小风切入算静风次数累计
+                                if (po.getPointValueInDouble() < 3.0) {
+                                    een_dayjfcs++;
+                                    lastvalue=po.getPointValueInDouble();
                                 }
 
+                                een_fsls.add(fspointls.get(i).getPointValueInDouble());
+                                een_fxls.add(fxpointls.get(i).getPointValueInDouble());
+
+                                een_dayfcs++;
                             }
 
                         }
-                    }
-                    //东东南
-                    else if (fx >= 101.26 && fx <= 123.75) {
-
-                        if (!fspointls.isEmpty()) {
-                            //切入切出统计
-                            //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
-
-                            double lastvalue = -1;
-                            for (PointData po : fspointls) {
-                                //小风切入风速
-                               // double xfqr = peiost.getDayInputSmall();
 
-                                if (lastvalue != po.getPointValueInDouble()) {
-                                    //小于小风切入算静风次数累计
-                                    if (po.getPointValueInDouble() < 3.0) {
-                                        ees_dayjfcs++;
-                                        lastvalue=po.getPointValueInDouble();
-                                    }
-
-                                    ees_fsls.add(fspointls.get(i).getPointValueInDouble());
-                                    ees_fxls.add(fxpointls.get(i).getPointValueInDouble());
-
-                                    ees_dayfcs++;
+                    }
+                }
+                //东
+                else if (fx >= 78.76 && fx <= 101.25) {
+
+                    if (!fspointls.isEmpty()) {
+                        //切入切出统计
+                        //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
+
+                        double lastvalue = -1;
+                        for (PointData po : fspointls) {
+                            //小风切入风速
+                            // double xfqr = peiost.getDayInputSmall();
+
+                            if (lastvalue != po.getPointValueInDouble()) {
+                                //小于小风切入算静风次数累计
+                                if (po.getPointValueInDouble() < 3.0) {
+                                    e_dayjfcs++;
+                                    lastvalue=po.getPointValueInDouble();
                                 }
 
+                                e_fsls.add(fspointls.get(i).getPointValueInDouble());
+                                e_fxls.add(fxpointls.get(i).getPointValueInDouble());
+
+                                e_dayfcs++;
                             }
 
                         }
-                    }
-                    //东南
-                    else if (fx >= 123.76 && fx <= 146.25) {
-
-
 
-                        if (!fspointls.isEmpty()) {
-                            //切入切出统计
-                            //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
-
-                            double lastvalue = -1;
-                            for (PointData po : fspointls) {
-                                //小风切入风速
-                               // double xfqr = peiost.getDayInputSmall();
-
-                                if (lastvalue != po.getPointValueInDouble()) {
-                                    //小于小风切入算静风次数累计
-                                    if (po.getPointValueInDouble() < 3.0) {
-                                        es_dayjfcs++;
-                                        lastvalue=po.getPointValueInDouble();
-                                    }
-
-                                    es_fsls.add(fspointls.get(i).getPointValueInDouble());
-                                    es_fxls.add(fxpointls.get(i).getPointValueInDouble());
-
-                                    es_dayfcs++;
+                    }
+                }
+                //东东南
+                else if (fx >= 101.26 && fx <= 123.75) {
+
+                    if (!fspointls.isEmpty()) {
+                        //切入切出统计
+                        //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
+
+                        double lastvalue = -1;
+                        for (PointData po : fspointls) {
+                            //小风切入风速
+                            // double xfqr = peiost.getDayInputSmall();
+
+                            if (lastvalue != po.getPointValueInDouble()) {
+                                //小于小风切入算静风次数累计
+                                if (po.getPointValueInDouble() < 3.0) {
+                                    ees_dayjfcs++;
+                                    lastvalue=po.getPointValueInDouble();
                                 }
 
+                                ees_fsls.add(fspointls.get(i).getPointValueInDouble());
+                                ees_fxls.add(fxpointls.get(i).getPointValueInDouble());
+
+                                ees_dayfcs++;
                             }
 
                         }
-                    }
-                    //南东南
-                    else if (fx >= 146.26 && fx <= 168.75) {
 
+                    }
+                }
+                //东南
+                else if (fx >= 123.76 && fx <= 146.25) {
 
-                        if (!fspointls.isEmpty()) {
-                            //切入切出统计
-                            //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
 
-                            double lastvalue = -1;
-                            for (PointData po : fspointls) {
-                                //小风切入风速
-                               // double xfqr = peiost.getDayInputSmall();
 
-                                if (lastvalue != po.getPointValueInDouble()) {
-                                    //小于小风切入算静风次数累计
-                                    if (po.getPointValueInDouble() < 3.0) {
-                                        ses_dayjfcs++;
-                                        lastvalue=po.getPointValueInDouble();
-                                    }
+                    if (!fspointls.isEmpty()) {
+                        //切入切出统计
+                        //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
 
-                                    ses_fsls.add(fspointls.get(i).getPointValueInDouble());
-                                    ses_fxls.add(fxpointls.get(i).getPointValueInDouble());
+                        double lastvalue = -1;
+                        for (PointData po : fspointls) {
+                            //小风切入风速
+                            // double xfqr = peiost.getDayInputSmall();
 
-                                    ses_dayfcs++;
+                            if (lastvalue != po.getPointValueInDouble()) {
+                                //小于小风切入算静风次数累计
+                                if (po.getPointValueInDouble() < 3.0) {
+                                    es_dayjfcs++;
+                                    lastvalue=po.getPointValueInDouble();
                                 }
 
+                                es_fsls.add(fspointls.get(i).getPointValueInDouble());
+                                es_fxls.add(fxpointls.get(i).getPointValueInDouble());
+
+                                es_dayfcs++;
                             }
 
                         }
-                    }
-                    //南
-                    else if (fx >= 168.76 && fx <= 191.25) {
-
 
-                        if (!fspointls.isEmpty()) {
-                            //切入切出统计
-                            //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
+                    }
+                }
+                //南东南
+                else if (fx >= 146.26 && fx <= 168.75) {
 
-                            double lastvalue = -1;
-                            for (PointData po : fspointls) {
-                                //小风切入风速
-                               // double xfqr = peiost.getDayInputSmall();
 
-                                if (lastvalue != po.getPointValueInDouble()) {
-                                    //小于小风切入算静风次数累计
-                                    if (po.getPointValueInDouble() < 3.0) {
-                                        s_dayjfcs++;
-                                        lastvalue=po.getPointValueInDouble();
-                                    }
+                    if (!fspointls.isEmpty()) {
+                        //切入切出统计
+                        //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
 
-                                    s_fsls.add(fspointls.get(i).getPointValueInDouble());
-                                    s_fxls.add(fxpointls.get(i).getPointValueInDouble());
+                        double lastvalue = -1;
+                        for (PointData po : fspointls) {
+                            //小风切入风速
+                            // double xfqr = peiost.getDayInputSmall();
 
-                                    s_dayfcs++;
+                            if (lastvalue != po.getPointValueInDouble()) {
+                                //小于小风切入算静风次数累计
+                                if (po.getPointValueInDouble() < 3.0) {
+                                    ses_dayjfcs++;
+                                    lastvalue=po.getPointValueInDouble();
                                 }
 
+                                ses_fsls.add(fspointls.get(i).getPointValueInDouble());
+                                ses_fxls.add(fxpointls.get(i).getPointValueInDouble());
+
+                                ses_dayfcs++;
                             }
 
                         }
-                    }
-                    //南西南
-                    else if (fx >= 191.26 && fx <= 213.75) {
 
-                        if (!fspointls.isEmpty()) {
-                            //切入切出统计
-                            //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
+                    }
+                }
+                //南
+                else if (fx >= 168.76 && fx <= 191.25) {
 
-                            double lastvalue = -1;
-                            for (PointData po : fspointls) {
-                                //小风切入风速
-                               // double xfqr = peiost.getDayInputSmall();
 
-                                if (lastvalue != po.getPointValueInDouble()) {
-                                    //小于小风切入算静风次数累计
-                                    if (po.getPointValueInDouble() < 3.0) {
-                                        sws_dayjfcs++;
-                                        lastvalue=po.getPointValueInDouble();
-                                    }
+                    if (!fspointls.isEmpty()) {
+                        //切入切出统计
+                        //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
 
-                                    sws_fsls.add(fspointls.get(i).getPointValueInDouble());
-                                    sws_fxls.add(fxpointls.get(i).getPointValueInDouble());
+                        double lastvalue = -1;
+                        for (PointData po : fspointls) {
+                            //小风切入风速
+                            // double xfqr = peiost.getDayInputSmall();
 
-                                    sws_dayfcs++;
+                            if (lastvalue != po.getPointValueInDouble()) {
+                                //小于小风切入算静风次数累计
+                                if (po.getPointValueInDouble() < 3.0) {
+                                    s_dayjfcs++;
+                                    lastvalue=po.getPointValueInDouble();
                                 }
 
+                                s_fsls.add(fspointls.get(i).getPointValueInDouble());
+                                s_fxls.add(fxpointls.get(i).getPointValueInDouble());
+
+                                s_dayfcs++;
                             }
 
                         }
-                    }
-                    //西南
-                    else if (fx >= 213.76 && fx <= 236.25) {
-
-                        if (!fspointls.isEmpty()) {
-                            //切入切出统计
-                            //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
 
-                            double lastvalue = -1;
-                            for (PointData po : fspointls) {
-                                //小风切入风速
-                               // double xfqr = peiost.getDayInputSmall();
-
-                                if (lastvalue != po.getPointValueInDouble()) {
-                                    //小于小风切入算静风次数累计
-                                    if (po.getPointValueInDouble() < 3.0) {
-                                        ws_dayjfcs++;
-                                        lastvalue=po.getPointValueInDouble();
-                                    }
-
-                                    ws_fsls.add(fspointls.get(i).getPointValueInDouble());
-                                    ws_fxls.add(fxpointls.get(i).getPointValueInDouble());
-
-                                    ws_dayfcs++;
+                    }
+                }
+                //南西南
+                else if (fx >= 191.26 && fx <= 213.75) {
+
+                    if (!fspointls.isEmpty()) {
+                        //切入切出统计
+                        //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
+
+                        double lastvalue = -1;
+                        for (PointData po : fspointls) {
+                            //小风切入风速
+                            // double xfqr = peiost.getDayInputSmall();
+
+                            if (lastvalue != po.getPointValueInDouble()) {
+                                //小于小风切入算静风次数累计
+                                if (po.getPointValueInDouble() < 3.0) {
+                                    sws_dayjfcs++;
+                                    lastvalue=po.getPointValueInDouble();
                                 }
 
+                                sws_fsls.add(fspointls.get(i).getPointValueInDouble());
+                                sws_fxls.add(fxpointls.get(i).getPointValueInDouble());
+
+                                sws_dayfcs++;
                             }
 
                         }
-                    }
-                    //西西南
-                    else if (fx >= 236.26 && fx <= 258.75) {
-
-                        if (!fspointls.isEmpty()) {
-                            //切入切出统计
-                            //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
 
-                            double lastvalue = -1;
-                            for (PointData po : fspointls) {
-                                //小风切入风速
-                               // double xfqr = peiost.getDayInputSmall();
-
-                                if (lastvalue != po.getPointValueInDouble()) {
-                                    //小于小风切入算静风次数累计
-                                    if (po.getPointValueInDouble() < 3.0) {
-                                        wws_dayjfcs++;
-                                        lastvalue=po.getPointValueInDouble();
-                                    }
-
-                                    wws_fsls.add(fspointls.get(i).getPointValueInDouble());
-                                    wws_fxls.add(fxpointls.get(i).getPointValueInDouble());
-
-                                    wws_dayfcs++;
+                    }
+                }
+                //西南
+                else if (fx >= 213.76 && fx <= 236.25) {
+
+                    if (!fspointls.isEmpty()) {
+                        //切入切出统计
+                        //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
+
+                        double lastvalue = -1;
+                        for (PointData po : fspointls) {
+                            //小风切入风速
+                            // double xfqr = peiost.getDayInputSmall();
+
+                            if (lastvalue != po.getPointValueInDouble()) {
+                                //小于小风切入算静风次数累计
+                                if (po.getPointValueInDouble() < 3.0) {
+                                    ws_dayjfcs++;
+                                    lastvalue=po.getPointValueInDouble();
                                 }
 
+                                ws_fsls.add(fspointls.get(i).getPointValueInDouble());
+                                ws_fxls.add(fxpointls.get(i).getPointValueInDouble());
+
+                                ws_dayfcs++;
                             }
 
                         }
-                    }
-                    //西
-                    else if (fx >= 258.76 && fx <= 281.25) {
 
-                        if (!fspointls.isEmpty()) {
-                            //切入切出统计
-                            //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
-
-                            double lastvalue = -1;
-                            for (PointData po : fspointls) {
-                                //小风切入风速
-                               // double xfqr = peiost.getDayInputSmall();
-
-                                if (lastvalue != po.getPointValueInDouble()) {
-                                    //小于小风切入算静风次数累计
-                                    if (po.getPointValueInDouble() < 3.0) {
-                                        w_dayjfcs++;
-                                        lastvalue=po.getPointValueInDouble();
-                                    }
-
-                                    w_fsls.add(fspointls.get(i).getPointValueInDouble());
-                                    w_fxls.add(fxpointls.get(i).getPointValueInDouble());
-
-                                    w_dayfcs++;
+                    }
+                }
+                //西西南
+                else if (fx >= 236.26 && fx <= 258.75) {
+
+                    if (!fspointls.isEmpty()) {
+                        //切入切出统计
+                        //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
+
+                        double lastvalue = -1;
+                        for (PointData po : fspointls) {
+                            //小风切入风速
+                            // double xfqr = peiost.getDayInputSmall();
+
+                            if (lastvalue != po.getPointValueInDouble()) {
+                                //小于小风切入算静风次数累计
+                                if (po.getPointValueInDouble() < 3.0) {
+                                    wws_dayjfcs++;
+                                    lastvalue=po.getPointValueInDouble();
                                 }
 
+                                wws_fsls.add(fspointls.get(i).getPointValueInDouble());
+                                wws_fxls.add(fxpointls.get(i).getPointValueInDouble());
+
+                                wws_dayfcs++;
                             }
 
                         }
-                    }
-                    //西西北
-                    else if (fx >= 281.26 && fx <= 303.75) {
 
-                        if (!fspointls.isEmpty()) {
-                            //切入切出统计
-                            //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
+                    }
+                }
+                //西
+                else if (fx >= 258.76 && fx <= 281.25) {
+
+                    if (!fspointls.isEmpty()) {
+                        //切入切出统计
+                        //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
+
+                        double lastvalue = -1;
+                        for (PointData po : fspointls) {
+                            //小风切入风速
+                            // double xfqr = peiost.getDayInputSmall();
+
+                            if (lastvalue != po.getPointValueInDouble()) {
+                                //小于小风切入算静风次数累计
+                                if (po.getPointValueInDouble() < 3.0) {
+                                    w_dayjfcs++;
+                                    lastvalue=po.getPointValueInDouble();
+                                }
 
-                            double lastvalue = -1;
-                            for (PointData po : fspointls) {
-                                //小风切入风速
-                               // double xfqr = peiost.getDayInputSmall();
+                                w_fsls.add(fspointls.get(i).getPointValueInDouble());
+                                w_fxls.add(fxpointls.get(i).getPointValueInDouble());
 
-                                if (lastvalue != po.getPointValueInDouble()) {
-                                    //小于小风切入算静风次数累计
-                                    if (po.getPointValueInDouble() < 3.0) {
-                                        wwn_dayjfcs++;
-                                        lastvalue=po.getPointValueInDouble();
-                                    }
+                                w_dayfcs++;
+                            }
 
-                                    wwn_fsls.add(fspointls.get(i).getPointValueInDouble());
-                                    wwn_fxls.add(fxpointls.get(i).getPointValueInDouble());
+                        }
 
-                                    wwn_dayfcs++;
+                    }
+                }
+                //西西北
+                else if (fx >= 281.26 && fx <= 303.75) {
+
+                    if (!fspointls.isEmpty()) {
+                        //切入切出统计
+                        //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
+
+                        double lastvalue = -1;
+                        for (PointData po : fspointls) {
+                            //小风切入风速
+                            // double xfqr = peiost.getDayInputSmall();
+
+                            if (lastvalue != po.getPointValueInDouble()) {
+                                //小于小风切入算静风次数累计
+                                if (po.getPointValueInDouble() < 3.0) {
+                                    wwn_dayjfcs++;
+                                    lastvalue=po.getPointValueInDouble();
                                 }
 
+                                wwn_fsls.add(fspointls.get(i).getPointValueInDouble());
+                                wwn_fxls.add(fxpointls.get(i).getPointValueInDouble());
+
+                                wwn_dayfcs++;
                             }
 
                         }
-                    }
-                    //西北
-                    else if (fx >= 303.76 && fx <= 326.25) {
 
+                    }
+                }
+                //西北
+                else if (fx >= 303.76 && fx <= 326.25) {
 
-                        if (!fspointls.isEmpty()) {
-                            //切入切出统计
-                            //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
-
-                            double lastvalue = -1;
-                            for (PointData po : fspointls) {
-                                //小风切入风速
-                               // double xfqr = peiost.getDayInputSmall();
 
-                                if (lastvalue != po.getPointValueInDouble()) {
-                                    //小于小风切入算静风次数累计
-                                    if (po.getPointValueInDouble() < 3.0) {
-                                        wn_dayjfcs++;
-                                        lastvalue=po.getPointValueInDouble();
-                                    }
+                    if (!fspointls.isEmpty()) {
+                        //切入切出统计
+                        //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
 
-                                    wn_fsls.add(fspointls.get(i).getPointValueInDouble());
-                                    wn_fxls.add(fxpointls.get(i).getPointValueInDouble());
+                        double lastvalue = -1;
+                        for (PointData po : fspointls) {
+                            //小风切入风速
+                            // double xfqr = peiost.getDayInputSmall();
 
-                                    wn_dayfcs++;
+                            if (lastvalue != po.getPointValueInDouble()) {
+                                //小于小风切入算静风次数累计
+                                if (po.getPointValueInDouble() < 3.0) {
+                                    wn_dayjfcs++;
+                                    lastvalue=po.getPointValueInDouble();
                                 }
 
+                                wn_fsls.add(fspointls.get(i).getPointValueInDouble());
+                                wn_fxls.add(fxpointls.get(i).getPointValueInDouble());
+
+                                wn_dayfcs++;
                             }
 
                         }
-                    }
-                    //北西北
-                    else if (fx >= 326.26 && fx <= 348.75) {
-
 
-                        if (!fspointls.isEmpty()) {
-                            //切入切出统计
-                            //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
+                    }
+                }
+                //北西北
+                else if (fx >= 326.26 && fx <= 348.75) {
 
-                            double lastvalue = -1;
-                            for (PointData po : fspointls) {
-                                //小风切入风速
-                               // double xfqr = peiost.getDayInputSmall();
 
-                                if (lastvalue != po.getPointValueInDouble()) {
-                                    //小于小风切入算静风次数累计
-                                    if (po.getPointValueInDouble() < 3.0) {
-                                        nwn_dayjfcs++;
-                                        lastvalue=po.getPointValueInDouble();
-                                    }
+                    if (!fspointls.isEmpty()) {
+                        //切入切出统计
+                        //ProEconInOrOutSpeedTotal peiost = peioomap.get(wt.getId());
 
-                                    nwn_fsls.add(fspointls.get(i).getPointValueInDouble());
-                                    nwn_fxls.add(fxpointls.get(i).getPointValueInDouble());
+                        double lastvalue = -1;
+                        for (PointData po : fspointls) {
+                            //小风切入风速
+                            // double xfqr = peiost.getDayInputSmall();
 
-                                    nwn_dayfcs++;
+                            if (lastvalue != po.getPointValueInDouble()) {
+                                //小于小风切入算静风次数累计
+                                if (po.getPointValueInDouble() < 3.0) {
+                                    nwn_dayjfcs++;
+                                    lastvalue=po.getPointValueInDouble();
                                 }
 
+                                nwn_fsls.add(fspointls.get(i).getPointValueInDouble());
+                                nwn_fxls.add(fxpointls.get(i).getPointValueInDouble());
+
+                                nwn_dayfcs++;
                             }
 
                         }
-                    }
 
+                    }
                 }
+
             }
         }
-
         //日静风次数
         pewp.setCa(dayjfcs);
         //日风次数

+ 5 - 5
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/AccessStatusService.java

@@ -77,7 +77,7 @@ public class AccessStatusService {
 
             try {
                 double qczt = edosUtil.getSectionData(qcztPoint, currentDate.getTime()).getPointValueInDouble();
-                if (qczt == 6){
+                if (qczt != 6){
                     fjzt = 1;
                 }
 
@@ -88,7 +88,7 @@ public class AccessStatusService {
                 ProBasicMeterPoint proBasicMeterPoint = swdlOptional.get();
                 try {
                     Long pointTime = edosUtil.getRealData(proBasicMeterPoint.getNemCode()).getPointTime();
-                    if ((currentDate.getTime() - pointTime) / 1000 > Integer.parseInt(second)){
+                    if ((currentDate.getTime() - pointTime) / 1000 < Integer.parseInt(second)){
                         djlzt = 1;
                     }
                 } catch (Exception e) {
@@ -100,7 +100,7 @@ public class AccessStatusService {
                 ProBasicPowerstationPoint proBasicPowerstationPoint = basicPowerstationPointMap.get(ContantXk.FCCFTWD);
                 try {
                     Long pointTime = edosUtil.getRealData(proBasicPowerstationPoint.getNemCode()).getPointTime();
-                    if ((currentDate.getTime() - pointTime) / 1000 > Integer.parseInt(second)){
+                    if ((currentDate.getTime() - pointTime) / 1000 < Integer.parseInt(second)){
                         cftzt = 1;
                     }
                 } catch (Exception e) {
@@ -112,7 +112,7 @@ public class AccessStatusService {
                 ProBasicPowerstationPoint agcpowerstationPoint = basicPowerstationPointMap.get(ContantXk.TPOINT_WP_CXGL);
                 try {
                     Long pointTime = edosUtil.getRealData(agcpowerstationPoint.getNemCode()).getPointTime();
-                    if ((currentDate.getTime() - pointTime) / 1000 > Integer.parseInt(second)){
+                    if ((currentDate.getTime() - pointTime) / 1000 < Integer.parseInt(second)){
                         agczt = 1;
                     }
                 } catch (Exception e) {
@@ -121,7 +121,7 @@ public class AccessStatusService {
                 ProBasicPowerstationPoint glycpowerstationPoint = basicPowerstationPointMap.get(ContantXk.TPOINT_WP_YCGL);
                 try {
                     Long pointTime = edosUtil.getRealData(glycpowerstationPoint.getNemCode()).getPointTime();
-                    if ((currentDate.getTime() - pointTime) / 1000 > Integer.parseInt(second)){
+                    if ((currentDate.getTime() - pointTime) / 1000 < Integer.parseInt(second)){
                         glyczt = 1;
                     }
                 } catch (Exception e) {

+ 4 - 3
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/RealtimeService.java

@@ -89,10 +89,11 @@ public class RealtimeService {
             }
             PointData ssbfPointDate = null;
             if (mxzt == 12 || mxzt == 13) {
-                //补风算法(后续补充,暂时用0)
-                ssbfPointDate = PointUtil.createPointData(currentDate, 0, ssbfPoint.getNemCode(), ssbfPoint.getName());
+                //补风算法(后续补充)
+                ssbf = speed>12?12:speed;
+                ssbfPointDate = PointUtil.createPointData(currentDate, ssbf, ssbfPoint.getNemCode(), ssbfPoint.getName());
             } else {
-                ssbf = speed;
+                ssbf = speed>12?12:speed;
                 ssbfPointDate = PointUtil.createPointData(currentDate, ssbf, ssbfPoint.getNemCode(), ssbfPoint.getName());
             }
             wtResultList.add(ssbfPointDate);

Разница между файлами не показана из-за своего большого размера
+ 224 - 224
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/RegionCalService.java


+ 95 - 68
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/RegionCalreService.java

@@ -13,10 +13,7 @@ import com.gyee.generation.util.realtimesource.IEdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.stream.Collectors;
@@ -90,7 +87,7 @@ public class RegionCalreService  {
             zsspjfsPoint = powerstationPointMap.get(ContantXk.SSPJFS);
             zsspjgzdPoint = powerstationPointMap.get(ContantXk.SSPJGZD);
         }
-
+        ProBasicPowerstationPoint zaqtsPoint = powerstationPointMap.get(ContantXk.AQTS);
         ProBasicPowerstationPoint zsszglPoint = powerstationPointMap.get(ContantXk.SSZGL);
         ProBasicPowerstationPoint zsszllglPoint = powerstationPointMap.get(ContantXk.SSZLLGL);
         ProBasicPowerstationPoint zsszbzglPoint = powerstationPointMap.get(ContantXk.SSZBZGL);
@@ -156,6 +153,8 @@ public class RegionCalreService  {
         AtomicInteger gcComCount = new AtomicInteger();
         AtomicInteger finalGcComCount = gcComCount;
         AtomicInteger finalFcComCount = fcComCount;
+
+        List<Double> aqtsList = new ArrayList<>();
         companys.stream().forEach(company->{
             if (company.getJrCapacity()>0){
                 finalGcComCount.getAndIncrement();
@@ -179,6 +178,8 @@ public class RegionCalreService  {
                     sspjgzdPoint = powerstationPointMap1.get(ContantXk.SSPJGZD);
 
                 }
+
+                ProBasicPowerstationPoint aqtsPoint = powerstationPointMap1.get(ContantXk.AQTS);
                 ProBasicPowerstationPoint sszglPoint = powerstationPointMap1.get(ContantXk.SSZGL);
                 ProBasicPowerstationPoint sszllglPoint = powerstationPointMap1.get(ContantXk.SSZLLGL);
                 ProBasicPowerstationPoint sszbzglPoint = powerstationPointMap1.get(ContantXk.SSZBZGL);
@@ -209,11 +210,18 @@ public class RegionCalreService  {
                 ProBasicPowerstationPoint sltsPoint = powerstationPointMap1.get(ContantXk.SLTS);
                 ProBasicPowerstationPoint lxtsPoint = powerstationPointMap1.get(ContantXk.TXZDTS);
 
+                try {
+                    double temp = edosUtil.getSectionData(aqtsPoint, currentDate.getTime()).getPointValueInDouble();
+                    aqtsList.add(temp);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+
                 if (type.equals("-1")){
                     ProBasicPowerstationPoint finalSspjfsfsPoint = sspjfsPoint;
                     sspjfs.updateAndGet(v -> {
                         try {
-                            return new Double((double) (v + edosUtil.getSectionData(finalSspjfsfsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                            return new Double((double) (v + edosUtil.getSectionData(finalSspjfsfsPoint, currentDate.getTime()).getPointValueInDouble()));
                         } catch (Exception e) {
                             e.printStackTrace();
                         }
@@ -225,7 +233,7 @@ public class RegionCalreService  {
                     ProBasicPowerstationPoint finalSspjgzdPoint = sspjgzdPoint;
                     sspjgzd.updateAndGet(v -> {
                         try {
-                            return new Double((double) (v + edosUtil.getSectionData(finalSspjgzdPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                            return new Double((double) (v + edosUtil.getSectionData(finalSspjgzdPoint, currentDate.getTime()).getPointValueInDouble()));
                         } catch (Exception e) {
                             e.printStackTrace();
                         }
@@ -236,7 +244,7 @@ public class RegionCalreService  {
                     ProBasicPowerstationPoint finalSspjfsfsPoint = sspjfsPoint;
                     sspjfs.updateAndGet(v -> {
                         try {
-                            return new Double((double) (v + edosUtil.getSectionData(finalSspjfsfsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                            return new Double((double) (v + edosUtil.getSectionData(finalSspjfsfsPoint, currentDate.getTime()).getPointValueInDouble()));
                         } catch (Exception e) {
                             e.printStackTrace();
                         }
@@ -245,7 +253,7 @@ public class RegionCalreService  {
                     ProBasicPowerstationPoint finalSspjgzdPoint = sspjgzdPoint;
                     sspjgzd.updateAndGet(v -> {
                         try {
-                            return new Double((double) (v + edosUtil.getSectionData(finalSspjgzdPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                            return new Double((double) (v + edosUtil.getSectionData(finalSspjgzdPoint, currentDate.getTime()).getPointValueInDouble()));
                         } catch (Exception e) {
                             e.printStackTrace();
                         }
@@ -254,7 +262,7 @@ public class RegionCalreService  {
                 }
                 sszgl.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(sszglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(sszglPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -262,7 +270,7 @@ public class RegionCalreService  {
                 });
                 zllgl.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(sszllglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(sszllglPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -270,7 +278,7 @@ public class RegionCalreService  {
                 });
                 zbzgl.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(sszbzglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(sszbzglPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -278,7 +286,7 @@ public class RegionCalreService  {
                 });
                 znhglzs.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(ssznhglzsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(ssznhglzsPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -286,7 +294,7 @@ public class RegionCalreService  {
                 });
                 zzygl.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(sszzyglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(sszzyglPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -294,7 +302,7 @@ public class RegionCalreService  {
                 });
                 zkygl.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(sszkyglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(sszkyglPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -302,7 +310,7 @@ public class RegionCalreService  {
                 });
                 zycgl.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(sszycglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(sszycglPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -313,7 +321,7 @@ public class RegionCalreService  {
 
                 gztsmx.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(gztsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(gztsmxPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -321,7 +329,7 @@ public class RegionCalreService  {
                 });
                 cngzmx.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(cnslmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(cnslmxPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -329,7 +337,7 @@ public class RegionCalreService  {
                 });
                 jxtsmx.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(jxtsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(jxtsmxPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -337,7 +345,7 @@ public class RegionCalreService  {
                 });
                 cnjxmx.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(cnjxmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(cnjxmxPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -345,7 +353,7 @@ public class RegionCalreService  {
                 });
                 djtsmx.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(djtsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(djtsmxPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -353,7 +361,7 @@ public class RegionCalreService  {
                 });
                 qxjclmx.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(qxjclmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(qxjclmxPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -361,7 +369,7 @@ public class RegionCalreService  {
                 });
                 sdtjmx.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(sdtjmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(sdtjmxPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -369,7 +377,7 @@ public class RegionCalreService  {
                 });
                 xntsmx.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(xntsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(xntsmxPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -377,7 +385,7 @@ public class RegionCalreService  {
                 });
                 xdtjmx.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(xdtjmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(xdtjmxPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -385,7 +393,7 @@ public class RegionCalreService  {
                 });
                 xdjclmx.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(xdjclmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(xdjclmxPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -393,7 +401,7 @@ public class RegionCalreService  {
                 });
                 cwsldwmx.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(cwsldwmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(cwsldwmxPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -401,7 +409,7 @@ public class RegionCalreService  {
                 });
                 cwsltqmx.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(cwsltqmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(cwsltqmxPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -409,7 +417,7 @@ public class RegionCalreService  {
                 });
                 lxtsmx.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(lxtsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(lxtsmxPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -417,7 +425,7 @@ public class RegionCalreService  {
                 });
                 txzdmx.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(txzdmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(txzdmxPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -425,7 +433,7 @@ public class RegionCalreService  {
                 });
                 djts.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(djtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(djtsPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -433,7 +441,7 @@ public class RegionCalreService  {
                 });
                 yxts.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(yxtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(yxtsPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -441,7 +449,7 @@ public class RegionCalreService  {
                 });
                 gzts.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(gztsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(gztsPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -449,7 +457,7 @@ public class RegionCalreService  {
                 });
                 whts.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(whtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(whtsPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -457,7 +465,7 @@ public class RegionCalreService  {
                 });
                 xdts.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(xdtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(xdtsPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -465,7 +473,7 @@ public class RegionCalreService  {
                 });
                 slts.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(sltsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(sltsPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -473,7 +481,7 @@ public class RegionCalreService  {
                 });
                 lxts.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(lxtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(lxtsPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -498,6 +506,9 @@ public class RegionCalreService  {
             resultList.add(PointUtil.createPointData(currentDate,sspjfs.get()/fcComCount.doubleValue(),zsspjfsPoint.getNemCode(),zsspjfsPoint.getName()));
             resultList.add(PointUtil.createPointData(currentDate,sspjgzd.get()/gcComCount.doubleValue(),zsspjgzdPoint.getNemCode(),zsspjgzdPoint.getName()));
         }
+        Double aqts = Collections.max(aqtsList);
+
+        resultList.add(PointUtil.createPointData(currentDate,aqts,zaqtsPoint.getNemCode(),zaqtsPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,sszgl.get(),zsszglPoint.getNemCode(),zsszglPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,zllgl.get(),zsszllglPoint.getNemCode(),zsszllglPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,zbzgl.get(),zsszbzglPoint.getNemCode(),zsszbzglPoint.getName()));
@@ -550,6 +561,8 @@ public class RegionCalreService  {
             zsspjgzdPoint = powerstationPointMap.get(ContantXk.SSPJGZD);
         }
 
+        ProBasicPowerstationPoint zaqtsPoint = powerstationPointMap.get(ContantXk.AQTS);
+
         ProBasicPowerstationPoint zsszglPoint = powerstationPointMap.get(ContantXk.SSZGL);
         ProBasicPowerstationPoint zsszllglPoint = powerstationPointMap.get(ContantXk.SSZLLGL);
         ProBasicPowerstationPoint zsszbzglPoint = powerstationPointMap.get(ContantXk.SSZBZGL);
@@ -611,8 +624,10 @@ public class RegionCalreService  {
         AtomicReference<Double> slts = new AtomicReference<>((double) 0);
         AtomicReference<Double> djts = new AtomicReference<>((double) 0);
 
-
+        List<Double> aqtsList = new ArrayList<>();
         wps.stream().forEach(wp->{
+
+
             Map<String, ProBasicPowerstationPoint> powerstationPointMap1 = wppointmap.get(wp.getId());
 
             ProBasicPowerstationPoint sspjfsPoint = null;
@@ -625,6 +640,7 @@ public class RegionCalreService  {
                 sspjgzdPoint = powerstationPointMap1.get(ContantXk.SSPJGZD);
 
             }
+            ProBasicPowerstationPoint aqtsPoint = powerstationPointMap1.get(ContantXk.AQTS);
 
             ProBasicPowerstationPoint sszglPoint = powerstationPointMap1.get(ContantXk.SSZGL);
             ProBasicPowerstationPoint sszllglPoint = powerstationPointMap1.get(ContantXk.SSZLLGL);
@@ -656,11 +672,19 @@ public class RegionCalreService  {
             ProBasicPowerstationPoint sltsPoint = powerstationPointMap1.get(ContantXk.SLTS);
             ProBasicPowerstationPoint lxtsPoint = powerstationPointMap1.get(ContantXk.TXZDTS);
 
+
+            try {
+                double temp = edosUtil.getSectionData(aqtsPoint, currentDate.getTime()).getPointValueInDouble();
+                aqtsList.add(temp);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+
             if (wp.getId().contains("_FDC_")){
                 ProBasicPowerstationPoint finalSspjfsPoint = sspjfsPoint;
                 sspjfs.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(finalSspjfsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(finalSspjfsPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -671,7 +695,7 @@ public class RegionCalreService  {
                 ProBasicPowerstationPoint finalSspjgzdPoint = sspjgzdPoint;
                 sspjgzd.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getSectionData(finalSspjgzdPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                        return new Double((double) (v + edosUtil.getSectionData(finalSspjgzdPoint, currentDate.getTime()).getPointValueInDouble()));
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -680,7 +704,7 @@ public class RegionCalreService  {
             }
             sszgl.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(sszglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(sszglPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -688,7 +712,7 @@ public class RegionCalreService  {
             });
             zllgl.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(sszllglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(sszllglPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -696,7 +720,7 @@ public class RegionCalreService  {
             });
             zbzgl.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(sszbzglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(sszbzglPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -704,7 +728,7 @@ public class RegionCalreService  {
             });
             znhglzs.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(ssznhglzsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(ssznhglzsPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -712,7 +736,7 @@ public class RegionCalreService  {
             });
             zzygl.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(sszzyglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(sszzyglPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -720,7 +744,7 @@ public class RegionCalreService  {
             });
             zkygl.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(sszkyglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(sszkyglPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -728,7 +752,7 @@ public class RegionCalreService  {
             });
             zycgl.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(sszycglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(sszycglPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -740,7 +764,7 @@ public class RegionCalreService  {
 
             gztsmx.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(gztsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(gztsmxPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -748,7 +772,7 @@ public class RegionCalreService  {
             });
             cngzmx.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(cnslmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(cnslmxPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -756,7 +780,7 @@ public class RegionCalreService  {
             });
             jxtsmx.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(jxtsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(jxtsmxPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -764,7 +788,7 @@ public class RegionCalreService  {
             });
             cnjxmx.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(cnjxmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(cnjxmxPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -772,7 +796,7 @@ public class RegionCalreService  {
             });
             djtsmx.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(djtsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(djtsmxPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -780,7 +804,7 @@ public class RegionCalreService  {
             });
             qxjclmx.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(qxjclmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(qxjclmxPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -788,7 +812,7 @@ public class RegionCalreService  {
             });
             sdtjmx.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(sdtjmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(sdtjmxPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -796,7 +820,7 @@ public class RegionCalreService  {
             });
             xntsmx.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(xntsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(xntsmxPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -804,7 +828,7 @@ public class RegionCalreService  {
             });
             xdtjmx.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(xdtjmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(xdtjmxPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -812,7 +836,7 @@ public class RegionCalreService  {
             });
             xdjclmx.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(xdjclmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(xdjclmxPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -820,7 +844,7 @@ public class RegionCalreService  {
             });
             cwsldwmx.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(cwsldwmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(cwsldwmxPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -828,7 +852,7 @@ public class RegionCalreService  {
             });
             cwsltqmx.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(cwsltqmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(cwsltqmxPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -836,7 +860,7 @@ public class RegionCalreService  {
             });
             lxtsmx.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(lxtsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(lxtsmxPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -844,7 +868,7 @@ public class RegionCalreService  {
             });
             txzdmx.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(txzdmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(txzdmxPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -852,7 +876,7 @@ public class RegionCalreService  {
             });
             djts.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(djtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(djtsPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -860,7 +884,7 @@ public class RegionCalreService  {
             });
             yxts.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(yxtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(yxtsPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -868,7 +892,7 @@ public class RegionCalreService  {
             });
             gzts.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(gztsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(gztsPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -876,7 +900,7 @@ public class RegionCalreService  {
             });
             whts.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(whtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(whtsPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -884,7 +908,7 @@ public class RegionCalreService  {
             });
             xdts.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(xdtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(xdtsPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -892,7 +916,7 @@ public class RegionCalreService  {
             });
             slts.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(sltsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(sltsPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -900,7 +924,7 @@ public class RegionCalreService  {
             });
             lxts.updateAndGet(v -> {
                 try {
-                    return new Double((double) (v + edosUtil.getSectionData(lxtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
+                    return new Double((double) (v + edosUtil.getSectionData(lxtsPoint, currentDate.getTime()).getPointValueInDouble()));
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -917,6 +941,9 @@ public class RegionCalreService  {
             resultList.add(PointUtil.createPointData(currentDate,sspjfs.get()/fdcsize,zsspjfsPoint.getNemCode(),zsspjfsPoint.getName()));
             resultList.add(PointUtil.createPointData(currentDate,sspjgzd.get()/gdcsize,zsspjgzdPoint.getNemCode(),zsspjgzdPoint.getName()));
         }
+
+        Double aqts = Collections.max(aqtsList);
+        resultList.add(PointUtil.createPointData(currentDate,aqts,zaqtsPoint.getNemCode(),zaqtsPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,sszgl.get(),zsszglPoint.getNemCode(),zsszglPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,zllgl.get(),zsszllglPoint.getNemCode(),zsszllglPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,zbzgl.get(),zsszbzglPoint.getNemCode(),zsszbzglPoint.getName()));

+ 56 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/SafetyDayService.java

@@ -0,0 +1,56 @@
+package com.gyee.generation.service.realtimelibrary;
+
+import com.gyee.common.contant.ContantXk;
+import com.gyee.common.model.PointData;
+import com.gyee.common.model.StringUtils;
+import com.gyee.common.util.DateUtils;
+import com.gyee.generation.init.CacheContext;
+import com.gyee.generation.model.auto.ProBasicPowerstation;
+import com.gyee.generation.model.auto.ProBasicPowerstationPoint;
+import com.gyee.generation.util.PointUtil;
+import com.gyee.generation.util.realtimesource.IEdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/*
+@author   谢生杰
+@date   2022/12/7-15:54
+*/
+@Service
+public class SafetyDayService {
+    @Resource
+    private IEdosUtil edosUtil;
+
+    public void saveSafetyday() throws Exception {
+
+        Date currentDate = DateUtils.getCurrentDate();
+
+        List<ProBasicPowerstation> wpls = CacheContext.wpls;
+        Map<String, Map<String, ProBasicPowerstationPoint>> wppointmap = CacheContext.wppointmap;
+
+        List<PointData> resultList = new ArrayList<>();
+
+        wpls.stream().forEach(wp->{
+            Map<String, ProBasicPowerstationPoint> powerstationPointMap = wppointmap.get(wp.getId());
+            ProBasicPowerstationPoint powerstationPoint = powerstationPointMap.get(ContantXk.AQTS);
+            if (StringUtils.isNotNull(powerstationPoint)){
+                double aqts = 0;
+                try {
+                    aqts = edosUtil.getSectionData(powerstationPoint, currentDate.getTime()).getPointValueInDouble();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+                aqts ++;
+                PointData pointData = PointUtil.createPointData(currentDate, aqts, powerstationPoint.getNemCode(), powerstationPoint.getName());
+                resultList.add(pointData);
+            }
+        });
+
+        edosUtil.sendMultiPoint(resultList);
+    }
+}

+ 3 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/StatusService.java

@@ -297,6 +297,7 @@ public class StatusService {
                 }
                 else {
                     List<PointData> interruptionRealData = edosUtil.getRealData(interruptionList);
+                    long time = currentDate.getTime();
                     List<PointData> collect = interruptionRealData.stream().filter(i -> (currentDate.getTime() - i.getPointTime()) / 1000 > Integer.parseInt(second)).collect(Collectors.toList());
                     if (collect.size()!=interruptionRealData.size()){
                         double ssgl = edosUtil.getSectionData(ssglPoint,currentDate.getTime()).getPointValueInDouble();
@@ -715,12 +716,12 @@ public class StatusService {
                 //离线台数12
                 ProBasicPowerstationPoint lxnumPointNew = projectmap.get(ContantXk.LXTSMX);
                 PointData lxnumPoint = PointUtil.createPointData(currentDate,prolxnum.get(),lxnumPointNew.getNemCode(),lxnumPointNew.getName());
-                wpdwslnum.addAndGet(prolxnum.intValue());
+                wplxnum.addAndGet(prolxnum.intValue());
                 resultList.add(lxnumPoint);
                 //未知离线12
                 ProBasicPowerstationPoint wznumPointNew = projectmap.get(ContantXk.TXZDTSMX);
                 PointData wznumPoint = PointUtil.createPointData(currentDate,prowznum.get(),wznumPointNew.getNemCode(),wznumPointNew.getName());
-                wphjslnum.addAndGet(prowznum.intValue());
+                wpwznum.addAndGet(prowznum.intValue());
                 resultList.add(wznumPoint);
                 //离线台数6
                 ProBasicPowerstationPoint txzdPointNew = projectmap.get(ContantXk.TXZDTS);

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

@@ -24,14 +24,10 @@ import java.util.Map;
 @Service
 public class TheoreticalPowerService {
 
-    @Resource
-    private RedisService redisService;
-    @Resource
-    private IProBasicModelPowerRdService proBasicModelPowerRdService;
+
     @Resource
     private IProEconWtPowerCurveFittingService proEconWtPowerCurveFittingService;
-    @Resource
-    private IEdosUtil edosUtil;
+
     /**
      * 缓存自算功率,最优功率
      * 1个月

+ 20 - 1
realtime/generationXK-service/src/main/java/com/gyee/generation/task/SaticScheduleCALTask.java

@@ -41,6 +41,8 @@ public class SaticScheduleCALTask {
     private RegionCalreService regionCalreService;
     @Resource
     private RegionCalService regionCalService;
+    @Resource
+    private SafetyDayService safetyDayService;
 
     /**
      * 全场状态,接入状态,总预测功率
@@ -112,7 +114,7 @@ public class SaticScheduleCALTask {
 
 
     /**
-     * 电计量计算指标
+     * 实时计算指标
      * 每秒执行一次
      */
     @XxlJob("realtime_CAL")
@@ -162,6 +164,23 @@ public class SaticScheduleCALTask {
         XxlJobHelper.log("自算功率更新调度任务处理完成!........");
     }
 
+
+    /**
+     * 安全天数
+     * 每天执行一次
+     */
+    @XxlJob("safetyday_CAL")
+    public void safetyday_CAL()  {
+
+        XxlJobHelper.log("安全天数程序执行开始!........");
+        try {
+            safetyDayService.saveSafetyday();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        XxlJobHelper.log("安全天数调度任务处理完成!........");
+    }
+
     /**
      * 区域公司实时指标
      * 每秒执行一次

+ 33 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/task/SaticSchedulePgTask.java

@@ -67,6 +67,33 @@ public class SaticSchedulePgTask {
     @Resource
     private WtwindDayInfoService wtwindDayInfoService;
 
+    @Resource
+    private PowerCurveFittingByTimeGfService powerCurveFittingByTimeGfService;
+
+
+    @Resource
+    private EquipmentInfo15minuteService equipmentInfo15minuteService;
+
+
+
+    //3.添加定时任务
+    /**
+     * 切入切出统计
+     * 每分钟执行一次
+     */
+
+    @XxlJob("calEquipmentInfo15minute_PG")
+    public void calEquipmentInfo15minute_PG()  {
+
+
+        XxlJobHelper.log("切入切出状态切换记录调度程序执行开始!........");
+        try {
+            equipmentInfo15minuteService.calEquipmentInfo15minute(new Date());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        XxlJobHelper.log("切入切出状态切换记录调度任务处理完成!........");
+    }
 
     //3.添加定时任务
     /**
@@ -157,6 +184,12 @@ public class SaticSchedulePgTask {
             powerCurveFittingByTimeService.cureFittingMonth(date,"0");
             powerCurveFittingByTimeService.cureFittingYear(date);
 
+            powerCurveFittingByTimeGfService.cureFittingDay(date);
+            powerCurveFittingByTimeGfService.cureFittingMonth(date,"0");
+            powerCurveFittingByTimeGfService.cureFittingYear(date);
+
+
+
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 32 - 19
realtime/generationXK-service/src/main/resources/application-td.yml

@@ -1,5 +1,5 @@
 server:
-  port: 7012
+  port: 7071
   servlet:
     context-path: /
 
@@ -9,7 +9,8 @@ spring:
     allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
   #redis集群
   redis:
-    host: 10.81.3.155
+    #host: 127.0.0.1
+    host: 192.168.11.250
     port: 6379
     timeout: 100000
     #    集群环境打开下面注释,单机不需要打开
@@ -27,15 +28,18 @@ spring:
         min-idle: 0
         max-idle: 8
         max-wait: -1
-    database: 0
+    database: 9
   autoconfigure:
     exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
     driver-class-name: org.postgresql.Driver
-    url: jdbc:postgresql://10.81.3.151:5432/wisdom
-    username: gdprod
-    password: gd123
+    url: jdbc:postgresql://192.168.11.248:5432/IMS_NEM_SD?rewriteBatchedStatements=true
+    username: postgres
+    password: postgres
+    #    url: jdbc:postgresql://124.70.75.91:5432/jn_test?rewriteBatchedStatements=true
+    #    username: postgres
+    #    password: gd123
     oracle-schema=:
     #    type: com.alibaba.druid.pool.DruidDataSource
     #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
@@ -83,29 +87,38 @@ logging:
     com.example: debug
 #db url
 db:
-  url: http://10.81.3.152:8011/ts
-td:
-  url: http://localhost:8011/ts
+  #url: http://127.0.0.1:8011/ts
+  url: http://192.168.11.250:8011/ts
+  #url: http://124.70.75.91:8011/ts
 #参与计算的场站
-runWindpowerstation: YLZ_FDC
+#runWindpowerstation: SD_GDDL_WHWD_FDC_STA,SD_GDDL_WHXQ_FDC_STA,SD_GDDL_RZLX_FDC_STA,SD_GDDL_QDJN_FDC_STA,SD_SXNY_FXFC_FDC_STA,SD_SXNY_LXLN_FDC_STA,SD_SXNY_LQJS_FDC_STA,SD_SXNY_ZYFS_FDC_STA,SD_LYDL_BH2_FDC_STA,SD_GDDL_RZWL_FDC_STA,SD_SXNY_PLHS_FDC_STA,SD_SXNY_ZYXD_FDC_STA,SD_GDDL_DZXJ_FDC_STA,SD_GDDL_XTTA_FDC_STA,SD_GDDL_WFZC_FDC_STA,SD_SXNY_JNSS_FDC_STA,SD_SXNY_WFBH_FDC_STA,SD_LYDL_CG_FDC_STA,SD_LYDL_FJ_FDC_STA,SD_LYDL_YS_FDC_STA,SD_SXNY_JNCQ_FDC_STA,SD_LYDL_BH1_FDC_STA,SD_GHTZ_HZJ_GDC_STA
+runWindpowerstation: SD_GDDL_WHWD_FDC_STA
 #计算状态用ai或者di
 clauStatus:
   ai: GJY03_GC,YLZ01_GC,PTZ02_GC   #配置期次
-  di: GJY01_GC,GJY02_GC,DJY01_GC,DJY02_GC,YF01_GC,YF02_GC,HSM01_GC,PTZ01_GC,ZK01_GC,NJL01_GC
+  di: GJY01_GC,GJY02_GC,DJY01_GC,DJY02_GC,YF01_GC,YF02_GC,HSM01_GC,PTZ01_GC,ZK01_GC,NJL01_GC,YTY01_GC,PDL01_GC
 #判断数据终端
 second: 1800
 #判断降出力
-AI134: 17.4    #叶轮转速给定
+AI110: 17.4    #叶轮转速给定
 AI178: 17.4    #转矩给定
 #AI443:容量
 
-#计算电量直接取,如果不是1就是相减算
-typeOfElectric:
-  #直接取
-  direct: GJY02_GC,YF01_GC,YF02_GC,HSM01_GC,PTZ01_GC,ZK01_GC
-
-
-
+#功率曲线拟合
+curvefitting:
+  #维度
+  dimension: 20
+  #尺度
+  scale: 0.01
+initialcode: INITIAL
+##调用区间间隔时长,需要与XXLJOB调度时长结合,保证查询区间时长大于调度时长,单位分钟
+frequency:
+  #停机
+  shutdown: 6
+  #限电
+  powerrationing: 6
+  #切入切出
+  cutinandout: 6
 
 
 

+ 36 - 21
realtime/generationXK-service/src/main/resources/application-jn.yml

@@ -1,5 +1,5 @@
 server:
-  port: 7012
+  port: 7070
   servlet:
     context-path: /
 
@@ -9,15 +9,16 @@ spring:
     allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
   #redis集群
   redis:
-    host: 10.81.3.155
+    #host: 127.0.0.1
+    host: 192.168.11.250
     port: 6379
     timeout: 100000
     #    集群环境打开下面注释,单机不需要打开
-#    cluster:
-#      #集群信息
-#      nodes: 10.83.68.151:6379,10.83.68.152:6379,10.83.68.153:6379,10.83.68.154:6379,10.83.68.155:6379,10.83.68.156:6379,10.83.68.157:6379,10.83.68.158:6379,10.83.68.159:6379
-#      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
-#      maxRedirects: 3
+    #    cluster:
+    #      #集群信息
+    #      nodes: 10.83.68.151:6379,10.83.68.152:6379,10.83.68.153:6379,10.83.68.154:6379,10.83.68.155:6379,10.83.68.156:6379,10.83.68.157:6379,10.83.68.158:6379,10.83.68.159:6379
+    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
+    #      maxRedirects: 3
     password:
     application:
       name: test
@@ -27,15 +28,18 @@ spring:
         min-idle: 0
         max-idle: 8
         max-wait: -1
-    database: 0
+    database: 9
   autoconfigure:
     exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
     driver-class-name: org.postgresql.Driver
-    url: jdbc:postgresql://10.81.3.151:5432/wisdom
-    username: gdprod
-    password: gd123
+    url: jdbc:postgresql://192.168.11.248:5432/IMS_NEM_SD?rewriteBatchedStatements=true
+    username: postgres
+    password: postgres
+    #    url: jdbc:postgresql://124.70.75.91:5432/jn_test?rewriteBatchedStatements=true
+    #    username: postgres
+    #    password: gd123
     oracle-schema=:
     #    type: com.alibaba.druid.pool.DruidDataSource
     #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
@@ -83,9 +87,12 @@ logging:
     com.example: debug
 #db url
 db:
-  url: http://10.81.3.152:8011/ts
+  #url: http://127.0.0.1:8011/ts
+  url: http://192.168.11.250:8011/ts
+  #url: http://124.70.75.91:8011/ts
 #参与计算的场站
-runWindpowerstation: GJY_FDC,DJY_FDC,YF_FDC,HSM_FDC,PTZ_FDC,YLZ_FDC,ZK_FDC,NJL_FDC,YTY_FDC,PDL_FDC
+runWindpowerstation: SD_GDDL_WHWD_FDC_STA,SD_GDDL_WHXQ_FDC_STA,SD_GDDL_RZLX_FDC_STA,SD_GDDL_QDJN_FDC_STA,SD_SXNY_FXFC_FDC_STA,SD_SXNY_LXLN_FDC_STA,SD_SXNY_LQJS_FDC_STA,SD_SXNY_ZYFS_FDC_STA,SD_LYDL_BH2_FDC_STA,SD_GDDL_RZWL_FDC_STA,SD_SXNY_PLHS_FDC_STA,SD_SXNY_ZYXD_FDC_STA,SD_GDDL_DZXJ_FDC_STA,SD_GDDL_XTTA_FDC_STA,SD_GDDL_WFZC_FDC_STA,SD_SXNY_JNSS_FDC_STA,SD_SXNY_WFBH_FDC_STA,SD_LYDL_CG_FDC_STA,SD_LYDL_FJ_FDC_STA,SD_LYDL_YS_FDC_STA,SD_SXNY_JNCQ_FDC_STA,SD_LYDL_BH1_FDC_STA,SD_GHTZ_HZJ_GDC_STA
+#runWindpowerstation: SD_GDDL_RZLX_FDC_STA
 #计算状态用ai或者di
 clauStatus:
   ai: GJY03_GC,YLZ01_GC,PTZ02_GC   #配置期次
@@ -93,17 +100,25 @@ clauStatus:
 #判断数据终端
 second: 1800
 #判断降出力
-AI134: 17.4    #叶轮转速给定
+AI110: 17.4    #叶轮转速给定
 AI178: 17.4    #转矩给定
 #AI443:容量
 
-#计算电量直接取,如果不是1就是相减算
-typeOfElectric:
-  #直接取
-  direct: GJY02_GC,YF01_GC,YF02_GC,HSM01_GC,PTZ01_GC,ZK01_GC
-
-
-
+#功率曲线拟合
+curvefitting:
+  #维度
+  dimension: 20
+  #尺度
+  scale: 0.01
+initialcode: INITIAL
+##调用区间间隔时长,需要与XXLJOB调度时长结合,保证查询区间时长大于调度时长,单位分钟
+frequency:
+  #停机
+  shutdown: 6
+  #限电
+  powerrationing: 6
+  #切入切出
+  cutinandout: 6
 
 
 

+ 5 - 5
realtime/generationXK-service/src/main/resources/xxl-job-executorWP.properties

@@ -6,20 +6,20 @@ xxl.job.accessToken=
 
 ### xxl-job executor appname
 ### 场站计算
-xxl.job.executor.appname=generationWP-job
+#xxl.job.executor.appname=generationWP-job
 ### 区域公司计算
-#xxl.job.executor.appname=generationRG-job
+xxl.job.executor.appname=generationWPGD-job
 ### xxl-job executor registry-address: default use address to registry , otherwise use ip:port if address is null
 xxl.job.executor.address=
 ### xxl-job executor server-info
 xxl.job.executor.ip=
 #场站端口
-xxl.job.executor.port=9201
+#xxl.job.executor.port=9201
 #区域端口
-#xxl.job.executor.port=9202
+xxl.job.executor.port=9301
 
 ### xxl-job executor log-path
-xxl.job.executor.logpath=E:\\jobs\\generationWP-job
+xxl.job.executor.logpath=E:\\jobs\\generationWPGD-job
 ### xxl-job executor log-retention-days
 xxl.job.executor.logretentiondays=30
 

+ 108 - 0
realtime/generationXK-service/src/test/java/com/gyee/generation/CurveTest.java

@@ -0,0 +1,108 @@
+package com.gyee.generation;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.gyee.generation.init.CacheContext;
+import com.gyee.generation.model.auto.ProBasicEquipment;
+import com.gyee.generation.model.auto.ProEconWtCurveFitting;
+import com.gyee.generation.model.auto.ProEconWtCurveFittingMonth;
+import com.gyee.generation.model.auto.ProEconWtCurveFittingYear;
+import com.gyee.generation.model.vo.CurveType;
+import com.gyee.generation.service.auto.IProEconWtCurveFittingMonthService;
+import com.gyee.generation.service.auto.IProEconWtCurveFittingService;
+import com.gyee.generation.service.auto.IProEconWtCurveFittingYearService;
+import com.gyee.generation.util.DateUtils;
+import com.gyee.generation.util.redis.RedisService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.util.Calendar;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
+
+
+/**
+ * OpenCSV CSVReader Example, Read line by line
+ *
+ * @author pankaj
+ *
+ */
+@SpringBootTest
+@RunWith(SpringRunner.class)
+@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
+public class CurveTest {
+
+    @Resource
+    private RedisService redisService;
+    @Resource
+    private IProEconWtCurveFittingMonthService proEconWtCurveFittingMonthService;
+
+    @Resource
+    private IProEconWtCurveFittingYearService proEconWtCurveFittingYearService;
+    @Resource
+    private IProEconWtCurveFittingService proEconWtCurveFittingService;
+
+
+
+    @Test
+    public void csvTest() throws Exception {
+        Calendar c=Calendar.getInstance();
+
+        Date date = DateUtils.truncate(c.getTime());
+        for(ProBasicEquipment wt :CacheContext.wtls)
+        {
+            QueryWrapper<ProEconWtCurveFitting> queryWrapper = new QueryWrapper<>();
+            queryWrapper.eq("record_date",date)
+                    .eq("windturbine_Id", wt.getId());
+
+            List<ProEconWtCurveFitting> dayls=proEconWtCurveFittingService.list(queryWrapper).stream()
+                    .sorted(Comparator.comparing(ProEconWtCurveFitting::getSpeed)).collect(Collectors.toList());
+
+            if(!dayls.isEmpty())
+            {
+                String s = JSONObject.toJSONString(dayls);
+                redisService.set(CurveType.dayCurve.id+"_"+wt.getId(), s);
+            }
+
+            QueryWrapper<ProEconWtCurveFittingMonth> queryWrapper2 = new QueryWrapper<>();
+            queryWrapper2.eq("year",String.valueOf(c.get(Calendar.YEAR)))
+                    .eq("month",String.valueOf(c.get(Calendar.MONTH)+1))
+                    .eq("windturbine_Id", wt.getId());
+
+            List<ProEconWtCurveFittingMonth> monthls=proEconWtCurveFittingMonthService.list(queryWrapper2).stream()
+                    .sorted(Comparator.comparing(ProEconWtCurveFittingMonth::getSpeed)).collect(Collectors.toList());
+
+            if(!monthls.isEmpty())
+            {
+                String s = JSONObject.toJSONString(monthls);
+                redisService.set(CurveType.monthCurve.id+"_"+wt.getId(), s);
+            }
+
+            QueryWrapper<ProEconWtCurveFittingYear>  queryWrapper3 = new QueryWrapper<>();
+            queryWrapper3.eq("year",String.valueOf(c.get(Calendar.YEAR)))
+                    .eq("windturbine_Id", wt.getId());
+
+            List<ProEconWtCurveFittingYear> yearls=proEconWtCurveFittingYearService.list(queryWrapper3).stream()
+                    .sorted(Comparator.comparing(ProEconWtCurveFittingYear::getSpeed)).collect(Collectors.toList());
+
+            if(!dayls.isEmpty())
+            {
+                String s = JSONObject.toJSONString(dayls);
+                redisService.set(CurveType.yearCurve.id+"_"+wt.getId(), s);
+            }
+        }
+//        electricityMeteringService.saveGenerationDatas();
+    }
+
+
+
+
+}

+ 7 - 3
realtime/generationXK-service/src/test/java/com/gyee/generation/GenerationTest.java

@@ -48,6 +48,8 @@ public class GenerationTest {
     private AccessStatusService accessStatusService;
     @Resource
     private CalculationService calculationService;
+    @Resource
+    private SafetyDayService safetyDayService;
 
     @Test
     public void test1() throws Exception {
@@ -80,7 +82,7 @@ public class GenerationTest {
 //        accessStatusService.fullFieldState();
 
 
-//                statusService.powerRationing();
+//        statusService.powerRationing();
 //        statusService.statusReal();
 //        statusService.calculateStatusNumber();
 
@@ -94,7 +96,9 @@ public class GenerationTest {
 //        regionCalService.companyCal();
 //        regionCalService.RegionCal();
 
-        regionCalreService.companyCal();
-        regionCalreService.RegionCal();
+//        regionCalreService.companyCal();
+//        regionCalreService.RegionCal();
+
+        safetyDayService.saveSafetyday();
     }
 }

+ 6 - 6
realtime/meteorologicalcollection/src/main/java/com/gyee/meteorological/config/GeneratorCodeConfig.java

@@ -60,12 +60,12 @@ public class GeneratorCodeConfig {
 
 
         dsc.setDriverName("org.postgresql.Driver");
-//        dsc.setUsername("postgres");
-//        dsc.setPassword("postgres");
-//        dsc.setUrl("jdbc:postgresql://192.168.11.248:5432/eng_mctl");
-        dsc.setUrl("jdbc:postgresql://120.46.148.180:5432/wisdom");
-        dsc.setUsername("gdprod");
-        dsc.setPassword("gd123");
+        dsc.setUsername("postgres");
+        dsc.setPassword("postgres");
+        dsc.setUrl("jdbc:postgresql://192.168.11.248:5432/IMS_NEM_SD");
+//        dsc.setUrl("jdbc:postgresql://120.46.148.180:5432/wisdom");
+//        dsc.setUsername("gdprod");
+//        dsc.setPassword("gd123");
         mpg.setDataSource(dsc);
 
 

+ 20 - 0
realtime/meteorologicalcollection/src/main/java/com/gyee/meteorological/controller/ProBasicPowerstationController.java

@@ -0,0 +1,20 @@
+package com.gyee.meteorological.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-12-07
+ */
+@RestController
+@RequestMapping("//pro-basic-powerstation")
+public class ProBasicPowerstationController {
+
+}

+ 16 - 0
realtime/meteorologicalcollection/src/main/java/com/gyee/meteorological/mapper/auto/ProBasicPowerstationMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.meteorological.mapper.auto;
+
+import com.gyee.meteorological.model.auto.ProBasicPowerstation;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-12-07
+ */
+public interface ProBasicPowerstationMapper extends BaseMapper<ProBasicPowerstation> {
+
+}

+ 261 - 0
realtime/meteorologicalcollection/src/main/java/com/gyee/meteorological/model/auto/ProBasicPowerstation.java

@@ -0,0 +1,261 @@
+package com.gyee.meteorological.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.time.LocalDate;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-12-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ProBasicPowerstation extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编号
+     */
+    private String id;
+
+    /**
+     * 编码
+     */
+    private String nemCode;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 地址
+     */
+    private String address;
+
+    /**
+     * 电话
+     */
+    private String telephone;
+
+    /**
+     * 风电装机容量
+     */
+    private BigDecimal windCapacity;
+
+    /**
+     * 风电容量单位
+     */
+    private String windCapacityUnit;
+
+    /**
+     * 风电装机数量海上
+     */
+    private Integer windQuantityHs;
+
+    /**
+     * 风电装机数量陆地
+     */
+    private Integer windQuantityLd;
+
+    /**
+     * 光伏装机容量
+     */
+    private BigDecimal capacity;
+
+    /**
+     * 光伏容量单位
+     */
+    private String capacityUnit;
+
+    /**
+     * 光伏装机数量集中
+     */
+    private Integer quantityJz;
+
+    /**
+     * 光伏装机数量组串
+     */
+    private Integer quantityZc;
+
+    /**
+     * 接入风电装机容量
+     */
+    private BigDecimal jrwindCapacity;
+
+    /**
+     * 接入风电容量单位
+     */
+    private String jrwindCapacityUnit;
+
+    /**
+     * 接入风电装机数量海上
+     */
+    private Integer jrwindQuantityHs;
+
+    /**
+     * 接入风电装机数量陆地
+     */
+    private Integer jrwindQuantityLd;
+
+    /**
+     * 接入光伏装机容量
+     */
+    private BigDecimal jrCapacity;
+
+    /**
+     * 接入光伏容量单位
+     */
+    private String jrCapacityUnit;
+
+    /**
+     * 接入光伏装机数量集中
+     */
+    private Integer jrquantityJz;
+
+    /**
+     * 接入光伏装机数量组串
+     */
+    private Integer jrquantityZc;
+
+    /**
+     * 别名
+     */
+    private String aname;
+
+    /**
+     * 地球经度
+     */
+    private BigDecimal longitude;
+
+    /**
+     * 地球纬度
+     */
+    private BigDecimal latitude;
+
+    /**
+     * 图片
+     */
+    private String photo;
+
+    /**
+     * 系统厂家
+     */
+    private String systemManufact;
+
+    /**
+     * 场长
+     */
+    private String headfarm;
+
+    /**
+     * 场长电话
+     */
+    private String headfarmPhone;
+
+    /**
+     * 机型
+     */
+    private String model;
+
+    /**
+     * 顺序
+     */
+    private Integer orderNum;
+
+    /**
+     * 海拔高度
+     */
+    private BigDecimal height;
+
+    /**
+     * 场站类型(-1:风电;-2:光伏)
+     */
+    private String windType;
+
+    /**
+     * 公司编号
+     */
+    private String companyId;
+
+    /**
+     * 区域编号
+     */
+    private String regionId;
+
+    /**
+     * 集团编号
+     */
+    private String groupId;
+
+    /**
+     * 是否可用(0:待建;1:投产)(0:不参与计算;1:参与计算)
+     */
+    private Integer isAble;
+
+    /**
+     * 备用1
+     */
+    private String spare1;
+
+    /**
+     * 备用2
+     */
+    private String spare2;
+
+    /**
+     * 备用3
+     */
+    private String spare3;
+
+    /**
+     * 备用4
+     */
+    private String spare4;
+
+    /**
+     * 核准容量
+     */
+    private BigDecimal appCapacity;
+
+    /**
+     * 在建容量
+     */
+    private BigDecimal conCapacity;
+
+    /**
+     * 并网容量
+     */
+    private BigDecimal gridCapacity;
+
+    private BigDecimal hoiCapacity;
+
+    /**
+     * 首批并网时间
+     */
+    private LocalDate firstGridTime;
+
+    /**
+     * 整场投运时间
+     */
+    private LocalDate wholeGridTime;
+
+    /**
+     * 测风塔数量
+     */
+    private Integer anemoNumber;
+
+    /**
+     * 升压站数量
+     */
+    private Integer stationNumber;
+
+
+}

+ 16 - 0
realtime/meteorologicalcollection/src/main/java/com/gyee/meteorological/service/auto/IProBasicPowerstationService.java

@@ -0,0 +1,16 @@
+package com.gyee.meteorological.service.auto;
+
+import com.gyee.meteorological.model.auto.ProBasicPowerstation;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-12-07
+ */
+public interface IProBasicPowerstationService extends IService<ProBasicPowerstation> {
+
+}

+ 20 - 0
realtime/meteorologicalcollection/src/main/java/com/gyee/meteorological/service/auto/impl/ProBasicPowerstationServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.meteorological.service.auto.impl;
+
+import com.gyee.meteorological.model.auto.ProBasicPowerstation;
+import com.gyee.meteorological.mapper.auto.ProBasicPowerstationMapper;
+import com.gyee.meteorological.service.auto.IProBasicPowerstationService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-12-07
+ */
+@Service
+public class ProBasicPowerstationServiceImpl extends ServiceImpl<ProBasicPowerstationMapper, ProBasicPowerstation> implements IProBasicPowerstationService {
+
+}

+ 13 - 13
realtime/meteorologicalcollection/src/main/java/com/gyee/meteorological/service/collection/CollectionService.java

@@ -10,11 +10,9 @@ import com.gyee.common.util.JSONUtils;
 import com.gyee.common.util.RestTemplateUtil;
 import com.gyee.meteorological.init.CacheContext;
 import com.gyee.meteorological.model.*;
-import com.gyee.meteorological.model.auto.Coordinate;
-import com.gyee.meteorological.model.auto.ProEconCoordinate;
-import com.gyee.meteorological.model.auto.ProEconMeteorological;
-import com.gyee.meteorological.model.auto.ProEconMeteorologicalfourdays;
+import com.gyee.meteorological.model.auto.*;
 import com.gyee.meteorological.service.RedisService;
+import com.gyee.meteorological.service.auto.IProBasicPowerstationService;
 import com.gyee.meteorological.service.auto.IProEconCoordinateService;
 import com.gyee.meteorological.service.auto.IProEconMeteorologicalService;
 import com.gyee.meteorological.service.auto.IProEconMeteorologicalfourdaysService;
@@ -53,6 +51,8 @@ public class CollectionService {
     private IProEconMeteorologicalfourdaysService proEconMeteorologicalfourdaysService;
     @Resource
     private IProEconCoordinateService proEconCoordinateService;
+    @Resource
+    private IProBasicPowerstationService proBasicPowerstationService;
 
     @Value("${meteorological.model}")
     private String model;
@@ -79,18 +79,19 @@ public class CollectionService {
 
 
     public void saveMeteorological() throws IOException {
+        List<ProBasicPowerstation> powerstations = proBasicPowerstationService.list().stream().filter(wp -> wp.getIsAble().equals(1) && wp.getLatitude()!=null && wp.getLongitude()!=null).collect(Collectors.toList());
         List<ProEconCoordinate> proEconCoordinates = proEconCoordinateService.list().stream().filter(i->i.getIsOpen()!=null && i.getIsOpen().equals(1)).collect(Collectors.toList());
 //        String property = System.getProperty("user.dir");
 
         long startTime = System.currentTimeMillis();
-        proEconCoordinates.stream().forEach(c->{
-            String restUrl = url+"weather?units=metric&land=zh_cn&lat="+c.getLat()+"&lon="+c.getLon()+"&appid="+weatherkey;
+        powerstations.stream().forEach(c->{
+            String restUrl = url+"weather?units=metric&land=zh_cn&lat="+c.getLatitude()+"&lon="+c.getLongitude()+"&appid="+weatherkey;
             String weatherStr = RestTemplateUtil.get(restUrl, null);
             WeatherReal weatherReal = JSONObject.parseObject(weatherStr, new TypeReference<WeatherReal>() {
             });
             ProEconMeteorological proEconMeteorological = new ProEconMeteorological();
             proEconMeteorological.setId(CommonUtils.getUUID());
-            proEconMeteorological.setWindpowerstationId(c.getWindpowerstationId());
+            proEconMeteorological.setWindpowerstationId(c.getId());
 
             if(null!=weatherReal.getMain()) {
                 Main main=weatherReal.getMain();
@@ -248,7 +249,7 @@ public class CollectionService {
             proEconMeteorological.setDatetime(date);
 
             QueryWrapper<ProEconMeteorological> qw = new QueryWrapper<>();
-            qw.eq("windpowerstation_id",c.getWindpowerstationId());
+            qw.eq("windpowerstation_id",c.getId());
             qw.eq("datetime",date);
             List<ProEconMeteorological> list = proEconMeteorologicalService.list(qw);
             if (StringUtils.isEmpty(list)){
@@ -262,8 +263,7 @@ public class CollectionService {
     }
 
     public void saveMeteorologicalFiveDay(){
-
-        List<ProEconCoordinate> proEconCoordinates = proEconCoordinateService.list().stream().filter(i->i.getIsOpen()!=null && i.getIsOpen().equals(1)).collect(Collectors.toList());
+        List<ProBasicPowerstation> powerstations = proBasicPowerstationService.list().stream().filter(wp -> wp.getIsAble().equals(1) && wp.getLatitude()!=null && wp.getLongitude()!=null).collect(Collectors.toList());
 //        String property = System.getProperty("user.dir");
         QueryWrapper<ProEconMeteorologicalfourdays> qw = new QueryWrapper<>();
         qw.ge("datetime",DateUtils.getCurrentDate());
@@ -271,8 +271,8 @@ public class CollectionService {
 
         long startTime = System.currentTimeMillis();
         List<ProEconMeteorologicalfourdays> resultList = new ArrayList<>();
-        proEconCoordinates.stream().forEach(c->{
-            String restUrl = url+"forecast?units=metric&land=zh_cn&lat="+c.getLat()+"&lon="+c.getLon()+"&appid="+weatherkey;
+        powerstations.stream().forEach(c->{
+            String restUrl = url+"forecast?units=metric&land=zh_cn&lat="+c.getLatitude()+"&lon="+c.getLongitude()+"&appid="+weatherkey;
             String weatherStr = RestTemplateUtil.get(restUrl, null);
             JsonRootBean jsonRootBean = JSONObject.parseObject(weatherStr, new TypeReference<JsonRootBean>() {
             });
@@ -300,7 +300,7 @@ public class CollectionService {
                     Date date=DateUtils.parseLongToDate(weatherReal.getDt()*1000);
                     proEconMeteorological.setId(CommonUtils.getUUID());
                     proEconMeteorological.setDatetime(date);
-                    proEconMeteorological.setWindpowerstationId(c.getWindpowerstationId());
+                    proEconMeteorological.setWindpowerstationId(c.getId());
                     proEconMeteorological.setVisibility(weatherReal.getVisibility());
                     //日出时间
                     proEconMeteorological.setSunrise(sunriseString);

+ 3 - 3
realtime/meteorologicalcollection/src/main/resources/application-test.yml

@@ -33,9 +33,9 @@ spring:
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
     driver-class-name: org.postgresql.Driver
-    url: jdbc:postgresql://120.46.148.180:5432/wisdom
-    username: gdprod
-    password: gd123
+    url: jdbc:postgresql://192.168.11.248:5432/IMS_NEM_SD
+    username: postgres
+    password: postgres
     oracle-schema=:
     #    type: com.alibaba.druid.pool.DruidDataSource
     #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC

+ 4 - 1
realtime/meteorologicalcollection/src/test/java/com/gyee/meteorological/MeteorologicalTest.java

@@ -27,8 +27,11 @@ public class MeteorologicalTest {
 
     @Test
     public void test1() throws IOException {
+
+        collectionService.saveMeteorological();
+        collectionService.saveMeteorologicalFiveDay();
 //        collectionService.saveMeteorologicalData();
 //        collectionService.saveMeteorological();
-        collectionService.saveMeteorologicalFourDay();
+//        collectionService.saveMeteorologicalFourDay();
     }
 }

+ 1 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/goodness/WindturbinegoodnessController.java

@@ -64,7 +64,7 @@ public class WindturbinegoodnessController {
 
                     if(CacheContext.modelMap.containsKey(wt.getModelId()))
                     {
-                        pwg.setModelId(CacheContext.modelMap.get(wt.getModelId()).getName());
+                        pwg.setModelId(CacheContext.modelMap.get(wt.getModelId()).getId());
                     }
                 }
 

+ 1 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/singleanalysis/SingleAnalysisService.java

@@ -454,7 +454,7 @@ public class SingleAnalysisService {
                         ProEconEquipmentInfoDay1 wtd = eqday1map.get(wt.getId());
 
                         fdl = null != wtd.getYfdl() ? wtd.getYfdl() : 0.0;//风机发电量合计
-                        fdl = new BigDecimal(fdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP).doubleValue();
+                       // fdl = new BigDecimal(fdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP).doubleValue();
                         double fs = null != wtd.getYpjfs() ? wtd.getYpjfs() : 0.0;//风机平均风速
 
                         double gzss = null != wtd.getYgzssdl() ? wtd.getYgzssdl() : 0.0;//风机故障损失合计

+ 53 - 13
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/specific/SpecificService.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.gyee.common.model.StringUtils;
 import com.gyee.common.util.DateUtils;
 import com.gyee.common.util.DoubleUtils;
+import com.gyee.common.util.SortUtils;
 import com.gyee.common.vo.specific.SpecificCenterVo;
 import com.gyee.common.vo.specific.SpecificTarget;
 import com.gyee.common.vo.specific.SpecificTargetVo;
@@ -712,13 +713,16 @@ public class SpecificService {
             wpids.stream().forEach(wpid->{
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
+                int orderNum = 0;
                 if(wpid.contains("_ZGS")){
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 }else if(wpid.contains("_RGN")){
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
                 }else{
                     vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                    orderNum = CacheContext.wpmap.get(wpid).getOrderNum();
                 }
+                vo.setOrderNum(orderNum);
                 List<SpecificTargetVo> tempList = new ArrayList<>();
 
                 Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
@@ -746,7 +750,7 @@ public class SpecificService {
                 resultendList.add(vo);
             });
         }
-
+        SortUtils.sort(resultendList,"orderNum",SortUtils.DESC);
 
         return resultendList;
     }
@@ -856,13 +860,16 @@ public class SpecificService {
             wpids.stream().forEach(wpid->{
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
+                int orderNum = 0;
                 if(wpid.contains("_ZGS")){
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 }else if(wpid.contains("_RGN")){
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
                 }else{
                     vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                    orderNum = CacheContext.wpmap.get(wpid).getOrderNum();
                 }
+                vo.setOrderNum(orderNum);
                 List<SpecificTargetVo> tempList = new ArrayList<>();
 
                 Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
@@ -890,7 +897,7 @@ public class SpecificService {
                 resultendList.add(vo);
             });
         }
-
+        SortUtils.sort(resultendList,"orderNum",SortUtils.DESC);
 
         return resultendList;
     }
@@ -999,13 +1006,16 @@ public class SpecificService {
             wpids.stream().forEach(wpid->{
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
+                int orderNum = 0;
                 if(wpid.contains("_ZGS")){
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 }else if(wpid.contains("_RGN")){
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
                 }else{
                     vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                    orderNum = CacheContext.wpmap.get(wpid).getOrderNum();
                 }
+                vo.setOrderNum(orderNum);
                 List<SpecificTargetVo> tempList = new ArrayList<>();
 
                 Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
@@ -1033,7 +1043,7 @@ public class SpecificService {
                 resultendList.add(vo);
             });
         }
-
+        SortUtils.sort(resultendList,"orderNum",SortUtils.DESC);
 
         return resultendList;
 
@@ -1143,13 +1153,16 @@ public class SpecificService {
             wpids.stream().forEach(wpid->{
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
+                int orderNum = 0;
                 if(wpid.contains("_ZGS")){
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 }else if(wpid.contains("_RGN")){
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
                 }else{
                     vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                    orderNum = CacheContext.wpmap.get(wpid).getOrderNum();
                 }
+                vo.setOrderNum(orderNum);
                 List<SpecificTargetVo> tempList = new ArrayList<>();
 
                 Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
@@ -1177,7 +1190,7 @@ public class SpecificService {
                 resultendList.add(vo);
             });
         }
-
+        SortUtils.sort(resultendList,"orderNum",SortUtils.DESC);
 
         return resultendList;
     }
@@ -1286,13 +1299,16 @@ public class SpecificService {
             wpids.stream().forEach(wpid->{
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
+                int orderNum = 0;
                 if(wpid.contains("_ZGS")){
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 }else if(wpid.contains("_RGN")){
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
                 }else{
                     vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                    orderNum = CacheContext.wpmap.get(wpid).getOrderNum();
                 }
+                vo.setOrderNum(orderNum);
                 List<SpecificTargetVo> tempList = new ArrayList<>();
 
                 Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
@@ -1320,7 +1336,7 @@ public class SpecificService {
                 resultendList.add(vo);
             });
         }
-
+        SortUtils.sort(resultendList,"orderNum",SortUtils.DESC);
 
         return resultendList;
     }
@@ -1429,13 +1445,16 @@ public class SpecificService {
             wpids.stream().forEach(wpid->{
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
+                int orderNum = 0;
                 if(wpid.contains("_ZGS")){
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 }else if(wpid.contains("_RGN")){
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
                 }else{
                     vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                    orderNum = CacheContext.wpmap.get(wpid).getOrderNum();
                 }
+                vo.setOrderNum(orderNum);
                 List<SpecificTargetVo> tempList = new ArrayList<>();
 
                 Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
@@ -1463,7 +1482,7 @@ public class SpecificService {
                 resultendList.add(vo);
             });
         }
-
+        SortUtils.sort(resultendList,"orderNum",SortUtils.DESC);
 
         return resultendList;
     }
@@ -1572,13 +1591,16 @@ public class SpecificService {
             wpids.stream().forEach(wpid->{
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
+                int orderNum = 0;
                 if(wpid.contains("_ZGS")){
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 }else if(wpid.contains("_RGN")){
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
                 }else{
                     vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                    orderNum = CacheContext.wpmap.get(wpid).getOrderNum();
                 }
+                vo.setOrderNum(orderNum);
                 List<SpecificTargetVo> tempList = new ArrayList<>();
 
                 Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
@@ -1607,7 +1629,7 @@ public class SpecificService {
             });
         }
 
-
+        SortUtils.sort(resultendList,"orderNum",SortUtils.DESC);
         return resultendList;
     }
 
@@ -1715,13 +1737,16 @@ public class SpecificService {
             wpids.stream().forEach(wpid->{
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
+                int orderNum = 0;
                 if(wpid.contains("_ZGS")){
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 }else if(wpid.contains("_RGN")){
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
                 }else{
                     vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                    orderNum = CacheContext.wpmap.get(wpid).getOrderNum();
                 }
+                vo.setOrderNum(orderNum);
                 List<SpecificTargetVo> tempList = new ArrayList<>();
 
                 Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
@@ -1749,7 +1774,7 @@ public class SpecificService {
                 resultendList.add(vo);
             });
         }
-
+        SortUtils.sort(resultendList,"orderNum",SortUtils.DESC);
 
         return resultendList;
     }
@@ -1858,13 +1883,16 @@ public class SpecificService {
             wpids.stream().forEach(wpid->{
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
+                int orderNum = 0;
                 if(wpid.contains("_ZGS")){
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 }else if(wpid.contains("_RGN")){
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
                 }else{
                     vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                    orderNum = CacheContext.wpmap.get(wpid).getOrderNum();
                 }
+                vo.setOrderNum(orderNum);
                 List<SpecificTargetVo> tempList = new ArrayList<>();
 
                 Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
@@ -1892,7 +1920,7 @@ public class SpecificService {
                 resultendList.add(vo);
             });
         }
-
+        SortUtils.sort(resultendList,"orderNum",SortUtils.DESC);
 
         return resultendList;
     }
@@ -2001,13 +2029,16 @@ public class SpecificService {
             wpids.stream().forEach(wpid->{
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
+                int orderNum = 0;
                 if(wpid.contains("_ZGS")){
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 }else if(wpid.contains("_RGN")){
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
                 }else{
                     vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                    orderNum = CacheContext.wpmap.get(wpid).getOrderNum();
                 }
+                vo.setOrderNum(orderNum);
                 List<SpecificTargetVo> tempList = new ArrayList<>();
 
                 Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
@@ -2035,7 +2066,7 @@ public class SpecificService {
                 resultendList.add(vo);
             });
         }
-
+        SortUtils.sort(resultendList,"orderNum",SortUtils.DESC);
 
         return resultendList;
     }
@@ -2144,13 +2175,16 @@ public class SpecificService {
             wpids.stream().forEach(wpid->{
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
+                int orderNum = 0;
                 if(wpid.contains("_ZGS")){
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 }else if(wpid.contains("_RGN")){
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
                 }else{
                     vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                    orderNum = CacheContext.wpmap.get(wpid).getOrderNum();
                 }
+                vo.setOrderNum(orderNum);
                 List<SpecificTargetVo> tempList = new ArrayList<>();
 
                 Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
@@ -2178,7 +2212,7 @@ public class SpecificService {
                 resultendList.add(vo);
             });
         }
-
+        SortUtils.sort(resultendList,"orderNum",SortUtils.DESC);
 
         return resultendList;
     }
@@ -2288,13 +2322,16 @@ public class SpecificService {
             wpids.stream().forEach(wpid->{
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
+                int orderNum = 0;
                 if(wpid.contains("_ZGS")){
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 }else if(wpid.contains("_RGN")){
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
                 }else{
                     vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                    orderNum = CacheContext.wpmap.get(wpid).getOrderNum();
                 }
+                vo.setOrderNum(orderNum);
                 List<SpecificTargetVo> tempList = new ArrayList<>();
 
                 Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
@@ -2322,7 +2359,7 @@ public class SpecificService {
                 resultendList.add(vo);
             });
         }
-
+        SortUtils.sort(resultendList,"orderNum",SortUtils.DESC);
 
         return resultendList;
     }
@@ -2431,13 +2468,16 @@ public class SpecificService {
             wpids.stream().forEach(wpid->{
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
+                int orderNum = 0;
                 if(wpid.contains("_ZGS")){
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 }else if(wpid.contains("_RGN")){
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
                 }else{
                     vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                    orderNum = CacheContext.wpmap.get(wpid).getOrderNum();
                 }
+                vo.setOrderNum(orderNum);
                 List<SpecificTargetVo> tempList = new ArrayList<>();
 
                 Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
@@ -2465,7 +2505,7 @@ public class SpecificService {
                 resultendList.add(vo);
             });
         }
-
+        SortUtils.sort(resultendList,"orderNum",SortUtils.DESC);
 
         return resultendList;
     }

+ 1 - 1
web/runeconomy-xk/src/main/resources/application.yml

@@ -1,5 +1,5 @@
 spring:
   profiles:
 #    active: jn
-    active: yun
+    active: xk
 #    active: xk