shilin 1 rok pred
rodič
commit
de4a4efe61

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

@@ -15,8 +15,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 public class GenerationMain {
     public static void main(String[] args) throws Exception {
         SpringApplication.run(GenerationMain.class, args);
-
-
+//
+//
 //        Calendar c = Calendar.getInstance();
 //        Date begin = null;
 //        Date end = null;
@@ -26,7 +26,7 @@ public class GenerationMain {
 //
 //        begin = new Date();
 //        System.out.println("设备指标记录调度程序执行开始!。。。。。。");
-//        for (int i = 0; i < 11; i++) {
+//        for (int i = 0; i < 12; i++) {
 //
 //
 //            System.out.println(DateUtils.format(c.getTime(), "yyyy-MM-dd HH:mm:ss").toString());
@@ -40,13 +40,7 @@ public class GenerationMain {
 //            WtAlysisDayService wtAlysisDayService = SpringUtils.getBean("wtAlysisDayService");
 //
 //            equipmentInfo1Service.calEquipmentInfoDay(c.getTime());
-//            equipmentInfo2Service.calEquipmentInfoDay(c.getTime());
-//
-//            equipmentInfo3Service.calEquipmentInfoDay(c.getTime());
-//
-//            equipmentInfo4Service.calEquipmentInfoDay(c.getTime());
 //
-//            equipmentInfo5Service.calEquipmentInfoDay(c.getTime());
 //
 //            equipmentInfoDayTopService.calEquipmentInfoDayTop(c.getTime());
 //            equipmentInfoDayTopService.calEquipmentInfoMonthTop(c.getTime());
@@ -64,7 +58,7 @@ public class GenerationMain {
 //        c.set(Calendar.DAY_OF_MONTH, 1);
 //        c.setTime(DateUtils.truncate(c.getTime()));
 //        System.out.println("场站指标记录调度程序执行开始!。。。。。。");
-//        for (int i = 0; i < 10; i++) {
+//        for (int i = 0; i < 12; i++) {
 //
 //
 //            System.out.println(DateUtils.format(c.getTime(), "yyyy-MM-dd HH:mm:ss").toString());
@@ -73,7 +67,7 @@ public class GenerationMain {
 //            WindPowerInfo2Service windPowerInfo2Service = SpringUtils.getBean("windPowerInfo2Service");
 //            WindPowerInfo3Service windPowerInfo3Service = SpringUtils.getBean("windPowerInfo3Service");
 //            WindPowerInfo4Service windPowerInfo4Service = SpringUtils.getBean("windPowerInfo4Service");
-//            WindPowerInfo5Service windPowerInfo5Service = SpringUtils.getBean("windPowerInfo5Service");
+////            WindPowerInfo5Service windPowerInfo5Service = SpringUtils.getBean("windPowerInfo5Service");
 //            WindPowerInfo6Service windPowerInfo6Service = SpringUtils.getBean("windPowerInfo6Service");
 //
 //            windPowerInfo1Service.calLineInfoDay(c.getTime());
@@ -98,19 +92,19 @@ public class GenerationMain {
 //            windPowerInfo4Service.calProjectInfoDay(c.getTime());
 //            windPowerInfo4Service.calWindpowerInfoDay(c.getTime());
 //            windPowerInfo4Service.calCompanyInfoDay(c.getTime());
-//            windPowerInfo4Service.calRegionInfoDay(c.getTime());
-//
-//            windPowerInfo5Service.calLineInfoDay(c.getTime());
-//            windPowerInfo5Service.calProjectInfoDay(c.getTime());
-//            windPowerInfo5Service.calWindpowerInfoDay(c.getTime());
-//            windPowerInfo5Service.calCompanyInfoDay(c.getTime());
-//            windPowerInfo5Service.calRegionInfoDay(c.getTime());
-//
-//            windPowerInfo6Service.calLineInfoDay(c.getTime());
-//            windPowerInfo6Service.calProjectInfoDay(c.getTime());
-//            windPowerInfo6Service.calWindpowerInfoDay(c.getTime());
-//            windPowerInfo6Service.calCompanyInfoDay(c.getTime());
-//            windPowerInfo6Service.calRegionInfoDay(c.getTime());
+////            windPowerInfo4Service.calRegionInfoDay(c.getTime());
+//
+////            windPowerInfo5Service.calLineInfoDay(c.getTime());
+////            windPowerInfo5Service.calProjectInfoDay(c.getTime());
+////            windPowerInfo5Service.calWindpowerInfoDay(c.getTime());
+////            windPowerInfo5Service.calCompanyInfoDay(c.getTime());
+////            windPowerInfo5Service.calRegionInfoDay(c.getTime());
+////
+////            windPowerInfo6Service.calLineInfoDay(c.getTime());
+////            windPowerInfo6Service.calProjectInfoDay(c.getTime());
+////            windPowerInfo6Service.calWindpowerInfoDay(c.getTime());
+////            windPowerInfo6Service.calCompanyInfoDay(c.getTime());
+////            windPowerInfo6Service.calRegionInfoDay(c.getTime());
 //
 //            c.add(Calendar.DAY_OF_MONTH, 1);
 //

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

@@ -34,8 +34,8 @@
 ////@PropertySource("classpath:xxl-job-executorGF002.properties")
 ////@PropertySource("classpath:xxl-job-executorGF003.properties")
 ////@PropertySource("classpath:xxl-job-executorGF004.properties")
-//@PropertySource("classpath:xxl-job-executorGF005.properties")
-////@PropertySource("classpath:xxl-job-executorGF006.properties")
+////@PropertySource("classpath:xxl-job-executorGF005.properties")
+//@PropertySource("classpath:xxl-job-executorGF006.properties")
 //
 ////@PropertySource("classpath:xxl-job-region.properties")
 //public class XxlJobConfig implements EnvironmentAware {

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

@@ -384,8 +384,8 @@ public class EquipmentInfo1Service {
             if(StringUtils.notEmp(pointValue))
             {
                 //日性能损失电量
-//                pewp.setRxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-                pewp.setRxnssdl(0.0);
+                pewp.setRxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+//                pewp.setRxnssdl(0.0);
 
             }
         }
@@ -398,7 +398,7 @@ public class EquipmentInfo1Service {
             {
                 //日限电停机损失电量
                 pewp.setRxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+                pewp.setRxdtjssdl(0.0);
             }
         }
 
@@ -411,7 +411,7 @@ public class EquipmentInfo1Service {
             {
                 //日限电降出力损失电量
                 pewp.setRxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+                pewp.setRxdjclssdl(0.0);
             }
         }
 
@@ -423,7 +423,7 @@ public class EquipmentInfo1Service {
             {
                 //日场外受累电网损失电量
                 pewp.setRcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+                pewp.setRcwsldwssdl(0.0);
             }
         }
         if(pointmap.containsKey(ContantXk.RCWSLTQSSDL))
@@ -434,7 +434,7 @@ public class EquipmentInfo1Service {
             {
                 //日场外受累天气损失电量
                 pewp.setRcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+                pewp.setRcwsltqssdl(0.0);
             }
         }
 
@@ -614,7 +614,7 @@ public class EquipmentInfo1Service {
             if(StringUtils.notEmp(pointValue))
             {
                 //月待机损失电量
-//                pewp.setYdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+                pewp.setYdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
                 pewp.setYdjssdl(0.0);
             }
         }
@@ -625,7 +625,7 @@ public class EquipmentInfo1Service {
             if(StringUtils.notEmp(pointValue))
             {
                 //月缺陷降出力损失电量
-//                pewp.setYqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+                pewp.setYqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
                 pewp.setYqxjclssdl(0.0);
             }
         }
@@ -636,7 +636,7 @@ public class EquipmentInfo1Service {
             if(StringUtils.notEmp(pointValue))
             {
                 //月手动停机损失电量
-//                pewp.setYsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+               pewp.setYsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
                 pewp.setYsdtjssdl(0.0);
             }
         }
@@ -647,7 +647,7 @@ public class EquipmentInfo1Service {
             if(StringUtils.notEmp(pointValue))
             {
                 //月性能损失电量
-//                pewp.setYxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+                pewp.setYxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
                 pewp.setYxnssdl(0.0);
             }
         }
@@ -894,7 +894,7 @@ public class EquipmentInfo1Service {
             if(StringUtils.notEmp(pointValue))
             {
                 //年手动停机损失电量
-//                pewp.setNsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+                pewp.setNsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
                 pewp.setNsdtjssdl(0.0);
             }
         }
@@ -905,7 +905,7 @@ public class EquipmentInfo1Service {
             if(StringUtils.notEmp(pointValue))
             {
                 //年性能损失电量
-//                pewp.setNxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+                pewp.setNxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
                 pewp.setNxnssdl(0.0);
             }
         }
@@ -953,8 +953,8 @@ public class EquipmentInfo1Service {
             if(StringUtils.notEmp(pointValue))
             {
                 //年场外受累天气损失电量
-                pewp.setNcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+             //   pewp.setNcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+                pewp.setNcwsltqssdl(0.0);
             }
         }
 

+ 13 - 12
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo1Service.java

@@ -1003,7 +1003,7 @@ public class WindPowerInfo1Service {
             if (StringUtils.notEmp(pointValue)) {
                 //日限电停机损失电量
                 pewp.setRxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(), 2));
-
+                pewp.setRxdtjssdl(0.0);
             }
         }
 
@@ -1014,7 +1014,7 @@ public class WindPowerInfo1Service {
             if (StringUtils.notEmp(pointValue)) {
                 //日限电降出力损失电量
                 pewp.setRxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(), 2));
-
+                pewp.setRxdjclssdl(0.0);
             }
         }
 
@@ -1024,7 +1024,7 @@ public class WindPowerInfo1Service {
             if (StringUtils.notEmp(pointValue)) {
                 //日场外受累电网损失电量
                 pewp.setRcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(), 2));
-
+                pewp.setRcwsldwssdl(0.0);
             }
         }
         if (pointmap.containsKey(ContantXk.RCWSLTQSSDL)) {
@@ -1033,7 +1033,7 @@ public class WindPowerInfo1Service {
             if (StringUtils.notEmp(pointValue)) {
                 //日场外受累天气损失电量
                 pewp.setRcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(), 2));
-
+                pewp.setRcwsltqssdl(0.0);
             }
         }
 
@@ -1223,7 +1223,7 @@ public class WindPowerInfo1Service {
             if (StringUtils.notEmp(pointValue)) {
                 //月限电停机损失电量
                 pewp.setYxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(), 2));
-
+                pewp.setYxdtjssdl(0.0);
             }
         }
 
@@ -1234,7 +1234,7 @@ public class WindPowerInfo1Service {
             if (StringUtils.notEmp(pointValue)) {
                 //月限电降出力损失电量
                 pewp.setYxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(), 2));
-
+                pewp.setYxdjclssdl(0.0);
             }
         }
 
@@ -1244,7 +1244,7 @@ public class WindPowerInfo1Service {
             if (StringUtils.notEmp(pointValue)) {
                 //月场外受累电网损失电量
                 pewp.setYcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(), 2));
-
+                pewp.setYcwsldwssdl(0.0);
             }
         }
         if (pointmap.containsKey(ContantXk.YCWSLTQSSDL)) {
@@ -1253,7 +1253,7 @@ public class WindPowerInfo1Service {
             if (StringUtils.notEmp(pointValue)) {
                 //月场外受累天气损失电量
                 pewp.setYcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(), 2));
-
+                pewp.setYcwsltqssdl(0.0);
             }
         }
 
@@ -1443,8 +1443,9 @@ public class WindPowerInfo1Service {
             if (StringUtils.notEmp(pointValue)) {
                 //年限电停机损失电量
                 pewp.setNxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(), 2));
-
+                pewp.setNxdtjssdl(0.0);
             }
+
         }
 
 
@@ -1454,7 +1455,7 @@ public class WindPowerInfo1Service {
             if (StringUtils.notEmp(pointValue)) {
                 //年限电降出力损失电量
                 pewp.setNxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(), 2));
-
+                pewp.setNxdjclssdl(0.0);
             }
         }
 
@@ -1464,7 +1465,7 @@ public class WindPowerInfo1Service {
             if (StringUtils.notEmp(pointValue)) {
                 //年场外受累电网损失电量
                 pewp.setNcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(), 2));
-
+                pewp.setNcwsldwssdl(0.0);
             }
         }
         if (pointmap.containsKey(ContantXk.NCWSLTQSSDL)) {
@@ -1473,7 +1474,7 @@ public class WindPowerInfo1Service {
             if (StringUtils.notEmp(pointValue)) {
                 //年场外受累天气损失电量
                 pewp.setNcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(), 2));
-
+                pewp.setNcwsltqssdl(0.0);
             }
         }
 

+ 25 - 15
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo5Service.java

@@ -386,11 +386,15 @@ public class WindPowerInfo5Service {
                 Calendar cl=Calendar.getInstance();
                 cl.setTime(recordDate);
                 cl.add(Calendar.DAY_OF_MONTH,-1);
-                pepid1ls = proEconPowerstationInfoDay5Service.list().stream()
-                        .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
-                                && i.getWindpowerstationId().equals(wp.getId())
-                                && i.getLocation().equals(Location.wp.getValue()))
-                        .collect(Collectors.toList());
+                QueryWrapper<ProEconPowerstationInfoDay5> queryWrapper3= new QueryWrapper<>();
+                queryWrapper3.eq("record_date",DateUtils.truncate(cl.getTime())).eq("location",Location.wp.getValue()).eq("windpowerstation_id",wp.getId());
+                pepid1ls = proEconPowerstationInfoDay5Service.list(queryWrapper3);
+//
+//                        .stream()
+//                        .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+//                                && i.getWindpowerstationId().equals(wp.getId())
+//                                && i.getLocation().equals(Location.wp.getValue()))
+//                        .collect(Collectors.toList());
 
                 ProEconPowerstationInfoDay5 lastday5=null;
                 if(!pepid1ls.isEmpty())
@@ -475,11 +479,14 @@ public class WindPowerInfo5Service {
                 Calendar cl=Calendar.getInstance();
                 cl.setTime(recordDate);
                 cl.add(Calendar.DAY_OF_MONTH,-1);
-                pepid1ls = proEconPowerstationInfoDay5Service.list().stream()
-                        .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
-                                && i.getProjectId().equals(pj.getId())
-                                && i.getLocation().equals(Location.pj.getValue()))
-                        .collect(Collectors.toList());
+                QueryWrapper<ProEconPowerstationInfoDay5> queryWrapper4= new QueryWrapper<>();
+                queryWrapper4.eq("record_date",DateUtils.truncate(cl.getTime())).eq("location",Location.pj.getValue()).eq("project_id",pj.getId());
+                pepid1ls = proEconPowerstationInfoDay5Service.list(queryWrapper4);
+//                        .stream()
+//                        .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+//                                && i.getProjectId().equals(pj.getId())
+//                                && i.getLocation().equals(Location.pj.getValue()))
+//                        .collect(Collectors.toList());
                 ProEconPowerstationInfoDay5 lastday5=null;
                 if(!pepid1ls.isEmpty())
                 {
@@ -570,11 +577,14 @@ public class WindPowerInfo5Service {
                 Calendar cl=Calendar.getInstance();
                 cl.setTime(recordDate);
                 cl.add(Calendar.DAY_OF_MONTH,-1);
-                pepid1ls = proEconPowerstationInfoDay5Service.list().stream()
-                        .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
-                                && i.getLineId().equals(ln.getId())
-                                && i.getLocation().equals(Location.ln.getValue()))
-                        .collect(Collectors.toList());
+                QueryWrapper<ProEconPowerstationInfoDay5> queryWrapper2= new QueryWrapper<>();
+                queryWrapper.eq("record_date",DateUtils.truncate(cl.getTime())).eq("location",Location.ln.getValue()).eq("line_id",ln.getId());
+                pepid1ls = proEconPowerstationInfoDay5Service.list(queryWrapper2);
+//                        .stream()
+//                        .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+//                                && i.getLineId().equals(ln.getId())
+//                                && i.getLocation().equals(Location.ln.getValue()))
+//                        .collect(Collectors.toList());
                 ProEconPowerstationInfoDay5 lastday5=null;
                 if(!pepid1ls.isEmpty())
                 {

+ 31 - 400
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/RealtimeService.java

@@ -17,6 +17,7 @@ import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicReference;
 
 @Service
@@ -215,402 +216,7 @@ public class RealtimeService {
         end=new Date();
         System.out.println("执行用时"+ DateUtils.millisecondDiff(begin,end) +"秒");
         System.out.println("实时计算指标调度程序执行结束!。。。。。。");
-//        //保存线路点
-//        List<PointData> lineResultList = new ArrayList<>();
-//        lnls.stream().forEach(line -> {
-//            List<ProBasicEquipment> proBasicWindturbines = lnwtmap.get(line.getId());
-//            Map<String, ProBasicPowerstationPoint> proBasicWppointMap = linepointmap.get(line.getId());
-//            AtomicReference<Double> zssbf = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zssgl = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zllgl = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zbzgl = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zzsgl = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zzygl = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zkygl = new AtomicReference<>((double) 0);
-//            ProBasicPowerstationPoint ssfsWpPoint = null;
-//            if (line.getSpare4().equals("1")){
-//                ssfsWpPoint = proBasicWppointMap.get(ContantXk.SSPJFS);
-//            }else if (line.getSpare4().equals("2")){
-//                ssfsWpPoint = proBasicWppointMap.get(ContantXk.SSPJGZD);
-//            }
-//            ProBasicPowerstationPoint ssglWpPoint = proBasicWppointMap.get(ContantXk.SSZGL);
-//            ProBasicPowerstationPoint llglWpPoint = proBasicWppointMap.get(ContantXk.SSZLLGL);
-//            ProBasicPowerstationPoint bzglWpPoint = proBasicWppointMap.get(ContantXk.SSZBZGL);
-//            ProBasicPowerstationPoint zsglWpPoint = proBasicWppointMap.get(ContantXk.SSZNHGLZS);
-//            ProBasicPowerstationPoint zyglWpPoint = proBasicWppointMap.get(ContantXk.SSZZYGL);
-////            ProBasicPowerstationPoint kyglWpPoint = proBasicWppointMap.get(ContantXk.SSZKYGL);
-//
-//            double ssglsyz = 0;
-//            if (proBasicWppointMap.containsKey(ContantXk.SSGLSYZ)){
-//                ProBasicPowerstationPoint ssglsyzpoint = proBasicWppointMap.get(ContantXk.SSGLSYZ);
-//                try {
-//                    ssglsyz = edosUtil.getRealData(ssglsyzpoint).getPointValueInDouble();
-//                } catch (Exception e) {
-//                    e.printStackTrace();
-//                }
-//            }
-//            if (proBasicWppointMap.containsKey(ContantXk.SSZGLSYZ)){
-//                ProBasicPowerstationPoint sszglsyzpoint = proBasicWppointMap.get(ContantXk.SSZGLSYZ);
-//                lineResultList.add(PointUtil.createPointData(currentDate, ssglsyz, sszglsyzpoint.getNemCode(), sszglsyzpoint.getName()));
-//            }
-//
-////            proBasicWindturbines.stream().forEach(wt -> {
-//            for(ProBasicEquipment wt:proBasicWindturbines) {
-//                Map<String, ProBasicEquipmentPoint> equipmentPointMap = wtpAimap.get(wt.getId());
-//
-//
-//                ProBasicEquipmentPoint mxztPoint = equipmentPointMap.get(ContantXk.MXZT);
-//                double ssztmx = 0;
-//                try {
-//                    ssztmx = edosUtil.getRealData(mxztPoint).getPointValueInDouble();
-//                } catch (Exception e) {
-//                    throw new RuntimeException(e);
-//                }
-//                if (ssztmx == 12 || ssztmx == 13) {
-//                    continue;
-//                }
-//
-//                ProBasicEquipmentPoint ssbfPoint = null;
-//                if (wt.getId().contains("_WT_")) {
-//                    ssbfPoint = equipmentPointMap.get(ContantXk.SSBF);
-//                } else if (wt.getId().contains("_IN_")) {
-//                    ssbfPoint = equipmentPointMap.get(ContantXk.SSBG);
-//                }
-//
-////                ProBasicEquipmentPoint ssbfPoint = equipmentPointMap.get(ContantXk.SSBF);
-//                ProBasicEquipmentPoint ssglPoint = equipmentPointMap.get(ContantXk.CJ_SSGL);
-//                //理论功率测点
-//                ProBasicEquipmentPoint llglPoint = equipmentPointMap.get(ContantXk.LLGL);
-//                //保证功率测点
-//                ProBasicEquipmentPoint bzglPoint = equipmentPointMap.get(ContantXk.BZGL);
-//                //自算功率测点
-//                ProBasicEquipmentPoint zsglPoint = equipmentPointMap.get(ContantXk.ZSGL);
-//                //最优功率测点
-//                ProBasicEquipmentPoint zyglPoint = equipmentPointMap.get(ContantXk.ZYGL);
-////                //可用功率测点
-////                ProBasicEquipmentPoint kyglPoint = equipmentPointMap.get(ContantXk.KYGL);
-//
-//                ProBasicEquipmentPoint finalSsbfPoint = ssbfPoint;
-//                zssbf.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(finalSsbfPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zssgl.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(ssglPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zllgl.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(llglPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zbzgl.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(bzglPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zzsgl.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(zsglPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zzygl.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(zyglPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-////                zkygl.updateAndGet(v -> {
-////                    try {
-////                        return new Double((double) (v + edosUtil.getRealData(kyglPoint).getPointValueInDouble()));
-////                    } catch (Exception e) {
-////                        e.printStackTrace();
-////                    }
-////                    return v;
-////                });
-////            });
-//            }
-//            lineResultList.add(PointUtil.createPointData(currentDate, zssbf.get() / proBasicWindturbines.size(), ssfsWpPoint.getNemCode(), ssfsWpPoint.getName()));
-//            lineResultList.add(PointUtil.createPointData(currentDate, zssgl.get(), ssglWpPoint.getNemCode(), ssglWpPoint.getName()));
-//            lineResultList.add(PointUtil.createPointData(currentDate, zllgl.get(), llglWpPoint.getNemCode(), llglWpPoint.getName()));
-//            lineResultList.add(PointUtil.createPointData(currentDate, zbzgl.get(), bzglWpPoint.getNemCode(), bzglWpPoint.getName()));
-//            lineResultList.add(PointUtil.createPointData(currentDate, zzsgl.get(), zsglWpPoint.getNemCode(), zsglWpPoint.getName()));
-//            lineResultList.add(PointUtil.createPointData(currentDate, zzygl.get(), zyglWpPoint.getNemCode(), zyglWpPoint.getName()));
-////            lineResultList.add(PointUtil.createPointData(currentDate, zkygl.get(), kyglWpPoint.getNemCode(), kyglWpPoint.getName()));
-//        });
-//        edosUtil.sendMultiPoint(lineResultList);
-//        //保存期次点
-//        List<PointData> projectResultList = new ArrayList<>();
-//        pjls.stream().forEach(project -> {
-//            List<ProBasicLine> proBasicLines = prolinemap.get(project.getId());
-//            Map<String, ProBasicPowerstationPoint> proBasicWppointMap = propointmap.get(project.getId());
-//            AtomicReference<Double> zssbf = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zssgl = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zllgl = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zbzgl = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zzsgl = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zzygl = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zkygl = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zssglsyz = new AtomicReference<>((double) 0);
-//
-//            ProBasicPowerstationPoint ssfsWpPoint = null;
-//            if (project.getSpare4().equals("1")){
-//                ssfsWpPoint = proBasicWppointMap.get(ContantXk.SSPJFS);
-//            }else if (project.getSpare4().equals("2")){
-//                ssfsWpPoint = proBasicWppointMap.get(ContantXk.SSPJGZD);
-//            }
-//            ProBasicPowerstationPoint ssglWpPoint = proBasicWppointMap.get(ContantXk.SSZGL);
-//            ProBasicPowerstationPoint llglWpPoint = proBasicWppointMap.get(ContantXk.SSZLLGL);
-//            ProBasicPowerstationPoint bzglWpPoint = proBasicWppointMap.get(ContantXk.SSZBZGL);
-//            ProBasicPowerstationPoint zsglWpPoint = proBasicWppointMap.get(ContantXk.SSZNHGLZS);
-//            ProBasicPowerstationPoint zyglWpPoint = proBasicWppointMap.get(ContantXk.SSZZYGL);
-////            ProBasicPowerstationPoint kyglWpPoint = proBasicWppointMap.get(ContantXk.SSZKYGL);
-//            ProBasicPowerstationPoint ssglsyzWpPoint = proBasicWppointMap.get(ContantXk.SSZGLSYZ);
-//
-//            proBasicLines.stream().forEach(wp -> {
-//                Map<String, ProBasicPowerstationPoint> basicWppointMap = linepointmap.get(wp.getId());
-//                ProBasicPowerstationPoint ssbfPoint = null;
-//                if (wp.getSpare4().equals("1")){
-//                    ssbfPoint = basicWppointMap.get(ContantXk.SSPJFS);
-//                }else if (wp.getSpare4().equals("2")){
-//                    ssbfPoint = basicWppointMap.get(ContantXk.SSPJGZD);
-//                }
-//
-//                ProBasicPowerstationPoint ssglPoint = basicWppointMap.get(ContantXk.SSZGL);
-//                ProBasicPowerstationPoint ssglsyzPoint = basicWppointMap.get(ContantXk.SSZGLSYZ);
-//                //理论功率测点
-//                ProBasicPowerstationPoint llglPoint = basicWppointMap.get(ContantXk.SSZLLGL);
-//                //保证功率测点
-//                ProBasicPowerstationPoint bzglPoint = basicWppointMap.get(ContantXk.SSZBZGL);
-//                //自算功率测点
-//                ProBasicPowerstationPoint zsglPoint = basicWppointMap.get(ContantXk.SSZNHGLZS);
-//                //最优功率测点
-//                ProBasicPowerstationPoint zyglPoint = basicWppointMap.get(ContantXk.SSZZYGL);
-////                //可用功率测点
-////                ProBasicPowerstationPoint kyglPoint = basicWppointMap.get(ContantXk.SSZKYGL);
-//
-//                ProBasicPowerstationPoint finalSsbfPoint = ssbfPoint;
-//                zssbf.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(finalSsbfPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zssgl.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(ssglPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zssglsyz.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(ssglsyzPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zllgl.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(llglPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zbzgl.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(bzglPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zzsgl.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(zsglPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zzygl.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(zyglPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-////                zkygl.updateAndGet(v -> {
-////                    try {
-////                        return new Double((double) (v + edosUtil.getRealData(kyglPoint).getPointValueInDouble()));
-////                    } catch (Exception e) {
-////                        e.printStackTrace();
-////                    }
-////                    return v;
-////                });
-//            });
-//            projectResultList.add(PointUtil.createPointData(currentDate, zssbf.get() / proBasicLines.size(), ssfsWpPoint.getNemCode(), ssfsWpPoint.getName()));
-//            projectResultList.add(PointUtil.createPointData(currentDate, zssgl.get(), ssglWpPoint.getNemCode(), ssglWpPoint.getName()));
-//            projectResultList.add(PointUtil.createPointData(currentDate, zssglsyz.get(), ssglsyzWpPoint.getNemCode(), ssglsyzWpPoint.getName()));
-//            projectResultList.add(PointUtil.createPointData(currentDate, zllgl.get(), llglWpPoint.getNemCode(), llglWpPoint.getName()));
-//            projectResultList.add(PointUtil.createPointData(currentDate, zbzgl.get(), bzglWpPoint.getNemCode(), bzglWpPoint.getName()));
-//            projectResultList.add(PointUtil.createPointData(currentDate, zzsgl.get(), zsglWpPoint.getNemCode(), zsglWpPoint.getName()));
-//            projectResultList.add(PointUtil.createPointData(currentDate, zzygl.get(), zyglWpPoint.getNemCode(), zyglWpPoint.getName()));
-////            projectResultList.add(PointUtil.createPointData(currentDate, zkygl.get(), kyglWpPoint.getNemCode(), kyglWpPoint.getName()));
-//        });
-//        edosUtil.sendMultiPoint(projectResultList);
-//        //保存场站点
-//        List<PointData> wpResultList = new ArrayList<>();
-//        wpls.stream().forEach(wps -> {
-//            List<ProBasicProject> proBasicProjects = wppromap.get(wps.getId());
-//            Map<String, ProBasicPowerstationPoint> proBasicWppointMap = wppointmap.get(wps.getId());
-//            AtomicReference<Double> zssbf = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zssgl = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zssglsyz = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zllgl = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zbzgl = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zzsgl = new AtomicReference<>((double) 0);
-//            AtomicReference<Double> zzygl = new AtomicReference<>((double) 0);
-////            AtomicReference<Double> zkygl = new AtomicReference<>((double) 0);
-//
-//            ProBasicPowerstationPoint ssfsWpPoint = null;
-//            if (wps.getSpare4().equals("1")){
-//                ssfsWpPoint = proBasicWppointMap.get(ContantXk.SSPJFS);
-//            }else if (wps.getSpare4().equals("2")){
-//                ssfsWpPoint = proBasicWppointMap.get(ContantXk.SSPJGZD);
-//            }
-//
-//            ProBasicPowerstationPoint ssglWpPoint = proBasicWppointMap.get(ContantXk.SSZGL);
-//            ProBasicPowerstationPoint ssglsyzWpPoint = proBasicWppointMap.get(ContantXk.SSZGLSYZ);
-//            ProBasicPowerstationPoint llglWpPoint = proBasicWppointMap.get(ContantXk.SSZLLGL);
-//            ProBasicPowerstationPoint bzglWpPoint = proBasicWppointMap.get(ContantXk.SSZBZGL);
-//            ProBasicPowerstationPoint zsglWpPoint = proBasicWppointMap.get(ContantXk.SSZNHGLZS);
-//            ProBasicPowerstationPoint zyglWpPoint = proBasicWppointMap.get(ContantXk.SSZZYGL);
-////            ProBasicPowerstationPoint kyglWpPoint = proBasicWppointMap.get(ContantXk.SSZKYGL);
-//
-//            proBasicProjects.stream().forEach(wp -> {
-//                Map<String, ProBasicPowerstationPoint> basicWppointMap = propointmap.get(wp.getId());
-//
-//                ProBasicPowerstationPoint ssbfPoint = null;
-//                if (wp.getSpare4().equals("1")){
-//                    ssbfPoint = basicWppointMap.get(ContantXk.SSPJFS);
-//                }else if (wp.getSpare4().equals("2")){
-//                    ssbfPoint = basicWppointMap.get(ContantXk.SSPJGZD);
-//                }
-//                ProBasicPowerstationPoint ssglPoint = basicWppointMap.get(ContantXk.SSZGL);
-//                ProBasicPowerstationPoint ssglsyzPoint = basicWppointMap.get(ContantXk.SSZGLSYZ);
-//                //理论功率测点
-//                ProBasicPowerstationPoint llglPoint = basicWppointMap.get(ContantXk.SSZLLGL);
-//                //保证功率测点
-//                ProBasicPowerstationPoint bzglPoint = basicWppointMap.get(ContantXk.SSZBZGL);
-//                //自算功率测点
-//                ProBasicPowerstationPoint zsglPoint = basicWppointMap.get(ContantXk.SSZNHGLZS);
-//                //最优功率测点
-//                ProBasicPowerstationPoint zyglPoint = basicWppointMap.get(ContantXk.SSZZYGL);
-////                //可用功率测点
-////                ProBasicPowerstationPoint kyglPoint = basicWppointMap.get(ContantXk.SSZKYGL);
-//
-//                ProBasicPowerstationPoint finalSsbfPoint = ssbfPoint;
-//                zssbf.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(finalSsbfPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zssgl.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(ssglPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zssglsyz.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(ssglsyzPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zllgl.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(llglPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zbzgl.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(bzglPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zzsgl.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(zsglPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-//                zzygl.updateAndGet(v -> {
-//                    try {
-//                        return new Double((double) (v + edosUtil.getRealData(zyglPoint).getPointValueInDouble()));
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    return v;
-//                });
-////                zkygl.updateAndGet(v -> {
-////                    try {
-////                        return new Double((double) (v + edosUtil.getRealData(kyglPoint).getPointValueInDouble()));
-////                    } catch (Exception e) {
-////                        e.printStackTrace();
-////                    }
-////                    return v;
-////                });
-//            });
-//            wpResultList.add(PointUtil.createPointData(currentDate, zssbf.get() / proBasicProjects.size(), ssfsWpPoint.getNemCode(), ssfsWpPoint.getName()));
-//            wpResultList.add(PointUtil.createPointData(currentDate, zssgl.get(), ssglWpPoint.getNemCode(), ssglWpPoint.getName()));
-//            wpResultList.add(PointUtil.createPointData(currentDate, zssglsyz.get(), ssglsyzWpPoint.getNemCode(), ssglsyzWpPoint.getName()));
-//            wpResultList.add(PointUtil.createPointData(currentDate, zllgl.get(), llglWpPoint.getNemCode(), llglWpPoint.getName()));
-//            wpResultList.add(PointUtil.createPointData(currentDate, zbzgl.get(), bzglWpPoint.getNemCode(), bzglWpPoint.getName()));
-//            wpResultList.add(PointUtil.createPointData(currentDate, zzsgl.get(), zsglWpPoint.getNemCode(), zsglWpPoint.getName()));
-//            wpResultList.add(PointUtil.createPointData(currentDate, zzygl.get(), zyglWpPoint.getNemCode(), zyglWpPoint.getName()));
-////            wpResultList.add(PointUtil.createPointData(currentDate, zkygl.get(), kyglWpPoint.getNemCode(), kyglWpPoint.getName()));
-//        });
-//        edosUtil.sendMultiPoint(wpResultList);
+
 
     }
 
@@ -681,6 +287,7 @@ public class RealtimeService {
                 lineResultList.add(PointUtil.createPointData(currentDate, ssglsyz, sszglsyzpoint.getNemCode(), sszglsyzpoint.getName()));
             }
 
+            AtomicInteger wtnumber= new AtomicInteger();
 //            proBasicWindturbines.stream().forEach(wt -> {
             for(ProBasicEquipment wt:proBasicWindturbines) {
                 Map<String, ProBasicEquipmentPoint> equipmentPointMap = wtpAimap.get(wt.getId());
@@ -698,10 +305,16 @@ public class RealtimeService {
                 }
 
                 ProBasicEquipmentPoint ssbfPoint = null;
+//                if (wt.getId().contains("_WT_")) {
+//                    ssbfPoint = equipmentPointMap.get(ContantXk.SSBF);
+//                } else if (wt.getId().contains("_IN_")) {
+//                    ssbfPoint = equipmentPointMap.get(ContantXk.SSBG);
+//                }
+
                 if (wt.getId().contains("_WT_")) {
-                    ssbfPoint = equipmentPointMap.get(ContantXk.SSBF);
+                    ssbfPoint = equipmentPointMap.get(ContantXk.CJ_SSFS);
                 } else if (wt.getId().contains("_IN_")) {
-                    ssbfPoint = equipmentPointMap.get(ContantXk.SSBG);
+                    ssbfPoint = equipmentPointMap.get(ContantXk.CJ_SSFS);
                 }
 
 //                ProBasicEquipmentPoint ssbfPoint = equipmentPointMap.get(ContantXk.SSBF);
@@ -720,7 +333,21 @@ public class RealtimeService {
                 ProBasicEquipmentPoint finalSsbfPoint = ssbfPoint;
                 zssbf.updateAndGet(v -> {
                     try {
-                        return new Double((double) (v + edosUtil.getRealData(finalSsbfPoint).getPointValueInDouble()));
+                        if(wt.getId().contains("_F_"))
+                        {
+                            double speed=edosUtil.getRealData(finalSsbfPoint).getPointValueInDouble();
+                            if(speed < 100 && speed > 0)
+                            {
+                                wtnumber.getAndIncrement();
+                                return new Double((double) (v + speed));
+                            }
+                        }else
+                        {
+                            wtnumber.getAndIncrement();
+                            return new Double((double) (v + edosUtil.getRealData(finalSsbfPoint).getPointValueInDouble()));
+                        }
+
+
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -776,7 +403,11 @@ public class RealtimeService {
 //                });
 //            });
             }
-            lineResultList.add(PointUtil.createPointData(currentDate, zssbf.get() / proBasicWindturbines.size(), ssfsWpPoint.getNemCode(), ssfsWpPoint.getName()));
+            if(wtnumber.get()!=0)
+            {
+                lineResultList.add(PointUtil.createPointData(currentDate, zssbf.get() / wtnumber.get(), ssfsWpPoint.getNemCode(), ssfsWpPoint.getName()));
+            }
+
             lineResultList.add(PointUtil.createPointData(currentDate, zssgl.get(), ssglWpPoint.getNemCode(), ssglWpPoint.getName()));
             lineResultList.add(PointUtil.createPointData(currentDate, zllgl.get(), llglWpPoint.getNemCode(), llglWpPoint.getName()));
             lineResultList.add(PointUtil.createPointData(currentDate, zbzgl.get(), bzglWpPoint.getNemCode(), bzglWpPoint.getName()));

+ 23 - 60
realtime/generationXK-service/src/main/java/com/gyee/generation/task/thread/EquipmentInfo1ThreadPool.java

@@ -209,15 +209,6 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			}
 		}
 
-		double rfdl=0.0;
-		double rgzssdl=0.0;
-		double rcnslgzssdl=0.0;
-		double rjxssdl=0.0;
-		double rcnsljxssdl=0.0;
-		double rxdtjssdl=0.0;
-		double rxdjclssdl=0.0;
-		double rcwsldwssdl=0.0;
-		double rcwsltqssdl=0.0;
 
 
 		if(pointmap.containsKey(ContantXk.RFDL))
@@ -229,7 +220,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日发电量
 				pewp.setRfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				rfdl=pewp.getRfdl();
+
 			}
 		}
 		if(pointmap.containsKey(ContantXk.RKYDL))
@@ -266,7 +257,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日故障损失电量
 				pewp.setRgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				rgzssdl=pewp.getRgzssdl();
+
 			}
 		}
 		if(pointmap.containsKey(ContantXk.RCNSLGZSSDL))
@@ -277,7 +268,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日场内受累故障损失电量
 				pewp.setRcnslgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				rcnslgzssdl=pewp.getRcnslgzssdl();
+
 			}
 		}
 
@@ -289,7 +280,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日检修损失电量
 				pewp.setRjxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				rjxssdl=pewp.getRjxssdl();
+
 			}
 		}
 
@@ -301,7 +292,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日场内受累检修损失电量
 				pewp.setRcnsljxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				rcnsljxssdl=pewp.getRcnsljxssdl();
+
 			}
 		}
 
@@ -313,6 +304,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日待机损失电量
 				pewp.setRdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+
 			}
 		}
 		if(pointmap.containsKey(ContantXk.RQXJCLSSDL))
@@ -358,7 +350,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日限电停机损失电量
 				pewp.setRxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				rxdtjssdl=pewp.getRxdtjssdl();
+
 			}
 		}
 
@@ -371,7 +363,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日限电降出力损失电量
 				pewp.setRxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				rxdjclssdl=pewp.getRxdjclssdl();
+
 			}
 		}
 
@@ -383,7 +375,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日场外受累电网损失电量
 				pewp.setRcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				rcwsldwssdl=pewp.getRcwsldwssdl();
+
 			}
 		}
 		if(pointmap.containsKey(ContantXk.RCWSLTQSSDL))
@@ -394,7 +386,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日场外受累天气损失电量
 				pewp.setRcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				rcwsltqssdl=pewp.getRcwsltqssdl();
+
 			}
 		}
 
@@ -433,8 +425,6 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			}
 		}
 
-		double rllfdl=rfdl+rgzssdl+rcnslgzssdl+rjxssdl+rcnsljxssdl+rcnsljxssdl+rxdtjssdl+rxdjclssdl+rcwsldwssdl+rcwsltqssdl;
-		pewp.setRllfdl(StringUtils.round(rllfdl,2));
 
 //*******************************************日信息统计*********************************************************/
 
@@ -484,15 +474,6 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 
 		}
 
-		double yfdl=0.0;
-		double ygzssdl=0.0;
-		double ycnslgzssdl=0.0;
-		double yjxssdl=0.0;
-		double ycnsljxssdl=0.0;
-		double yxdtjssdl=0.0;
-		double yxdjclssdl=0.0;
-		double ycwsldwssdl=0.0;
-		double ycwsltqssdl=0.0;
 
 		if(pointmap.containsKey(ContantXk.YFDL))
 		{
@@ -503,7 +484,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月发电量
 				pewp.setYfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				yfdl=pewp.getYfdl();
+
 
 			}
 		}
@@ -541,7 +522,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月故障损失电量
 				pewp.setYgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				ygzssdl=pewp.getYgzssdl();
+
 
 			}
 		}
@@ -553,7 +534,6 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月场内受累故障损失电量
 				pewp.setYcnslgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				ycnslgzssdl=pewp.getYcnslgzssdl();
 
 			}
 		}
@@ -566,7 +546,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月检修损失电量
 				pewp.setYjxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				yjxssdl=pewp.getYjxssdl();
+
 
 			}
 		}
@@ -579,7 +559,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月场内受累检修损失电量
 				pewp.setYcnsljxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				ycnsljxssdl=pewp.getYcnsljxssdl();
+
 
 			}
 		}
@@ -641,7 +621,6 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月限电停机损失电量
 				pewp.setYxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				yxdtjssdl=pewp.getYxdtjssdl();
 
 			}
 		}
@@ -655,7 +634,6 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月限电降出力损失电量
 				pewp.setYxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				yxdjclssdl=pewp.getYxdjclssdl();
 
 			}
 		}
@@ -668,7 +646,6 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月场外受累电网损失电量
 				pewp.setYcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				ycwsldwssdl=pewp.getYcwsldwssdl();
 
 			}
 		}
@@ -680,7 +657,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月场外受累天气损失电量
 				pewp.setYcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				ycwsltqssdl=pewp.getYcwsltqssdl();
+
 			}
 		}
 
@@ -719,8 +696,6 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			}
 		}
 
-		double yllfdl=yfdl+ygzssdl+ycnslgzssdl+yjxssdl+ycnsljxssdl+ycnsljxssdl+yxdtjssdl+yxdjclssdl+ycwsldwssdl+ycwsltqssdl;
-		pewp.setYllfdl(StringUtils.round(yllfdl,2));
 //*******************************************月信息统计*********************************************************/
 
 //*******************************************年信息统计*********************************************************/
@@ -769,15 +744,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			}
 
 		}
-		double nfdl=0.0;
-		double ngzssdl=0.0;
-		double ncnslgzssdl=0.0;
-		double njxssdl=0.0;
-		double ncnsljxssdl=0.0;
-		double nxdtjssdl=0.0;
-		double nxdjclssdl=0.0;
-		double ncwsldwssdl=0.0;
-		double ncwsltqssdl=0.0;
+
 		if(pointmap.containsKey(ContantXk.NFDL))
 		{
 			ProBasicEquipmentPoint point= pointmap.get(ContantXk.NFDL);
@@ -787,7 +754,6 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年发电量
 				pewp.setNfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				nfdl=pewp.getNfdl();
 
 			}
 		}
@@ -825,7 +791,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年故障损失电量
 				pewp.setNgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				ngzssdl=pewp.getNgzssdl();
+
 
 			}
 		}
@@ -837,7 +803,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年场内受累故障损失电量
 				pewp.setNcnslgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				ncnslgzssdl=pewp.getNcnslgzssdl();
+
 
 			}
 		}
@@ -850,7 +816,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年检修损失电量
 				pewp.setNjxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				njxssdl=pewp.getNjxssdl();
+
 
 			}
 		}
@@ -863,7 +829,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年场内受累检修损失电量
 				pewp.setNcnsljxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				ncnsljxssdl=pewp.getNcnsljxssdl();
+
 
 
 			}
@@ -926,7 +892,6 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年限电停机损失电量
 				pewp.setNxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				nxdtjssdl=pewp.getNxdtjssdl();
 
 			}
 		}
@@ -940,7 +905,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年限电降出力损失电量
 				pewp.setNxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				nxdjclssdl=pewp.getNxdjclssdl();
+
 
 			}
 		}
@@ -953,7 +918,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年场外受累电网损失电量
 				pewp.setNcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				ncwsldwssdl=pewp.getNcwsldwssdl();
+
 
 			}
 		}
@@ -965,7 +930,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年场外受累天气损失电量
 				pewp.setNcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-				ncwsltqssdl=pewp.getNcwsltqssdl();
+
 			}
 		}
 
@@ -1004,8 +969,6 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			}
 		}
 
-		double nllfdl=nfdl+ngzssdl+ncnslgzssdl+njxssdl+ncnsljxssdl+ncnsljxssdl+nxdtjssdl+nxdjclssdl+ncwsldwssdl+ncwsltqssdl;
-		pewp.setNllfdl(StringUtils.round(nllfdl,2));
 	}
 
 	private void setPowerandSpeedYear(ProEconEquipmentInfoDay1 pewp) {

+ 105 - 9
realtime/generationXK-service/src/main/java/com/gyee/generation/task/thread/GoodnessOfFitThreadPool.java

@@ -123,13 +123,62 @@ public class GoodnessOfFitThreadPool implements Callable<String>, Serializable {
 			if(fitMap.containsKey(wt.getId()))
 			{
 				Map<String, Double> map=fitMap.get(wt.getId());
-				po.setDayGoodness(null!=map.get("day")?map.get("day"):0.0);
-				po.setMonthGoodness(null!=map.get("month")?map.get("month"):0.0);
-				po.setYearGoodness(null!=map.get("year")?map.get("year"):0.0);
 
-				po.setDayGoodness(StringUtils.round(po.getDayGoodness()*100,2));
-				po.setYearGoodness(StringUtils.round(po.getYearGoodness()*100,2));
-				po.setMonthGoodness(StringUtils.round(po.getMonthGoodness()*100,2));
+				if(map.containsKey("day"))
+				{
+					double temp=map.get("day")*100;
+					if(temp>100)
+					{
+						temp=100;
+					}else if(temp<0)
+					{
+						temp=0.0;
+					}
+
+					po.setDayGoodness(StringUtils.round(temp,2));
+				}else {
+					po.setDayGoodness(0.0);
+				}
+
+				if(map.containsKey("month"))
+				{
+					double temp=map.get("month")*100;
+					if(temp>100)
+					{
+						temp=100;
+					}else if(temp<0)
+					{
+						temp=0.0;
+					}
+
+					po.setMonthGoodness(StringUtils.round(temp,2));
+				}else {
+					po.setMonthGoodness(0.0);
+				}
+
+				if(map.containsKey("year"))
+				{
+					double temp=map.get("year")*100;
+					if(temp>100)
+					{
+						temp=100;
+					}else if(temp<0)
+					{
+						temp=0.0;
+					}
+
+					po.setYearGoodness(StringUtils.round(temp,2));
+				}else {
+					po.setYearGoodness(0.0);
+				}
+
+
+//				po.setMonthGoodness(null!=map.get("month")?map.get("month"):0.0);
+//				po.setYearGoodness(null!=map.get("year")?map.get("year"):0.0);
+//
+//				po.setDayGoodness(StringUtils.round(po.getDayGoodness()*100,2));
+//				po.setYearGoodness(StringUtils.round(po.getYearGoodness()*100,2));
+//				po.setMonthGoodness(StringUtils.round(po.getMonthGoodness()*100,2));
 			}else
 			{
 				po.setDayGoodness(0.0);
@@ -140,9 +189,56 @@ public class GoodnessOfFitThreadPool implements Callable<String>, Serializable {
 			if(coefficientMap.containsKey(wt.getId()))
 			{
 				Map<String, Double> map=coefficientMap.get(wt.getId());
-				po.setDayCoefficient(null!=map.get("day")?map.get("day"):0.0);
-				po.setMonthCoefficient(null!=map.get("month")?map.get("month"):0.0);
-				po.setYearCoefficient(null!=map.get("year")?map.get("year"):0.0);
+				if(map.containsKey("day"))
+				{
+					double temp=map.get("day")*100;
+					if(temp>100)
+					{
+						temp=100;
+					}else if(temp<0)
+					{
+						temp=0.0;
+					}
+
+					po.setDayCoefficient(StringUtils.round(temp,2));
+				}else {
+					po.setDayCoefficient(0.0);
+				}
+
+				if(map.containsKey("month"))
+				{
+					double temp=map.get("month")*100;
+					if(temp>100)
+					{
+						temp=100;
+					}else if(temp<0)
+					{
+						temp=0.0;
+					}
+
+					po.setMonthCoefficient(StringUtils.round(temp,2));
+				}else {
+					po.setMonthCoefficient(0.0);
+				}
+
+				if(map.containsKey("year"))
+				{
+					double temp=map.get("year")*100;
+					if(temp>100)
+					{
+						temp=100;
+					}else if(temp<0)
+					{
+						temp=0.0;
+					}
+
+					po.setYearCoefficient(StringUtils.round(temp,2));
+				}else {
+					po.setYearCoefficient(0.0);
+				}
+//				po.setDayCoefficient(null!=map.get("day")?map.get("day"):0.0);
+//				po.setMonthCoefficient(null!=map.get("month")?map.get("month"):0.0);
+//				po.setYearCoefficient(null!=map.get("year")?map.get("year"):0.0);
 
 			}else
 			{

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

@@ -130,8 +130,8 @@ db:
 #  url2: http://127.0.0.1:8011/ts
 
 #参与计算的场站
-#runWindpowerstation: SXJ_KGDL_GJY_FDC_STA
-runWindpowerstation: SXJ_KGDL_DJY_FDC_STA,SXJ_KGDL_NJL_FDC_STA,SXJ_KGDL_YF_FDC_STA,SXJ_KGDL_YLZ_FDC_STA,SXJ_KGDL_XWT_FDC_STA,SXJ_KGDL_PTZ_FDC_STA,SXJ_KGDL_GJY_FDC_STA,SXJ_KGDL_BHB_FDC_STA,SXJ_KGDL_HSM_FDC_STA,SXJ_KGDL_YTY_FDC_STA,SXJ_KGDL_BHB3_FDC_STA,SXJ_KGDL_SY_GDC_STA,SXJ_KGDL_PDL_FDC_STA,SXJ_KGDL_ZK_FDC_STA,SXJ_KGDL_JR_GDC_STA,SXJ_KGDL_FS_GDC_STA,SXJ_KGDL_HR_GDC_STA,SXJ_KGDL_YY_GDC_STA,SXJ_KGDL_PL_GDC_STA,SXJ_KGDL_YG_GDC_STA,SXJ_KGDL_YX_GDC_STA,SXJ_KGDL_TZ_GDC_STA,SXJ_KGDL_TL_GDC_STA
+runWindpowerstation: SXJ_KGDL_GJY_FDC_STA
+#runWindpowerstation: SXJ_KGDL_DJY_FDC_STA,SXJ_KGDL_NJL_FDC_STA,SXJ_KGDL_YF_FDC_STA,SXJ_KGDL_YLZ_FDC_STA,SXJ_KGDL_XWT_FDC_STA,SXJ_KGDL_PTZ_FDC_STA,SXJ_KGDL_GJY_FDC_STA,SXJ_KGDL_BHB_FDC_STA,SXJ_KGDL_HSM_FDC_STA,SXJ_KGDL_YTY_FDC_STA,SXJ_KGDL_BHB3_FDC_STA,SXJ_KGDL_SY_GDC_STA,SXJ_KGDL_PDL_FDC_STA,SXJ_KGDL_ZK_FDC_STA,SXJ_KGDL_JR_GDC_STA,SXJ_KGDL_FS_GDC_STA,SXJ_KGDL_HR_GDC_STA,SXJ_KGDL_YY_GDC_STA,SXJ_KGDL_PL_GDC_STA,SXJ_KGDL_YG_GDC_STA,SXJ_KGDL_YX_GDC_STA,SXJ_KGDL_TZ_GDC_STA,SXJ_KGDL_TL_GDC_STA
 
 #计算状态用ai或者di
 clauStatus:

+ 4 - 2
realtime/generationXK-service/src/test/java/com/gyee/generation/GenerationTest.java

@@ -1,5 +1,6 @@
 package com.gyee.generation;
 
+import com.gyee.generation.service.StationPower.StationPowerService;
 import com.gyee.generation.service.initalcache.CacheService;
 import com.gyee.generation.service.realtimelibrary.*;
 import org.junit.Test;
@@ -41,7 +42,8 @@ public class GenerationTest {
     private CalculationService calculationService;
     @Resource
     private SafetyDayService safetyDayService;
-
+    @Resource
+    private StationPowerService stationPowerService;
     @Test
     public void test1() throws Exception {
         cacheService.initRedisCache();
@@ -94,6 +96,6 @@ public class GenerationTest {
 
 //        safetyDayService.saveSafetyday();
 
-
+        stationPowerService.predictedPower();
     }
 }

+ 23 - 22
realtime/generationXK-service/src/test/java/com/gyee/generation/HealthTest.java

@@ -1,7 +1,8 @@
 package com.gyee.generation;
 
-import com.gyee.generation.service.*;
-import com.gyee.generation.util.DateUtils;
+import com.gyee.generation.service.InitialRedisService;
+import com.gyee.generation.service.InputOrOutPutService;
+import com.gyee.generation.service.initalcache.CacheService;
 import com.gyee.generation.util.SpringUtils;
 import org.springframework.boot.SpringApplication;
 
@@ -21,10 +22,10 @@ public class HealthTest {
         Calendar c = Calendar.getInstance();
         Date begin=null;
         Date end=null;
-//        CacheService cacheService= SpringUtils.getBean("cacheService");
-//        cacheService.initRedisCache();
-//
-//        System.out.println("完成!。。。。。。");
+        CacheService cacheService= SpringUtils.getBean("cacheService");
+        cacheService.initRedisCache();
+
+        System.out.println("完成!。。。。。。");
 //
 //
 //
@@ -137,14 +138,14 @@ public class HealthTest {
 //        System.out.println("曲线拟合调度程序执行结束!。。。。。。");
 //
 //
-        begin=new Date();
-        System.out.println("场站指标记录调度程序执行开始!。。。。。。");
-        WindPowerInfo1Service windPowerInfo1Service= SpringUtils.getBean("windPowerInfo1Service");
-        WindPowerInfo2Service windPowerInfo2Service= SpringUtils.getBean("windPowerInfo2Service");
-        WindPowerInfo3Service windPowerInfo3Service= SpringUtils.getBean("windPowerInfo3Service");
-        WindPowerInfo4Service windPowerInfo4Service= SpringUtils.getBean("windPowerInfo4Service");
-        WindPowerInfo5Service windPowerInfo5Service= SpringUtils.getBean("windPowerInfo5Service");
-        WindPowerInfo6Service windPowerInfo6Service= SpringUtils.getBean("windPowerInfo6Service");
+//        begin=new Date();
+//        System.out.println("场站指标记录调度程序执行开始!。。。。。。");
+//        WindPowerInfo1Service windPowerInfo1Service= SpringUtils.getBean("windPowerInfo1Service");
+//        WindPowerInfo2Service windPowerInfo2Service= SpringUtils.getBean("windPowerInfo2Service");
+//        WindPowerInfo3Service windPowerInfo3Service= SpringUtils.getBean("windPowerInfo3Service");
+//        WindPowerInfo4Service windPowerInfo4Service= SpringUtils.getBean("windPowerInfo4Service");
+//        WindPowerInfo5Service windPowerInfo5Service= SpringUtils.getBean("windPowerInfo5Service");
+//        WindPowerInfo6Service windPowerInfo6Service= SpringUtils.getBean("windPowerInfo6Service");
 //
 //        windPowerInfo1Service.calLineInfoDay(c.getTime());
 //        windPowerInfo1Service.calProjectInfoDay(c.getTime());
@@ -164,11 +165,11 @@ public class HealthTest {
 //        windPowerInfo3Service.calCompanyInfoDay(c.getTime());
 //        windPowerInfo3Service.calRegionInfoDay(c.getTime());
 //
-        windPowerInfo4Service.calLineInfoDay(c.getTime());
-        windPowerInfo4Service.calProjectInfoDay(c.getTime());
-        windPowerInfo4Service.calWindpowerInfoDay(c.getTime());
-        windPowerInfo4Service.calCompanyInfoDay(c.getTime());
-        windPowerInfo4Service.calRegionInfoDay(c.getTime());
+//        windPowerInfo4Service.calLineInfoDay(c.getTime());
+//        windPowerInfo4Service.calProjectInfoDay(c.getTime());
+//        windPowerInfo4Service.calWindpowerInfoDay(c.getTime());
+//        windPowerInfo4Service.calCompanyInfoDay(c.getTime());
+//        windPowerInfo4Service.calRegionInfoDay(c.getTime());
 //
 //        windPowerInfo5Service.calLineInfoDay(c.getTime());
 //        windPowerInfo5Service.calProjectInfoDay(c.getTime());
@@ -182,9 +183,9 @@ public class HealthTest {
 //        windPowerInfo6Service.calCompanyInfoDay(c.getTime());
 //        windPowerInfo6Service.calRegionInfoDay(c.getTime());
 //
-        end=new Date();
-        System.out.println("执行用时"+ DateUtils.secondsDiff(begin,end) +"秒");
-        System.out.println("场站指标记录调度程序执行结束!。。。。。。");
+//        end=new Date();
+//        System.out.println("执行用时"+ DateUtils.secondsDiff(begin,end) +"秒");
+//        System.out.println("场站指标记录调度程序执行结束!。。。。。。");
 //
 //
 //