Pārlūkot izejas kodu

计算服务修改

shilin 1 gadu atpakaļ
vecāks
revīzija
4f9b7e631c
55 mainītis faili ar 1647 papildinājumiem un 810 dzēšanām
  1. 44 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/GenerationMain.java
  2. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/config/GeneratorCodeConfig.java
  3. 84 83
      realtime/generationXK-service/src/main/java/com/gyee/generation/config/XxlJobConfig.java
  4. 26 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/init/CacheContext.java
  5. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/AlarmTsMapper.java
  6. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconCurveFittMonthMainMapper.java
  7. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconCurveFittMonthSubMapper.java
  8. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconCurveFittYearMainMapper.java
  9. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconCurveFittYearSubMapper.java
  10. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconCurveFittingMainMapper.java
  11. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconCurveFittingSubMapper.java
  12. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconWtCurveFittingMapper.java
  13. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconWtCurveFittingMonthMapper.java
  14. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconWtCurveFittingYearMapper.java
  15. 20 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/vo/AlarmVo.java
  16. 4 6
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/CoefficientService.java
  17. 40 25
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo1Service.java
  18. 19 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo2Service.java
  19. 19 3
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo3Service.java
  20. 18 3
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo4Service.java
  21. 19 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo5Service.java
  22. 53 7
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfoDayTopService.java
  23. 8 7
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/GoodnessOfFitService.java
  24. 9 9
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/PowerCurveFittingByTimeGfService.java
  25. 63 17
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/PowerCurveFittingByTimeService.java
  26. 28 4
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/ShutdownnewService.java
  27. 22 7
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindturbineGoodnessService.java
  28. 19 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WtAlysisDayService.java
  29. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/IProEconCurveFittMonthMainService.java
  30. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/IProEconCurveFittMonthSubService.java
  31. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/IProEconCurveFittYearMainService.java
  32. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/IProEconCurveFittYearSubService.java
  33. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/IProEconCurveFittingMainService.java
  34. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/IProEconCurveFittingSubService.java
  35. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/IProEconWtCurveFittingMonthService.java
  36. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/IProEconWtCurveFittingService.java
  37. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/IProEconWtCurveFittingYearService.java
  38. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconCurveFittMonthMainServiceImpl.java
  39. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconCurveFittMonthSubServiceImpl.java
  40. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconCurveFittYearMainServiceImpl.java
  41. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconCurveFittYearSubServiceImpl.java
  42. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconCurveFittingMainServiceImpl.java
  43. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconCurveFittingSubServiceImpl.java
  44. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconWtCurveFittingMonthServiceImpl.java
  45. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconWtCurveFittingServiceImpl.java
  46. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconWtCurveFittingYearServiceImpl.java
  47. 190 201
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/initalcache/CacheService.java
  48. 236 230
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/CycleCalculationService.java
  49. 35 16
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/StatusService.java
  50. 483 71
      realtime/generationXK-service/src/main/java/com/gyee/generation/task/SaticSchedulePgTask.java
  51. 88 29
      realtime/generationXK-service/src/main/java/com/gyee/generation/task/thread/EquipmentInfo1ThreadPool.java
  52. 8 8
      realtime/generationXK-service/src/main/resources/application-jn.yml
  53. 1 1
      realtime/generationXK-service/src/test/java/com/gyee/generation/GenerationTest.java
  54. 55 19
      realtime/generationXK-service/src/test/java/com/gyee/generation/HealthTest.java
  55. 8 6
      realtime/generationXK-service/src/test/java/com/gyee/generation/RealTest.java

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

@@ -16,9 +16,51 @@ public class GenerationMain {
     public static void main(String[] args) throws Exception {
         SpringApplication.run(GenerationMain.class, args);
 
-//        StatusService statusService= SpringUtils.getBean("statusService");
+//        Calendar c = Calendar.getInstance();
+//        Date begin=null;
+//        Date end=null;
+//        c.set(Calendar.DAY_OF_MONTH,1);
 //
-//       statusService.startStatusReal();
+//        c.setTime(DateUtils.truncate(c.getTime()));
+//
+//        begin=new Date();
+//        System.out.println("设备指标记录调度程序执行开始!。。。。。。");
+//        for(int i=0;i<22;i++)
+//        {
+//
+//
+//
+//            System.out.println(DateUtils.format(c.getTime(),"yyyy-MM-dd HH:mm:ss").toString());
+//            EquipmentInfo1Service equipmentInfo1Service= SpringUtils.getBean("equipmentInfo1Service");
+//            EquipmentInfo2Service equipmentInfo2Service= SpringUtils.getBean("equipmentInfo2Service");
+//            EquipmentInfo3Service equipmentInfo3Service= SpringUtils.getBean("equipmentInfo3Service");
+//            EquipmentInfo4Service equipmentInfo4Service= SpringUtils.getBean("equipmentInfo4Service");
+//            EquipmentInfo5Service equipmentInfo5Service= SpringUtils.getBean("equipmentInfo5Service");
+//            EquipmentInfoDayTopService equipmentInfoDayTopService= SpringUtils.getBean("equipmentInfoDayTopService");
+//            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());
+//            equipmentInfoDayTopService.calEquipmentInfoYearTop(c.getTime());
+//
+//
+//            c.add(Calendar.DAY_OF_MONTH,1);
+//
+//            System.out.println("完成一次!。。。。。。");
+//        }
+//
+//        end=new Date();
+//        System.out.println("执行用时"+ DateUtils.secondsDiff(begin,end) +"秒");
+//        System.out.println("设备指标记录调度程序执行结束!。。。。。。");
 
 
         System.out.println("完成");

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

@@ -40,7 +40,7 @@ public class GeneratorCodeConfig {
         GlobalConfig gc = new GlobalConfig();
         String projectPath = System.getProperty("user.dir");
         gc.setOutputDir(projectPath+"/realtime/generationXK-service"+ "/src/main/java");
-        gc.setAuthor("xieshengjie");
+        gc.setAuthor("shilin");
         gc.setOpen(false);
         //实体属性 Swagger2 注解
         gc.setSwagger2(false);
@@ -61,7 +61,7 @@ public class GeneratorCodeConfig {
         dsc.setDriverName("org.postgresql.Driver");
         dsc.setUsername("postgres");
         dsc.setPassword("gd123");
-        dsc.setUrl("jdbc:postgresql://124.70.75.91:5432/sd20230309");
+        dsc.setUrl("jdbc:postgresql://10.81.3.151:5432/IMS_NEM_JN");
 //        dsc.setDriverName("org.postgresql.Driver");
 //        dsc.setUsername("postgres");
 //        dsc.setPassword("postgres");

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

@@ -1,85 +1,86 @@
-package com.gyee.generation.config;
-
-
-import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.EnvironmentAware;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.PropertySource;
-import org.springframework.core.env.Environment;
-
-/**
- * xxl-job config
- *
- * @author xuxueli 2017-04-28
- */
-
-
-@Configuration
-//@PropertySource("classpath:xxl-job-executor.properties")
+//package com.gyee.generation.config;
+//
+//
+//import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.context.EnvironmentAware;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.context.annotation.PropertySource;
+//import org.springframework.core.env.Environment;
+//
+///**
+// * xxl-job config
+// *
+// * @author xuxueli 2017-04-28
+// */
+//
+//
+//@Configuration
+////@PropertySource("classpath:xxl-job-executor.properties")
 //@PropertySource("classpath:xxl-job-executor2.properties")
-//@PropertySource("classpath:xxl-job-executor3.properties")
-//@PropertySource("classpath:xxl-job-executor4.properties")
-//@PropertySource("classpath:xxl-job-executorWPLY.properties")
-//@PropertySource("classpath:xxl-job-executorRG.properties")
-//@PropertySource("classpath:xxl-job-executorJN.properties")
+////@PropertySource("classpath:xxl-job-executor3.properties")
+////@PropertySource("classpath:xxl-job-executor4.properties")
+////@PropertySource("classpath:xxl-job-executorWPLY.properties")
+////@PropertySource("classpath:xxl-job-executorRG.properties")
+////@PropertySource("classpath:xxl-job-executorJN.properties")
+////
+////@PropertySource("classpath:xxl-job-accuracy.properties")
+////@PropertySource("classpath:xxl-job-7001.properties")
+////@PropertySource("classpath:xxl-job-7002.properties")
+////@PropertySource("classpath:xxl-job-7003.properties")
+////@PropertySource("classpath:xxl-job-executorGF001.properties")
+////@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-region.properties")
+//public class XxlJobConfig implements EnvironmentAware {
+//    private Environment env;
+//
+//
+//    @Override
+//    public void setEnvironment(Environment environment) {
+//        this.env = environment;
+//    }
+//
+//    private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
+//
+//
+//    @Bean
+//    public XxlJobSpringExecutor xxlJobExecutor() {
+//        logger.info(">>>>>>>>>>> xxl-job config init.");
+//        XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
+//        xxlJobSpringExecutor.setAdminAddresses(env.getProperty("xxl.job.admin.addresses"));
+//        xxlJobSpringExecutor.setAppname(env.getProperty("xxl.job.executor.appname"));
+//        xxlJobSpringExecutor.setAddress(env.getProperty("xxl.job.executor.address"));
+//        xxlJobSpringExecutor.setIp(env.getProperty("xxl.job.executor.ip"));
+//        xxlJobSpringExecutor.setPort(Integer.parseInt(env.getProperty("xxl.job.executor.port")));
+//        xxlJobSpringExecutor.setAccessToken(env.getProperty("xxl.job.accessToken"));
+//        xxlJobSpringExecutor.setLogPath(env.getProperty("xxl.job.executor.logpath"));
+//        xxlJobSpringExecutor.setLogRetentionDays(Integer.parseInt(env.getProperty("xxl.job.executor.logretentiondays")));
+//        return xxlJobSpringExecutor;
+//    }
+//
+//    /**
+//     * 针对多网卡、容器内部署等情况,可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP;
+//     *
+//     *      1、引入依赖:
+//     *          <dependency>
+//     *             <groupId>org.springframework.cloud</groupId>
+//     *             <artifactId>spring-cloud-commons</artifactId>
+//     *             <version>${version}</version>
+//     *         </dependency>
+//     *
+//     *      2、配置文件,或者容器启动变量
+//     *          spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
+//     *
+//     *      3、获取IP
+//     *          String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
+//     */
+//
 //
-@PropertySource("classpath:xxl-job-accuracy.properties")
-//@PropertySource("classpath:xxl-job-7002.properties")
-//@PropertySource("classpath:xxl-job-7003.properties")
-//@PropertySource("classpath:xxl-job-executorGF001.properties")
-//@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-region.properties")
-public class XxlJobConfig implements EnvironmentAware {
-    private Environment env;
-
-
-    @Override
-    public void setEnvironment(Environment environment) {
-        this.env = environment;
-    }
-
-    private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
-
-
-    @Bean
-    public XxlJobSpringExecutor xxlJobExecutor() {
-        logger.info(">>>>>>>>>>> xxl-job config init.");
-        XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
-        xxlJobSpringExecutor.setAdminAddresses(env.getProperty("xxl.job.admin.addresses"));
-        xxlJobSpringExecutor.setAppname(env.getProperty("xxl.job.executor.appname"));
-        xxlJobSpringExecutor.setAddress(env.getProperty("xxl.job.executor.address"));
-        xxlJobSpringExecutor.setIp(env.getProperty("xxl.job.executor.ip"));
-        xxlJobSpringExecutor.setPort(Integer.parseInt(env.getProperty("xxl.job.executor.port")));
-        xxlJobSpringExecutor.setAccessToken(env.getProperty("xxl.job.accessToken"));
-        xxlJobSpringExecutor.setLogPath(env.getProperty("xxl.job.executor.logpath"));
-        xxlJobSpringExecutor.setLogRetentionDays(Integer.parseInt(env.getProperty("xxl.job.executor.logretentiondays")));
-        return xxlJobSpringExecutor;
-    }
-
-    /**
-     * 针对多网卡、容器内部署等情况,可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP;
-     *
-     *      1、引入依赖:
-     *          <dependency>
-     *             <groupId>org.springframework.cloud</groupId>
-     *             <artifactId>spring-cloud-commons</artifactId>
-     *             <version>${version}</version>
-     *         </dependency>
-     *
-     *      2、配置文件,或者容器启动变量
-     *          spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
-     *
-     *      3、获取IP
-     *          String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
-     */
-
-
-}
+//}

+ 26 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/init/CacheContext.java

@@ -81,6 +81,10 @@ public class CacheContext implements CommandLineRunner {
     private String runWindpowerstation;
 
     public static List<ProBasicEquipment> wtls = new ArrayList<>();
+
+    public static List<ProBasicEquipment> wtfdls = new ArrayList<>();
+    public static List<ProBasicEquipment> wtgfls = new ArrayList<>();
+
     public static List<ProBasicEquipment> wt_fjls = new ArrayList<>();
     public static List<ProBasicProject> pjls = new ArrayList<>();
     public static List<ProBasicLine>  lnls = new ArrayList<>();
@@ -344,10 +348,31 @@ public class CacheContext implements CommandLineRunner {
 //                zlpointmap.put(b.getId(),stringWindpowerstationpointnewMap);
 //            });
 //        }
+        //标杆风机初始化
+        wtls = proBasicEquipmentService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsable()==1 && i.getIsStandard()==1).collect(Collectors.toList());
+
+        Map<String,String> wpstationmap=new HashMap<>();
+        for(ProBasicEquipment wt:wtls)
+        {
+            wpstationmap.put(wt.getWindpowerstationId(),wt.getId());
+        }
 
         wtls = proBasicEquipmentService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsable()==1).collect(Collectors.toList());
+
         logger.info(wtls.size()+"");
         wtls.forEach(wt->{
+            if(wpstationmap.containsKey(wt.getWindpowerstationId()))
+            {
+                String stid=wpstationmap.get(wt.getWindpowerstationId());
+                wtstandardmap.put(wt.getId(),stid);
+            }
+            if(wt.getId().contains("_G_"))
+            {
+                wtgfls.add(wt);
+            }else if(wt.getId().contains("_F_"))
+            {
+                wtfdls.add(wt);
+            }
             if(modelMap.containsKey(wt.getModelId()))
             {
                 ProEconEquipmentmodel equipmentmodel = modelMap.get(wt.getModelId());
@@ -360,8 +385,7 @@ public class CacheContext implements CommandLineRunner {
             }
 
             wtmap.put(wt.getId(),wt);
-            //标杆风机初始化
-            wtstandardmap.put(wt.getId(),wt.getId());
+
             String wtString = redisService.get(wt.getId());
             Map<String, ProBasicEquipmentPoint> stringWindturbinetestingpointnewMap = JSONObject.parseObject(wtString, new TypeReference<Map<String, ProBasicEquipmentPoint>>() {
             });

+ 1 - 1
realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/AlarmTsMapper.java

@@ -89,7 +89,7 @@ public interface AlarmTsMapper extends BaseMapper<AlarmTs> {
     List<AlarmSimpleVo> selectLastRowByTbname(@Param("superTableName") String superTableName, @Param("tbnames") String tbnames);
 
     @Select("select last_row(*),alarmid,alarmtype,characteristic,components,confirmed,description,deviceid,devicename,devicetype,enabled,lineid,linename," +
-            "modelId,projectid,projectname,rank,resettable,stationid,stationname,subcomponents,suffix,tagid,triggertype,uniformcode from #{superTableName}" +
+            "modelId,projectid,projectname,rank,resettable,stationid,stationname,subcomponents,suffix,tagid,triggertype,uniformcode,nemCode ,faultCause,resolvent from #{superTableName}" +
             " where deviceid=#{deviceid} order by rank desc,ts desc limit 0,1")
     List<AlarmVo> selectLastRowByDeviceid(@Param("superTableName") String superTableName, @Param("deviceid") String deviceid);
 

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconCurveFittMonthMainMapper.java

@@ -15,8 +15,8 @@ import org.apache.ibatis.annotations.Param;
  */
 public interface ProEconCurveFittMonthMainMapper extends BaseMapper<ProEconCurveFittMonthMain> {
 
-    @Delete(" delete from pro_econ_curve_fitt_month_main where year=#{year} and month=#{month}  AND  windturbine_id like '%_F_%' ")
-    public int deleteProEconCurveFittMonthSubFByMonth(@Param(value = "year") String year, @Param(value = "month") String month);
+    @Delete(" delete from pro_econ_curve_fitt_month_main where year=#{year} and month=#{month}  and windturbine_id in (${wtIds}) AND  windturbine_id like '%_F_%' ")
+    public int deleteProEconCurveFittMonthSubFByMonth(@Param(value = "year") String year, @Param(value = "month") String month,@Param(value = "wtIds") String wtIds);
 
     @Delete(" delete from pro_econ_curve_fitt_month_main where year=#{year} and month=#{month}  AND  windturbine_id like '%_G_%' ")
     public int deleteProEconCurveFittMonthSubGByMonth(@Param(value = "year") String year, @Param(value = "month") String month);

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconCurveFittMonthSubMapper.java

@@ -15,8 +15,8 @@ import org.apache.ibatis.annotations.Param;
  */
 public interface ProEconCurveFittMonthSubMapper extends BaseMapper<ProEconCurveFittMonthSub> {
 
-    @Delete(" delete from pro_econ_curve_fitt_month_sub where year=#{year} and month=#{month}  AND  windturbine_id like '%_F_%' ")
-    public int deleteProEconCurveFittMonthSubFByMonth(@Param(value = "year") String year, @Param(value = "month") String month);
+    @Delete(" delete from pro_econ_curve_fitt_month_sub where year=#{year} and month=#{month}  and windturbine_id in (${wtIds}) AND  windturbine_id like '%_F_%' ")
+    public int deleteProEconCurveFittMonthSubFByMonth(@Param(value = "year") String year, @Param(value = "month") String month,@Param(value = "wtIds") String wtIds);
 
     @Delete(" delete from pro_econ_curve_fitt_month_sub where year=#{year} and month=#{month}  AND  windturbine_id like '%_G_%' ")
     public int deleteProEconCurveFittMonthSubGByMonth(@Param(value = "year") String year, @Param(value = "month") String month);

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconCurveFittYearMainMapper.java

@@ -14,8 +14,8 @@ import org.apache.ibatis.annotations.Param;
  * @since 2022-11-07
  */
 public interface ProEconCurveFittYearMainMapper extends BaseMapper<ProEconCurveFittYearMain> {
-    @Delete(" delete from pro_econ_curve_fitt_year_main where year=#{year}  AND  windturbine_id like '%_F_%' ")
-    public int deleteProEconCurveFittYearMainFByYear(@Param(value = "year") String year);
+    @Delete(" delete from pro_econ_curve_fitt_year_main where year=#{year}   and windturbine_id in (${wtIds}) AND  windturbine_id like '%_F_%' ")
+    public int deleteProEconCurveFittYearMainFByYear(@Param(value = "year") String year ,@Param(value = "wtIds") String wtIds);
 
     @Delete(" delete from pro_econ_curve_fitt_year_main where year=#{year}  AND  windturbine_id like '%_G_%' ")
     public int deleteProEconCurveFittYearMainGByYear(@Param(value = "year") String year);

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconCurveFittYearSubMapper.java

@@ -14,8 +14,8 @@ import org.apache.ibatis.annotations.Param;
  * @since 2022-11-07
  */
 public interface ProEconCurveFittYearSubMapper extends BaseMapper<ProEconCurveFittYearSub> {
-    @Delete(" delete from pro_econ_curve_fitt_year_sub where year=#{year}  AND  windturbine_id like '%_F_%' ")
-    public int deleteProEconCurveFittYearSubFByYear(@Param(value = "year") String year);
+    @Delete(" delete from pro_econ_curve_fitt_year_sub where year=#{year}  and windturbine_id in (${wtIds})  AND  windturbine_id like '%_F_%' ")
+    public int deleteProEconCurveFittYearSubFByYear(@Param(value = "year") String year,@Param(value = "wtIds") String wtIds);
 
     @Delete(" delete from pro_econ_curve_fitt_year_sub where year=#{year}  AND  windturbine_id like '%_G_%' ")
     public int deleteProEconCurveFittYearSubGByYear(@Param(value = "year") String year);

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconCurveFittingMainMapper.java

@@ -17,8 +17,8 @@ import java.util.Date;
  */
 public interface ProEconCurveFittingMainMapper extends BaseMapper<ProEconCurveFittingMain> {
 
-    @Delete(" delete from pro_econ_curve_fitting_main where record_date=#{recordDate}  AND  windturbine_id like '%_F_%'  ")
-    public int deleteProEconCurveFittingMainFByDay(@Param(value = "recordDate") Date recordDate);
+    @Delete(" delete from pro_econ_curve_fitting_main where record_date=#{recordDate}  and windturbine_id in (${wtIds})  AND  windturbine_id like '%_F_%'  ")
+    public int deleteProEconCurveFittingMainFByDay(@Param(value = "recordDate") Date recordDate,@Param(value = "wtIds") String wtIds);
     @Delete(" delete from pro_econ_curve_fitting_main where record_date=#{recordDate}  AND  windturbine_id like '%_G_%' ")
     public int deleteProEconCurveFittingMainGByDay(@Param(value = "recordDate") Date recordDate);
 }

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconCurveFittingSubMapper.java

@@ -18,8 +18,8 @@ import java.util.Date;
 public interface ProEconCurveFittingSubMapper extends BaseMapper<ProEconCurveFittingSub> {
 
 
-    @Delete(" delete from pro_econ_curve_fitting_sub where record_date=#{recordDate}  AND  windturbine_id like '%_F_%' ")
-    public int deleteProEconCurveFittingSubFByDay(@Param(value = "recordDate") Date recordDate);
+    @Delete(" delete from pro_econ_curve_fitting_sub where record_date=#{recordDate}  and windturbine_id in (${wtIds})  AND  windturbine_id like '%_F_%' ")
+    public int deleteProEconCurveFittingSubFByDay(@Param(value = "recordDate") Date recordDate,@Param(value = "wtIds") String wtIds);
 
     @Delete(" delete from pro_econ_curve_fitting_sub where record_date=#{recordDate}  AND  windturbine_id like '%_G_%' ")
     public int deleteProEconCurveFittingSubGByDay(@Param(value = "recordDate") Date recordDate);

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconWtCurveFittingMapper.java

@@ -17,8 +17,8 @@ import java.util.Date;
  */
 public interface ProEconWtCurveFittingMapper extends BaseMapper<ProEconWtCurveFitting> {
 
-    @Delete(" delete from pro_econ_wt_curve_fitting where record_date=#{recordDate} AND  windturbine_id like '%_F_%' ")
-    public int deleteProEconWtCurveFittingFByDay(@Param(value = "recordDate") Date recordDate);
+    @Delete(" delete from pro_econ_wt_curve_fitting where record_date=#{recordDate} and windturbine_id in (${wtIds})  AND  windturbine_id like '%_F_%' ")
+    public int deleteProEconWtCurveFittingFByDay(@Param(value = "recordDate") Date recordDate,@Param(value = "wtIds") String wtIds);
 
     @Delete(" delete from pro_econ_wt_curve_fitting where record_date=#{recordDate} AND  windturbine_id like '%_G_%' ")
     public int deleteProEconWtCurveFittingGByDay(@Param(value = "recordDate") Date recordDate);

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconWtCurveFittingMonthMapper.java

@@ -15,8 +15,8 @@ import org.apache.ibatis.annotations.Param;
  */
 public interface ProEconWtCurveFittingMonthMapper extends BaseMapper<ProEconWtCurveFittingMonth> {
 
-    @Delete(" delete from pro_econ_wt_curve_fitting_month where year=#{year} and month=#{month} AND  windturbine_id like '%_F_%' " )
-    public int deleteProEconWtCurveFittingFByMonth(@Param(value = "year") String year,@Param(value = "month") String month);
+    @Delete(" delete from pro_econ_wt_curve_fitting_month where year=#{year} and month=#{month}   and windturbine_id in (${wtIds})  AND  windturbine_id like '%_F_%' " )
+    public int deleteProEconWtCurveFittingFByMonth(@Param(value = "year") String year,@Param(value = "month") String month,@Param(value = "wtIds") String wtIds);
 
     @Delete(" delete from pro_econ_wt_curve_fitting_month where year=#{year} and month=#{month} AND  windturbine_id like '%_G_%' ")
     public int deleteProEconWtCurveFittingGByMonth(@Param(value = "year") String year,@Param(value = "month") String month);

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconWtCurveFittingYearMapper.java

@@ -15,8 +15,8 @@ import org.apache.ibatis.annotations.Param;
  */
 public interface ProEconWtCurveFittingYearMapper extends BaseMapper<ProEconWtCurveFittingYear> {
 
-    @Delete(" delete from pro_econ_wt_curve_fitting_year where year=#{year} AND  windturbine_id like '%_F_%' ")
-    public int deleteProEconWtCurveFittingFByYear(@Param(value = "year") String year);
+    @Delete(" delete from pro_econ_wt_curve_fitting_year where year=#{year}  and windturbine_id in (${wtIds})  AND  windturbine_id like '%_F_%' ")
+    public int deleteProEconWtCurveFittingFByYear(@Param(value = "year") String year,@Param(value = "wtIds") String wtIds);
     @Delete(" delete from pro_econ_wt_curve_fitting_year where year=#{year} AND  windturbine_id like '%_G_%' ")
     public int deleteProEconWtCurveFittingGByYear(@Param(value = "year") String year);
 }

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

@@ -43,4 +43,24 @@ public class AlarmVo {
 
     private Double timelong;
 
+    /**
+     * 故障名称
+     */
+    private String name;
+
+    /**
+     *故障码
+     */
+    private String nemCode;
+
+    /**
+     * 故障原因
+     */
+    private String faultCause;
+
+    /**
+     * 排查方法
+     */
+    private String resolvent;
+
 }

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

@@ -48,8 +48,6 @@ public class CoefficientService {
         Date endDate = currentDate;
 
         Map<String, Map<String, Double>> resultmap = new HashMap<>();
-        //查询风机
-        List<ProBasicEquipment> wtls = CacheContext.wtls;
 
         ProBasicEquipment wt=CacheContext.wtmap.get(wtId);
 
@@ -63,10 +61,10 @@ public class CoefficientService {
 
         Map<String, ProBasicEquipmentPoint> wtpointmap = CacheContext.wtpAimap.get(wt.getId());
         ProBasicEquipmentPoint fspoint = wtpointmap.get(ContantXk.CJ_SSFS);
-        List<PointData> fsls = edosUtil.getHistStat(fspoint.getNemCode(), yearbeginDate.getTime() / 1000, endDate.getTime() / 1000, null, 900L, StatData.AVG.getValue());
+        List<PointData> fsls = edosUtil.getHistStat(fspoint.getNemCode(), yearbeginDate.getTime() / 1000, endDate.getTime() / 1000, null, 60*60L*6, StatData.AVG.getValue());
 
         ProBasicEquipmentPoint glpoint = wtpointmap.get(ContantXk.CJ_SSGL);
-        List<PointData> glls = edosUtil.getHistStat(glpoint.getNemCode(), yearbeginDate.getTime() / 1000, endDate.getTime() / 1000, null, 900L, StatData.AVG.getValue());
+        List<PointData> glls = edosUtil.getHistStat(glpoint.getNemCode(), yearbeginDate.getTime() / 1000, endDate.getTime() / 1000, null, 60*60L*6, StatData.AVG.getValue());
 
         if(!fsls.isEmpty() && !glls.isEmpty() && fsls.size()==glls.size())
         {
@@ -94,8 +92,8 @@ public class CoefficientService {
         List<ProEconActivePowerData> queryMonth = new ArrayList<>();
 
 
-        fsls = edosUtil.getHistStat(fspoint.getNemCode(), monthbeginDate.getTime() / 1000, endDate.getTime() / 1000, null, 900L, StatData.AVG.getValue());
-        glls = edosUtil.getHistStat(glpoint.getNemCode(), monthbeginDate.getTime() / 1000, endDate.getTime() / 1000, null, 900L, StatData.AVG.getValue());
+        fsls = edosUtil.getHistStat(fspoint.getNemCode(), monthbeginDate.getTime() / 1000, endDate.getTime() / 1000, null, 60*60L, StatData.AVG.getValue());
+        glls = edosUtil.getHistStat(glpoint.getNemCode(), monthbeginDate.getTime() / 1000, endDate.getTime() / 1000, null, 60*60L, StatData.AVG.getValue());
 
         if (!fsls.isEmpty() && !glls.isEmpty() && fsls.size() == glls.size()) {
             for (int i = 0; i < fsls.size(); i++) {

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

@@ -50,9 +50,21 @@ public class EquipmentInfo1Service {
                 .map(ProEconEquipmentInfoDay1::getId)
                 .collect(Collectors.toList());
 
-        if (idls.size() > 0) {
+        List<String> tempids=new ArrayList<>();
 
-            proEconEquipmentInfoDay1Service.removeByIds(idls);
+        for(int i=0;i<idls.size();i++)
+        {
+            tempids.add(idls.get(i));
+            if(tempids.size()==100)
+            {
+                proEconEquipmentInfoDay1Service.removeByIds(tempids);
+                tempids=new ArrayList<>();
+            }
+        }
+
+        if(!tempids.isEmpty())
+        {
+            proEconEquipmentInfoDay1Service.removeByIds(tempids);
         }
 
         Map<String,ProEconEquipmentInfoDay1> pep1map=new HashMap<>();
@@ -126,7 +138,7 @@ public class EquipmentInfo1Service {
         List<ProEconEquipmentInfoDay1> templs=new ArrayList<>();
         for(ProEconEquipmentInfoDay1 vo:dayls)
         {
-            if(StringUtils.notEmp(vo.getWindturbineId()))
+            if(StringUtils.notEmp(vo) && StringUtils.notEmp(vo.getWindturbineId()))
             {
                 templs.add(vo);
                 if(templs.size()==100)
@@ -298,9 +310,10 @@ public class EquipmentInfo1Service {
             PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
             if(StringUtils.notEmp(pointValue))
             {
-                //日待机损失电量
-                pewp.setRdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+//                //日待机损失电量
+//                pewp.setRdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
 
+                pewp.setRdjssdl(0.0);
             }
         }
         if(pointmap.containsKey(ContantXk.RQXJCLSSDL))
@@ -310,8 +323,8 @@ public class EquipmentInfo1Service {
             if(StringUtils.notEmp(pointValue))
             {
                 //日缺陷降出力损失电量
-                pewp.setRqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+//                pewp.setRqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+                pewp.setRqxjclssdl(0.0);
             }
         }
         if(pointmap.containsKey(ContantXk.RSDTJSSDL))
@@ -321,7 +334,8 @@ public class EquipmentInfo1Service {
             if(StringUtils.notEmp(pointValue))
             {
                 //日手动停机损失电量
-                pewp.setRsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+//                pewp.setRsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+                pewp.setRsdtjssdl(0.0);
 
             }
         }
@@ -332,7 +346,8 @@ public class EquipmentInfo1Service {
             if(StringUtils.notEmp(pointValue))
             {
                 //日性能损失电量
-                pewp.setRxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+//                pewp.setRxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+                pewp.setRxnssdl(0.0);
 
             }
         }
@@ -561,8 +576,8 @@ 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);
             }
         }
         if(pointmap.containsKey(ContantXk.YQXJCLSSDL))
@@ -572,8 +587,8 @@ 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);
             }
         }
         if(pointmap.containsKey(ContantXk.YSDTJSSDL))
@@ -583,8 +598,8 @@ 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);
             }
         }
         if(pointmap.containsKey(ContantXk.YXNSSDL))
@@ -594,8 +609,8 @@ 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);
             }
         }
 
@@ -819,8 +834,8 @@ public class EquipmentInfo1Service {
             if(StringUtils.notEmp(pointValue))
             {
                 //年待机损失电量
-                pewp.setNdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+//                pewp.setNdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+                pewp.setNdjssdl(0.0);
             }
         }
         if(pointmap.containsKey(ContantXk.NQXJCLSSDL))
@@ -830,8 +845,8 @@ public class EquipmentInfo1Service {
             if(StringUtils.notEmp(pointValue))
             {
                 //年缺陷降出力损失电量
-                pewp.setNqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+//                pewp.setNqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+                pewp.setNqxjclssdl(0.0);
             }
         }
         if(pointmap.containsKey(ContantXk.NSDTJSSDL))
@@ -841,8 +856,8 @@ 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);
             }
         }
         if(pointmap.containsKey(ContantXk.NXNSSDL))
@@ -852,8 +867,8 @@ 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);
             }
         }
 

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

@@ -52,10 +52,27 @@ public class EquipmentInfo2Service {
         List<String> idls = proEconEquipmentInfoDay2Service.list(queryWrapper).stream().map(ProEconEquipmentInfoDay2::getId)
                 .collect(Collectors.toList());
 
-        if (idls.size() > 0) {
+//        if (idls.size() > 0) {
+//
+//            proEconEquipmentInfoDay2Service.removeByIds(idls);
+//
+//        }
 
-            proEconEquipmentInfoDay2Service.removeByIds(idls);
+        List<String> tempids=new ArrayList<>();
+
+        for(int i=0;i<idls.size();i++)
+        {
+            tempids.add(idls.get(i));
+            if(tempids.size()==100)
+            {
+                proEconEquipmentInfoDay2Service.removeByIds(tempids);
+                tempids=new ArrayList<>();
+            }
+        }
 
+        if(!tempids.isEmpty())
+        {
+            proEconEquipmentInfoDay2Service.removeByIds(tempids);
         }
 
         Map<String, ProEconEquipmentInfoDay2> pep2map=new HashMap<>();

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

@@ -52,13 +52,29 @@ public class EquipmentInfo3Service {
                 .map(ProEconEquipmentInfoDay3::getId)
                 .collect(Collectors.toList());
 
-        if (idls.size() > 0) {
+//        if (idls.size() > 0) {
+//
+//            proEconEquipmentInfoDay3Service.removeByIds(idls);
+//
+//        }
 
-            proEconEquipmentInfoDay3Service.removeByIds(idls);
 
-        }
+        List<String> tempids=new ArrayList<>();
 
+        for(int i=0;i<idls.size();i++)
+        {
+            tempids.add(idls.get(i));
+            if(tempids.size()==100)
+            {
+                proEconEquipmentInfoDay3Service.removeByIds(tempids);
+                tempids=new ArrayList<>();
+            }
+        }
 
+        if(!tempids.isEmpty())
+        {
+            proEconEquipmentInfoDay3Service.removeByIds(tempids);
+        }
         Map<String,ProEconEquipmentInfoDay3> pep3map=new HashMap<>();
         Calendar cl=Calendar.getInstance();
         cl.setTime(recordDate);

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

@@ -86,12 +86,27 @@ public class EquipmentInfo4Service {
                 .map(ProEconEquipmentInfoDay4::getId)
                 .collect(Collectors.toList());
 
-        if (idls.size() > 0) {
-
-            proEconEquipmentInfoDay4Service.removeByIds(idls);
+//        if (idls.size() > 0) {
+//
+//            proEconEquipmentInfoDay4Service.removeByIds(idls);
+//
+//        }
+        List<String> tempids=new ArrayList<>();
 
+        for(int i=0;i<idls.size();i++)
+        {
+            tempids.add(idls.get(i));
+            if(tempids.size()==100)
+            {
+                proEconEquipmentInfoDay4Service.removeByIds(tempids);
+                tempids=new ArrayList<>();
+            }
         }
 
+        if(!tempids.isEmpty())
+        {
+            proEconEquipmentInfoDay4Service.removeByIds(tempids);
+        }
         Map<String,ProEconEquipmentInfoDay2> pep2map=new HashMap<>();
         Map<String,ProEconEquipmentInfoDay3> pep3map=new HashMap<>();
         Map<String,ProEconEquipmentInfoDay4> pep4map=new HashMap<>();

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

@@ -164,10 +164,27 @@ public class EquipmentInfo5Service {
         .map(ProEconEquipmentInfoDay5::getId).collect(Collectors.toList());
 
             ProEconEquipmentInfoDay5 dayInfo;
-            if (!dayInfoids.isEmpty()) {
+//            if (!dayInfoids.isEmpty()) {
+//
+//                proEconEquipmentInfoDay5Service.removeByIds(dayInfoids);
+//            }
+
+        List<String> tempids=new ArrayList<>();
 
-                proEconEquipmentInfoDay5Service.removeByIds(dayInfoids);
+        for(int i=0;i<dayInfoids.size();i++)
+        {
+            tempids.add(dayInfoids.get(i));
+            if(tempids.size()==100)
+            {
+                proEconEquipmentInfoDay5Service.removeByIds(tempids);
+                tempids=new ArrayList<>();
             }
+        }
+
+        if(!tempids.isEmpty())
+        {
+            proEconEquipmentInfoDay5Service.removeByIds(tempids);
+        }
             for (ProEconEquipmentInfoDay5 day : rates.values()) {
 
                 dayInfo = new ProEconEquipmentInfoDay5();

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

@@ -44,9 +44,21 @@ public class EquipmentInfoDayTopService {
                 .map(ProEconEquipmentInfoDayTop::getId)
                 .collect(Collectors.toList());
 
-        if (idls.size() > 0) {
+        List<Long> tempids=new ArrayList<>();
 
-            proEconEquipmentInfoDayTopService.removeByIds(idls);
+        for(int i=0;i<idls.size();i++)
+        {
+            tempids.add(idls.get(i));
+            if(tempids.size()==100)
+            {
+                proEconEquipmentInfoDayTopService.removeByIds(tempids);
+                tempids=new ArrayList<>();
+            }
+        }
+
+        if(!tempids.isEmpty())
+        {
+            proEconEquipmentInfoDayTopService.removeByIds(tempids);
         }
 
         for (ProBasicPowerstation wp : CacheContext.wpls) {
@@ -123,10 +135,28 @@ public class EquipmentInfoDayTopService {
                 .map(ProEconEquipmentInfoDayTop::getId)
                 .collect(Collectors.toList());
 
-        if (idls.size() > 0) {
+//        if (idls.size() > 0) {
+//
+//            proEconEquipmentInfoDayTopService.removeByIds(idls);
+//        }
+
+        List<Long> tempids=new ArrayList<>();
+
+        for(int i=0;i<idls.size();i++)
+        {
+            tempids.add(idls.get(i));
+            if(tempids.size()==100)
+            {
+                proEconEquipmentInfoDayTopService.removeByIds(tempids);
+                tempids=new ArrayList<>();
+            }
+        }
 
-            proEconEquipmentInfoDayTopService.removeByIds(idls);
+        if(!tempids.isEmpty())
+        {
+            proEconEquipmentInfoDayTopService.removeByIds(tempids);
         }
+
         for (ProBasicPowerstation wp : CacheContext.wpls) {
 
             List<ProEconEquipmentInfoDayTop> topls = new ArrayList<>();
@@ -195,10 +225,26 @@ public class EquipmentInfoDayTopService {
 //                        && CacheContext.wtmap.containsKey(i.getWindturbineId()))
                 .map(ProEconEquipmentInfoDayTop::getId)
                 .collect(Collectors.toList());
+//
+//        if (idls.size() > 0) {
+//
+//            proEconEquipmentInfoDayTopService.removeByIds(idls);
+//        }
+        List<Long> tempids=new ArrayList<>();
+
+        for(int i=0;i<idls.size();i++)
+        {
+            tempids.add(idls.get(i));
+            if(tempids.size()==100)
+            {
+                proEconEquipmentInfoDayTopService.removeByIds(tempids);
+                tempids=new ArrayList<>();
+            }
+        }
 
-        if (idls.size() > 0) {
-
-            proEconEquipmentInfoDayTopService.removeByIds(idls);
+        if(!tempids.isEmpty())
+        {
+            proEconEquipmentInfoDayTopService.removeByIds(tempids);
         }
         for (ProBasicPowerstation wp : CacheContext.wpls) {
 

+ 8 - 7
realtime/generationXK-service/src/main/java/com/gyee/generation/service/GoodnessOfFitService.java

@@ -3,6 +3,7 @@ package com.gyee.generation.service;
 
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.TypeReference;
+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;
@@ -75,9 +76,9 @@ public class GoodnessOfFitService {
             });
         }else
         {
-//            QueryWrapper<ProEconWtCurveFittingMonth> queryWrapper = new QueryWrapper<>();
-//            queryWrapper.eq("year",year).eq("month",month).eq("windturbine_id",wtId);
-//            powerList = proEconWtCurveFittingMonthService.list(queryWrapper);
+            QueryWrapper<ProEconWtCurveFittingMonth> queryWrapper = new QueryWrapper<>();
+            queryWrapper.eq("year",year).eq("month",month).eq("windturbine_id",wtId);
+            powerList = proEconWtCurveFittingMonthService.list(queryWrapper);
         }
         ProBasicEquipment wt=CacheContext.wtmap.get(wtId);
 
@@ -113,8 +114,8 @@ public class GoodnessOfFitService {
         }
 
         //月数据筛选15分钟间隔
-        fsls=edosUtil.getHistStat(fspoint.getNemCode(),startDateM.getTime()/1000,endDate.getTime()/1000,null,900L, StatData.AVG.getValue());
-        glls=edosUtil.getHistStat(glpoint.getNemCode(),startDateM.getTime()/1000,endDate.getTime()/1000,null,900L, StatData.AVG.getValue());
+        fsls=edosUtil.getHistStat(fspoint.getNemCode(),startDateM.getTime()/1000,endDate.getTime()/1000,null,60*60L, StatData.AVG.getValue());
+        glls=edosUtil.getHistStat(glpoint.getNemCode(),startDateM.getTime()/1000,endDate.getTime()/1000,null,60*60L, StatData.AVG.getValue());
 
         if(!fsls.isEmpty() && !glls.isEmpty() && fsls.size()==glls.size())
         {
@@ -133,8 +134,8 @@ public class GoodnessOfFitService {
             }
         }
         //年数据筛选15分钟间隔
-        fsls=edosUtil.getHistStat(fspoint.getNemCode(),startDateY.getTime()/1000,endDate.getTime()/1000,null,900L, StatData.AVG.getValue());
-        glls=edosUtil.getHistStat(glpoint.getNemCode(),startDateY.getTime()/1000,endDate.getTime()/1000,null,900L, StatData.AVG.getValue());
+        fsls=edosUtil.getHistStat(fspoint.getNemCode(),startDateY.getTime()/1000,endDate.getTime()/1000,null,60*60L*6, StatData.AVG.getValue());
+        glls=edosUtil.getHistStat(glpoint.getNemCode(),startDateY.getTime()/1000,endDate.getTime()/1000,null,60*60L*6, StatData.AVG.getValue());
 
         if(!fsls.isEmpty() && !glls.isEmpty() && fsls.size()==glls.size())
         {

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

@@ -74,9 +74,9 @@ public class PowerCurveFittingByTimeGfService {
 
         Date begin = DateUtils.addDays(end, -6);
 
-        proEconWtCurveFittingService.deleteProEconWtCurveFittingFByDay(DateUtils.truncate(recordDate));
-        proEconCurveFittingMainService.deleteProEconCurveFittingMainFByDay(DateUtils.truncate(recordDate));
-        proEconCurveFittingSubService.deleteProEconCurveFittingSubFByDay(DateUtils.truncate(recordDate));
+        proEconWtCurveFittingService.deleteProEconWtCurveFittingGByDay(DateUtils.truncate(recordDate));
+        proEconCurveFittingMainService.deleteProEconCurveFittingMainGByDay(DateUtils.truncate(recordDate));
+        proEconCurveFittingSubService.deleteProEconCurveFittingSubGByDay(DateUtils.truncate(recordDate));
         Map<String, CureFittingVo> windMap = new HashMap<>();
 
         //初始化风机装机容量
@@ -342,9 +342,9 @@ public class PowerCurveFittingByTimeGfService {
         int day_month = c.get(Calendar.MONTH) + 1;
 
 
-        proEconWtCurveFittingMonthService.deleteProEconWtCurveFittingFByMonth(String.valueOf(day_year),String.valueOf(day_month));
-        proEconCurveFittMonthMainService.deleteProEconCurveFittMonthMainFByMonth(String.valueOf(day_year),String.valueOf(day_month));
-        proEconCurveFittMonthSubService.deleteProEconCurveFittMonthSubFByMonth(String.valueOf(day_year),String.valueOf(day_month));
+        proEconWtCurveFittingMonthService.deleteProEconWtCurveFittingGByMonth(String.valueOf(day_year),String.valueOf(day_month));
+        proEconCurveFittMonthMainService.deleteProEconCurveFittMonthMainGByMonth(String.valueOf(day_year),String.valueOf(day_month));
+        proEconCurveFittMonthSubService.deleteProEconCurveFittMonthSubGByMonth(String.valueOf(day_year),String.valueOf(day_month));
         c.set(Calendar.DAY_OF_MONTH, 1);
         Date begin = c.getTime();
 
@@ -636,9 +636,9 @@ public class PowerCurveFittingByTimeGfService {
         int day_year = c.get(Calendar.YEAR);
 
 
-        proEconWtCurveFittingYearService.deleteProEconWtCurveFittingFByYear(String.valueOf(day_year));
-        proEconCurveFittYearMainService.deleteProEconCurveFittYearMainFByYear(String.valueOf(day_year));
-        proEconCurveFittYearSubService.deleteProEconCurveFittYearSubFByYear(String.valueOf(day_year));
+        proEconWtCurveFittingYearService.deleteProEconWtCurveFittingGByYear(String.valueOf(day_year));
+        proEconCurveFittYearMainService.deleteProEconCurveFittYearMainGByYear(String.valueOf(day_year));
+        proEconCurveFittYearSubService.deleteProEconCurveFittYearSubGByYear(String.valueOf(day_year));
         c.set(Calendar.DAY_OF_MONTH, 1);
         c.set(Calendar.MONTH, 0);
         Date begin = c.getTime();

+ 63 - 17
realtime/generationXK-service/src/main/java/com/gyee/generation/service/PowerCurveFittingByTimeService.java

@@ -65,7 +65,7 @@ public class PowerCurveFittingByTimeService {
     private IProEconCurveFittYearMainService proEconCurveFittYearMainService;
 
 
-    public void cureFittingDay(Date recordDate) throws Exception {
+    public void cureFittingDay(Date recordDate,String wpId) throws Exception {
         //日期变为昨天
         Date end = DateUtils.addDays(DateUtils.truncate(recordDate), -1);
 
@@ -74,9 +74,24 @@ public class PowerCurveFittingByTimeService {
 
         Date begin = DateUtils.addDays(end, -6);
 
-        proEconWtCurveFittingService.deleteProEconWtCurveFittingFByDay(DateUtils.truncate(recordDate));
-        proEconCurveFittingMainService.deleteProEconCurveFittingMainFByDay(DateUtils.truncate(recordDate));
-        proEconCurveFittingSubService.deleteProEconCurveFittingSubFByDay(DateUtils.truncate(recordDate));
+        List<ProBasicEquipment> wtls=new ArrayList<>();
+        if(StringUtils.notEmp(wpId) && CacheContext.wpwtmap.containsKey(wpId))
+        {
+            wtls=CacheContext.wpwtmap.get(wpId);
+        }else
+        {
+            wtls=CacheContext.wtls;
+        }
+
+       StringBuilder sb=new StringBuilder();
+        for(ProBasicEquipment wt:wtls)
+        {
+            sb.append("'").append(wt.getId()).append("',");
+        }
+        String wtIds=sb.substring(0,sb.length()-1);
+        proEconWtCurveFittingService.deleteProEconWtCurveFittingFByDay(DateUtils.truncate(recordDate),wtIds);
+        proEconCurveFittingMainService.deleteProEconCurveFittingMainFByDay(DateUtils.truncate(recordDate),wtIds);
+        proEconCurveFittingSubService.deleteProEconCurveFittingSubFByDay(DateUtils.truncate(recordDate),wtIds);
         Map<String, CureFittingVo> windMap = new HashMap<>();
 
         //初始化风机装机容量
@@ -91,7 +106,9 @@ public class PowerCurveFittingByTimeService {
             }
         }
 
-        for (ProBasicEquipment wt : CacheContext.wtls) {
+
+
+        for (ProBasicEquipment wt : wtls) {
             String windturbineId = wt.getId();
 
             if(wt.getWindpowerstationId().contains(WpType.GDC.id))
@@ -329,7 +346,7 @@ public class PowerCurveFittingByTimeService {
 //        proEconCurveFittingMainService.saveBatch(mainls);
     }
 
-    public void cureFittingMonth(Date recordDate,String type) throws Exception {
+    public void cureFittingMonth(Date recordDate,String type,String wpId) throws Exception {
         //日期变为昨天
         Date end = DateUtils.addDays(DateUtils.truncate(recordDate), -1);
 
@@ -338,10 +355,23 @@ public class PowerCurveFittingByTimeService {
         int day_year = c.get(Calendar.YEAR);
         int day_month = c.get(Calendar.MONTH) + 1;
 
-
-        proEconWtCurveFittingMonthService.deleteProEconWtCurveFittingFByMonth(String.valueOf(day_year),String.valueOf(day_month));
-        proEconCurveFittMonthMainService.deleteProEconCurveFittMonthMainFByMonth(String.valueOf(day_year),String.valueOf(day_month));
-        proEconCurveFittMonthSubService.deleteProEconCurveFittMonthSubFByMonth(String.valueOf(day_year),String.valueOf(day_month));
+        List<ProBasicEquipment> wtls=new ArrayList<>();
+        if(StringUtils.notEmp(wpId) && CacheContext.wpwtmap.containsKey(wpId))
+        {
+            wtls=CacheContext.wpwtmap.get(wpId);
+        }else
+        {
+            wtls=CacheContext.wtls;
+        }
+        StringBuilder sb=new StringBuilder();
+        for(ProBasicEquipment wt:wtls)
+        {
+            sb.append("'").append(wt.getId()).append("',");
+        }
+        String wtIds=sb.substring(0,sb.length()-1);
+        proEconWtCurveFittingMonthService.deleteProEconWtCurveFittingFByMonth(String.valueOf(day_year),String.valueOf(day_month),wtIds);
+        proEconCurveFittMonthMainService.deleteProEconCurveFittMonthMainFByMonth(String.valueOf(day_year),String.valueOf(day_month), wtIds);
+        proEconCurveFittMonthSubService.deleteProEconCurveFittMonthSubFByMonth(String.valueOf(day_year),String.valueOf(day_month),wtIds);
         c.set(Calendar.DAY_OF_MONTH, 1);
         Date begin = c.getTime();
 
@@ -367,7 +397,9 @@ public class PowerCurveFittingByTimeService {
             }
         }
 
-        for (ProBasicEquipment wt : CacheContext.wtls) {
+
+
+        for (ProBasicEquipment wt : wtls) {
             String windturbineId = wt.getId();
 
             if(wt.getWindpowerstationId().contains(WpType.GDC.id) )
@@ -624,7 +656,7 @@ public class PowerCurveFittingByTimeService {
     }
 
 
-    public void cureFittingYear(Date recordDate) throws Exception {
+    public void cureFittingYear(Date recordDate,String wpId) throws Exception {
         //日期变为昨天
         Date end = DateUtils.addDays(DateUtils.truncate(recordDate), -1);
 
@@ -632,11 +664,24 @@ public class PowerCurveFittingByTimeService {
 
         c.setTime(recordDate);
         int day_year = c.get(Calendar.YEAR);
+        List<ProBasicEquipment> wtls=new ArrayList<>();
+        if(StringUtils.notEmp(wpId) && CacheContext.wpwtmap.containsKey(wpId))
+        {
+            wtls=CacheContext.wpwtmap.get(wpId);
+        }else
+        {
+            wtls=CacheContext.wtls;
+        }
+        StringBuilder sb=new StringBuilder();
+        for(ProBasicEquipment wt:wtls)
+        {
+            sb.append("'").append(wt.getId()).append("',");
+        }
+        String wtIds=sb.substring(0,sb.length()-1);
 
-
-        proEconWtCurveFittingYearService.deleteProEconWtCurveFittingFByYear(String.valueOf(day_year));
-        proEconCurveFittYearMainService.deleteProEconCurveFittYearMainFByYear(String.valueOf(day_year));
-        proEconCurveFittYearSubService.deleteProEconCurveFittYearSubFByYear(String.valueOf(day_year));
+        proEconWtCurveFittingYearService.deleteProEconWtCurveFittingFByYear(String.valueOf(day_year), wtIds);
+        proEconCurveFittYearMainService.deleteProEconCurveFittYearMainFByYear(String.valueOf(day_year), wtIds);
+        proEconCurveFittYearSubService.deleteProEconCurveFittYearSubFByYear(String.valueOf(day_year), wtIds);
         c.set(Calendar.DAY_OF_MONTH, 1);
         c.set(Calendar.MONTH, 0);
         Date begin = c.getTime();
@@ -659,7 +704,8 @@ public class PowerCurveFittingByTimeService {
             }
         }
 
-        for (ProBasicEquipment wt : CacheContext.wtls) {
+
+        for (ProBasicEquipment wt : wtls) {
             String windturbineId = wt.getId();
 
             if(wt.getWindpowerstationId().contains(WpType.GDC.id))

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

@@ -168,10 +168,10 @@ public class ShutdownnewService {
             }
             if (oldShutdownEvent.containsKey(wtId)) {
 
-                if(wtId.equals("SXJ_KGDL_HSM_F_WT_0021_EQ"))
-                {
-                    System.out.println("");
-                }
+//                if(wtId.equals("SXJ_KGDL_HSM_F_WT_0021_EQ"))
+//                {
+//                    System.out.println("");
+//                }
                 shutdwonEvent = oldShutdownEvent.get(wtId);
             }
             if (oldShutdownEvent2.containsKey(wtId)) {
@@ -449,6 +449,14 @@ public class ShutdownnewService {
                 {
                     item.setFaultView(vo.getDescription());
                 }
+                if(StringUtils.notEmp(vo.getFaultCause()))
+                {
+                    item.setFaultView(vo.getFaultCause());
+                }
+                if(StringUtils.notEmp(vo.getResolvent()))
+                {
+                    item.setHandleWay(vo.getResolvent());
+                }
             }
         } else if (wtStatusMap.get(wtId).getPointValueInDouble() == StatusDetailValue.JX.getCode()) {
             item.setStopTypeId("wh");
@@ -485,6 +493,14 @@ public class ShutdownnewService {
                 {
                     item.setFaultView(vo.getDescription());
                 }
+                if(StringUtils.notEmp(vo.getFaultCause()))
+                {
+                    item.setFaultView(vo.getFaultCause());
+                }
+                if(StringUtils.notEmp(vo.getResolvent()))
+                {
+                    item.setHandleWay(vo.getResolvent());
+                }
             }
         } else if (wtStatusMap.get(wtId).getPointValueInDouble() == StatusDetailValue.JX.getCode()) {
             item.setStopTypeId("wh");
@@ -520,6 +536,14 @@ public class ShutdownnewService {
                 {
                     item.setFaultView(vo.getDescription());
                 }
+                if(StringUtils.notEmp(vo.getFaultCause()))
+                {
+                    item.setFaultView(vo.getFaultCause());
+                }
+                if(StringUtils.notEmp(vo.getResolvent()))
+                {
+                    item.setHandleWay(vo.getResolvent());
+                }
             }
 
         } else if (wtStatusMap.get(wtId).getPointValueInDouble() == StatusDetailValue.JX.getCode()) {

+ 22 - 7
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindturbineGoodnessService.java

@@ -46,12 +46,27 @@ public class WindturbineGoodnessService {
                 .map(ProEconWindturbineGoodness::getId)
                 .collect(Collectors.toList());
 
-        if (idls.size() > 0) {
-
-            proEconWindturbineGoodnessService.removeByIds(idls);
-
+//        if (idls.size() > 0) {
+//
+//            proEconWindturbineGoodnessService.removeByIds(idls);
+//
+//        }
+        List<Long> tempids=new ArrayList<>();
+
+        for(int i=0;i<idls.size();i++)
+        {
+            tempids.add(idls.get(i));
+            if(tempids.size()==100)
+            {
+                proEconWindturbineGoodnessService.removeByIds(tempids);
+                tempids=new ArrayList<>();
+            }
         }
 
+        if(!tempids.isEmpty())
+        {
+            proEconWindturbineGoodnessService.removeByIds(tempids);
+        }
 
         QueryWrapper<ProEconEquipmentInfoDay1> queryWrapper2 = new QueryWrapper<>();
         queryWrapper2.eq("record_date",DateUtils.truncate(recordDate));
@@ -68,10 +83,10 @@ public class WindturbineGoodnessService {
         }
         List<ProEconWindturbineGoodness> vos=new ArrayList<>();
 
-        System.out.println("拟合优度风机数量"+CacheContext.wtls.size());
+        System.out.println("拟合优度风机数量"+CacheContext.wtfdls.size());
 
-        final CountDownLatch latch = new CountDownLatch(+CacheContext.wtls.size());
-        for(int i=0;i<CacheContext.wtls.size();i++)
+        final CountDownLatch latch = new CountDownLatch(+CacheContext.wtfdls.size());
+        for(int i=0;i<CacheContext.wtfdls.size();i++)
         {
             new Thread(new GoodnessOfFitThread(executor, i,  recordDate,  coefficientService,
                     goodnessOfFitService,

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

@@ -112,10 +112,27 @@ public class WtAlysisDayService {
                 .map(ProEconWtAlysisDay::getId)
                 .collect(Collectors.toList());
 
-        if (idls.size() > 0) {
+//        if (idls.size() > 0) {
+//
+//            proEconWtAlysisDayService.removeByIds(idls);
+//
+//        }
 
-            proEconWtAlysisDayService.removeByIds(idls);
+        List<Long> tempids=new ArrayList<>();
+
+        for(int i=0;i<idls.size();i++)
+        {
+            tempids.add(idls.get(i));
+            if(tempids.size()==100)
+            {
+                proEconWtAlysisDayService.removeByIds(tempids);
+                tempids=new ArrayList<>();
+            }
+        }
 
+        if(!tempids.isEmpty())
+        {
+            proEconWtAlysisDayService.removeByIds(tempids);
         }
 
         Map<String, ProEconEquipmentInfoDay1> eqday1map = queryEquipmentInfoDay1(recordDate);

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

@@ -13,6 +13,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProEconCurveFittMonthMainService extends IService<ProEconCurveFittMonthMain> {
 
-    public int deleteProEconCurveFittMonthMainFByMonth(String year, String month);
+    public int deleteProEconCurveFittMonthMainFByMonth(String year, String month,String wtIds);
     public int deleteProEconCurveFittMonthMainGByMonth(String year, String month);
 }

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

@@ -13,6 +13,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProEconCurveFittMonthSubService extends IService<ProEconCurveFittMonthSub> {
 
-    public int deleteProEconCurveFittMonthSubFByMonth(String year, String month);
+    public int deleteProEconCurveFittMonthSubFByMonth(String year, String month,String wtIds);
     public int deleteProEconCurveFittMonthSubGByMonth(String year, String month);
 }

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

@@ -13,6 +13,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProEconCurveFittYearMainService extends IService<ProEconCurveFittYearMain> {
 
-    public int deleteProEconCurveFittYearMainFByYear(String year);
+    public int deleteProEconCurveFittYearMainFByYear(String year,String wtIds);
     public int deleteProEconCurveFittYearMainGByYear(String year);
 }

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

@@ -13,6 +13,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProEconCurveFittYearSubService extends IService<ProEconCurveFittYearSub> {
 
-    public int deleteProEconCurveFittYearSubFByYear(String year);
+    public int deleteProEconCurveFittYearSubFByYear(String year,String wtIds);
     public int deleteProEconCurveFittYearSubGByYear(String year);
 }

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

@@ -15,6 +15,6 @@ import java.util.Date;
  */
 public interface IProEconCurveFittingMainService extends IService<ProEconCurveFittingMain> {
 
-    public int deleteProEconCurveFittingMainFByDay(Date recodedate);
+    public int deleteProEconCurveFittingMainFByDay(Date recodedate,String wtIds);
     public int deleteProEconCurveFittingMainGByDay(Date recodedate);
 }

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

@@ -15,6 +15,6 @@ import java.util.Date;
  */
 public interface IProEconCurveFittingSubService extends IService<ProEconCurveFittingSub> {
 
-    public int deleteProEconCurveFittingSubFByDay(Date recodedate);
+    public int deleteProEconCurveFittingSubFByDay(Date recodedate,String wtIds);
     public int deleteProEconCurveFittingSubGByDay(Date recodedate);
 }

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

@@ -13,6 +13,6 @@ import com.gyee.generation.model.auto.ProEconWtCurveFittingMonth;
  */
 public interface IProEconWtCurveFittingMonthService extends IService<ProEconWtCurveFittingMonth> {
 
-    public int deleteProEconWtCurveFittingFByMonth(String year, String month);
+    public int deleteProEconWtCurveFittingFByMonth(String year, String month,String wtIds);
     public int deleteProEconWtCurveFittingGByMonth(String year, String month);
 }

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

@@ -15,6 +15,6 @@ import java.util.Date;
  */
 public interface IProEconWtCurveFittingService extends IService<ProEconWtCurveFitting> {
 
-    public int deleteProEconWtCurveFittingFByDay(Date recodedate);
+    public int deleteProEconWtCurveFittingFByDay(Date recodedate,String wtIds);
     public int deleteProEconWtCurveFittingGByDay(Date recodedate);
 }

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

@@ -13,6 +13,6 @@ import com.gyee.generation.model.auto.ProEconWtCurveFittingYear;
  */
 public interface IProEconWtCurveFittingYearService extends IService<ProEconWtCurveFittingYear> {
 
-    public int deleteProEconWtCurveFittingFByYear(String year);
+    public int deleteProEconWtCurveFittingFByYear(String year,String wtIds);
     public int deleteProEconWtCurveFittingGByYear(String year);
 }

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconCurveFittMonthMainServiceImpl.java

@@ -22,9 +22,9 @@ public class ProEconCurveFittMonthMainServiceImpl extends ServiceImpl<ProEconCur
     @Resource
     private ProEconCurveFittMonthMainMapper proEconCurveFittMonthMainMapper;
     @Override
-    public int deleteProEconCurveFittMonthMainFByMonth(String year, String month) {
+    public int deleteProEconCurveFittMonthMainFByMonth(String year, String month,String wtIds) {
 
-        return proEconCurveFittMonthMainMapper.deleteProEconCurveFittMonthSubFByMonth(year,month);
+        return proEconCurveFittMonthMainMapper.deleteProEconCurveFittMonthSubFByMonth(year,month,wtIds);
     }
     @Override
     public int deleteProEconCurveFittMonthMainGByMonth(String year, String month) {

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconCurveFittMonthSubServiceImpl.java

@@ -22,9 +22,9 @@ public class ProEconCurveFittMonthSubServiceImpl extends ServiceImpl<ProEconCurv
     @Resource
     private ProEconCurveFittMonthSubMapper proEconCurveFittMonthSubMapper;
     @Override
-    public int deleteProEconCurveFittMonthSubFByMonth(String year, String month) {
+    public int deleteProEconCurveFittMonthSubFByMonth(String year, String month,String wtIds) {
 
-        return proEconCurveFittMonthSubMapper.deleteProEconCurveFittMonthSubFByMonth(year,month);
+        return proEconCurveFittMonthSubMapper.deleteProEconCurveFittMonthSubFByMonth(year,month,wtIds);
     }
     @Override
     public int deleteProEconCurveFittMonthSubGByMonth(String year, String month) {

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconCurveFittYearMainServiceImpl.java

@@ -22,8 +22,8 @@ public class ProEconCurveFittYearMainServiceImpl extends ServiceImpl<ProEconCurv
     @Resource
     private ProEconCurveFittYearMainMapper proEconCurveFittYearMainMapper;
     @Override
-    public int deleteProEconCurveFittYearMainFByYear(String year) {
-        return proEconCurveFittYearMainMapper.deleteProEconCurveFittYearMainFByYear(year);
+    public int deleteProEconCurveFittYearMainFByYear(String year,String wtIds) {
+        return proEconCurveFittYearMainMapper.deleteProEconCurveFittYearMainFByYear(year,wtIds);
     }
     @Override
     public int deleteProEconCurveFittYearMainGByYear(String year) {

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconCurveFittYearSubServiceImpl.java

@@ -22,8 +22,8 @@ public class ProEconCurveFittYearSubServiceImpl extends ServiceImpl<ProEconCurve
     @Resource
     private ProEconCurveFittYearSubMapper proEconCurveFittYearSubMapper;
     @Override
-    public int deleteProEconCurveFittYearSubFByYear(String year) {
-        return proEconCurveFittYearSubMapper.deleteProEconCurveFittYearSubFByYear(year);
+    public int deleteProEconCurveFittYearSubFByYear(String year,String wtIds) {
+        return proEconCurveFittYearSubMapper.deleteProEconCurveFittYearSubFByYear(year,wtIds);
     }
     @Override
     public int deleteProEconCurveFittYearSubGByYear(String year) {

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconCurveFittingMainServiceImpl.java

@@ -25,8 +25,8 @@ public class ProEconCurveFittingMainServiceImpl extends ServiceImpl<ProEconCurve
     private ProEconCurveFittingMainMapper proEconCurveFittingMainMapper;
 
     @Override
-    public int deleteProEconCurveFittingMainFByDay(Date recodedate) {
-        return  proEconCurveFittingMainMapper.deleteProEconCurveFittingMainFByDay(recodedate);
+    public int deleteProEconCurveFittingMainFByDay(Date recodedate,String wtIds) {
+        return  proEconCurveFittingMainMapper.deleteProEconCurveFittingMainFByDay(recodedate,wtIds);
     }
 
     @Override

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconCurveFittingSubServiceImpl.java

@@ -25,8 +25,8 @@ public class ProEconCurveFittingSubServiceImpl extends ServiceImpl<ProEconCurveF
     private ProEconCurveFittingSubMapper proEconCurveFittingSubMapper;
 
     @Override
-    public int deleteProEconCurveFittingSubFByDay(Date recodedate) {
-        return  proEconCurveFittingSubMapper.deleteProEconCurveFittingSubFByDay(recodedate);
+    public int deleteProEconCurveFittingSubFByDay(Date recodedate,String wtIds) {
+        return  proEconCurveFittingSubMapper.deleteProEconCurveFittingSubFByDay(recodedate,wtIds);
     }
 
     @Override

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconWtCurveFittingMonthServiceImpl.java

@@ -21,9 +21,9 @@ public class ProEconWtCurveFittingMonthServiceImpl extends ServiceImpl<ProEconWt
     @Resource
     private ProEconWtCurveFittingMonthMapper proEconWtCurveFittingMonthMapper;
     @Override
-    public int deleteProEconWtCurveFittingFByMonth(String year, String month) {
+    public int deleteProEconWtCurveFittingFByMonth(String year, String month,String wtIds) {
 
-        return proEconWtCurveFittingMonthMapper.deleteProEconWtCurveFittingFByMonth(year,month);
+        return proEconWtCurveFittingMonthMapper.deleteProEconWtCurveFittingFByMonth(year,month,wtIds);
     }
     @Override
     public int deleteProEconWtCurveFittingGByMonth(String year, String month) {

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconWtCurveFittingServiceImpl.java

@@ -25,8 +25,8 @@ public class ProEconWtCurveFittingServiceImpl extends ServiceImpl<ProEconWtCurve
     private ProEconWtCurveFittingMapper proEconWtCurveFittingMapper;
 
     @Override
-    public int deleteProEconWtCurveFittingFByDay(Date recodedate) {
-        return  proEconWtCurveFittingMapper.deleteProEconWtCurveFittingFByDay(recodedate);
+    public int deleteProEconWtCurveFittingFByDay(Date recodedate,String wtIds) {
+        return  proEconWtCurveFittingMapper.deleteProEconWtCurveFittingFByDay(recodedate,wtIds);
     }
     @Override
     public int deleteProEconWtCurveFittingGByDay(Date recodedate) {

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconWtCurveFittingYearServiceImpl.java

@@ -21,8 +21,8 @@ public class ProEconWtCurveFittingYearServiceImpl extends ServiceImpl<ProEconWtC
     @Resource
     private ProEconWtCurveFittingYearMapper proEconWtCurveFittingYearMapper;
     @Override
-    public int deleteProEconWtCurveFittingFByYear(String year) {
-        return proEconWtCurveFittingYearMapper.deleteProEconWtCurveFittingFByYear(year);
+    public int deleteProEconWtCurveFittingFByYear(String year,String wtIds) {
+        return proEconWtCurveFittingYearMapper.deleteProEconWtCurveFittingFByYear(year, wtIds);
     }
     @Override
     public int deleteProEconWtCurveFittingGByYear(String year) {

+ 190 - 201
realtime/generationXK-service/src/main/java/com/gyee/generation/service/initalcache/CacheService.java

@@ -4,7 +4,8 @@ package com.gyee.generation.service.initalcache;/*
 */
 
 import com.alibaba.fastjson.JSONObject;
-import com.gyee.generation.model.auto.ProBasicStatusPoint;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.gyee.generation.model.auto.*;
 import com.gyee.generation.service.auto.*;
 import com.gyee.generation.util.redis.RedisService;
 import lombok.extern.slf4j.Slf4j;
@@ -16,6 +17,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 @Service
 @Slf4j
@@ -53,208 +55,195 @@ public class CacheService {
     private IProBasicBranchService proBasicBranchService;
     @Resource
     private IProBasicEnergyGroupService energyGroupService;
-
+    @Resource
+    private IProBasicSubStationTestpointService proBasicSubStationTestpointService;
 
     public void initRedisCache(){
-//        redisService.select(9);
-//        log.info("--------------------------redisWT");
-//        List<ProBasicEquipment> windturbineList = windturbineService.list().stream().filter(i-> i.getIsable().equals(1)).collect(Collectors.toList());
-//        log.info("--------------------------windturbineList"+windturbineList.size());
-//        windturbineList.stream().forEach(i->{
-//            Map<String, ProBasicEquipmentPoint> codeaimap = new HashMap<>();
-//            QueryWrapper<ProBasicEquipmentPoint> qw = new QueryWrapper<>();
-//            qw.eq("windturbine_id",i.getId());
-//            List<ProBasicEquipmentPoint> windturbinetestingpointai2List = windturbinetestingpointnewService.list(qw);
-//            log.info("--------------------------windturbinetestingpointai2List"+windturbinetestingpointai2List.size());
-//            windturbinetestingpointai2List.stream().forEach(x->{
-//                codeaimap.put(x.getUniformCode(),x);
-//            });
-//            log.info("--------------------------codeaimap"+codeaimap.size());
-//            String s = JSONObject.toJSONString(codeaimap);
-//            redisService.set(i.getId(),s);
-//        });
-//
-//        log.info("--------------------------redisZL");
-//        List<ProBasicBranch> branchList = proBasicBranchService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
-//        if (StringUtils.isNotEmpty(branchList)){
-//            branchList.stream().forEach(i->{
-//                Map<String, ProBasicEquipmentPoint> codeaimap = new HashMap<>();
-//                QueryWrapper<ProBasicEquipmentPoint> qw = new QueryWrapper<>();
-//                qw.eq("windturbine_id",i.getId());
-//                List<ProBasicEquipmentPoint> windturbinetestingpointai2List = windturbinetestingpointnewService.list(qw);
-//                windturbinetestingpointai2List.stream().forEach(x->{
-//                    codeaimap.put(x.getUniformCode(),x);
-//                });
-//                String s = JSONObject.toJSONString(codeaimap);
-//                redisService.set(i.getId(),s);
-//            });
-//        }
-//
-//        log.info("--------------------------redisSQ");
-//        List<ProBasicSquare> squareList = proBasicSquareService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
-//        squareList.stream().forEach(i->{
-//            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
-//            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
-//            qw.eq("windpowerstation_id",i.getId());
-//            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
-//            windpowerstationtestingpoint2List.stream().forEach(x->{
-//                codeaimap.put(x.getUniformCode(),x);
-//            });
-//            String s = JSONObject.toJSONString(codeaimap);
-//            redisService.set(i.getId(),s);
-//        });
-//
-//        log.info("--------------------------redisLN");
-//        List<ProBasicLine> lineList = lineService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
-//        lineList.stream().forEach(i->{
-//            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
-//            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
-//            qw.eq("windpowerstation_id",i.getId());
-//            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
-//            windpowerstationtestingpoint2List.stream().forEach(x->{
-//                codeaimap.put(x.getUniformCode(),x);
-//            });
-//            String s = JSONObject.toJSONString(codeaimap);
-//            redisService.set(i.getId(),s);
-//        });
-//
-//
-//
-//        log.info("--------------------------redisPJ");
-//        List<ProBasicProject> projectList = projectService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
-//        projectList.stream().forEach(i->{
-//            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
-//            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
-//            qw.eq("windpowerstation_id",i.getId());
-//            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
-//            windpowerstationtestingpoint2List.stream().forEach(x->{
-//                codeaimap.put(x.getUniformCode(),x);
-//            });
-//            String s = JSONObject.toJSONString(codeaimap);
-//            redisService.set(i.getId(),s);
-//        });
-//
-//        log.info("--------------------------redisSubWP");
-//        List<ProBasicSubStation> subStationList = subStationService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
-//        subStationList.stream().forEach(i->{
-//            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
-//            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
-//            qw.eq("windpowerstation_id",i.getId());
-//            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
-//            windpowerstationtestingpoint2List.stream().forEach(x->{
-//                codeaimap.put(x.getUniformCode(),x);
-//            });
-//            String s = JSONObject.toJSONString(codeaimap);
-//            redisService.set(i.getId(),s);
-//        });
-//
-//        log.info("--------------------------redisWeatherWP");
-//        List<ProBasicWeatherStation> weatherStationList = proBasicWeatherStationService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
-//        weatherStationList.stream().forEach(i->{
-//            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
-//            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
-//            qw.eq("windpowerstation_id",i.getId());
-//            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
-//            windpowerstationtestingpoint2List.stream().forEach(x->{
-//                codeaimap.put(x.getUniformCode(),x);
-//            });
-//            String s = JSONObject.toJSONString(codeaimap);
-//            redisService.set(i.getId(),s);
-//        });
-//
-//        log.info("--------------------------redisWP");
-//        List<ProBasicPowerstation> wpList = windpowerstationService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
-//
-//        wpList.stream().forEach(i->{
-//            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
-//            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
-//            qw.eq("windpowerstation_id",i.getId());
-//            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
-//            windpowerstationtestingpoint2List.stream().forEach(x->{
-//                codeaimap.put(x.getUniformCode(),x);
-//            });
-//            String s = JSONObject.toJSONString(codeaimap);
-//            redisService.set(i.getId(),s);
-//        });
-//
-//        log.info("--------------------------redisCOMPANY");
-//        List<ProBasicCompany> coms = companyService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
-////        List<String> comList = coms.stream().map(i->i.getId()).collect(Collectors.toList());
-//        List<String> comList = new ArrayList<>();
-//        coms.stream().forEach(company -> {
-//            comList.add(company.getId()+"0");
-//            comList.add(company.getId()+"-1");
-//            comList.add(company.getId()+"-2");
-//        });
-//        comList.stream().forEach(i->{
-//            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
-//            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
-//            qw.eq("windpowerstation_id",i);
-//            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
-//            windpowerstationtestingpoint2List.stream().forEach(x->{
-//                codeaimap.put(x.getUniformCode(),x);
-//            });
-//            String s = JSONObject.toJSONString(codeaimap);
-//            redisService.set(i,s);
-//        });
-//
-//        log.info("--------------------------redisREGION");
-//        List<ProBasicRegion> regs = regionsService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
-//        List<String> regList = new ArrayList<>();
-////        List<String> regList = regs.stream().map(i->i.getId()).collect(Collectors.toList());
-//        regs.stream().forEach(region -> {
-//            regList.add(region.getId()+"0");
-//            regList.add(region.getId()+"-1");
-//            regList.add(region.getId()+"-2");
-//        });
-//        regList.stream().forEach(i->{
-//            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
-//            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
-//            qw.eq("windpowerstation_id",i);
-//            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
-//            windpowerstationtestingpoint2List.stream().forEach(x->{
-//                codeaimap.put(x.getUniformCode(),x);
-//            });
-//            String s = JSONObject.toJSONString(codeaimap);
-//            redisService.set(i,s);
-//        });
-//        log.info("--------------------------redisGroup");
-//        List<ProBasicEnergyGroup> groups = energyGroupService.list().stream().filter(i->i.getIsAble().equals(1) && !i.getParentid().equals("0")).collect(Collectors.toList());
-//        List<String> groupList = new ArrayList<>();
-////        List<String> regList = regs.stream().map(i->i.getId()).collect(Collectors.toList());
-//        groups.stream().forEach(group -> {
-//            groupList.add(group.getId()+"0");
-//            groupList.add(group.getId()+"-1");
-//            groupList.add(group.getId()+"-2");
-//        });
-//        groupList.stream().forEach(i->{
-//            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
-//            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
-//            qw.eq("windpowerstation_id",i);
-//            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
-//            windpowerstationtestingpoint2List.stream().forEach(x->{
-//                codeaimap.put(x.getUniformCode(),x);
-//            });
-//            String s = JSONObject.toJSONString(codeaimap);
-//            redisService.set(i,s);
-//        });
-//        redisService.select(9);
-//        log.info("--------------------------redis理论保证功率");
-//        Map<String, Map<Double, ProBasicModelPowerRd>> powerrdMap = new HashMap<>();
-//
-//        List<ProBasicModelPowerRd> proBasicModelPowerRds = proBasicModelPowerRdService.list();
-//        proBasicModelPowerRds.stream().forEach(powerrd->{
-//            if (powerrdMap.containsKey(powerrd.getModelId())){
-//                powerrdMap.get(powerrd.getModelId()).put(powerrd.getSpeed(),powerrd);
-//            }else {
-//                Map<Double,ProBasicModelPowerRd> powerMap = new HashMap<>();
-//                powerMap.put(powerrd.getSpeed(),powerrd);
-//                powerrdMap.put(powerrd.getModelId(),powerMap);
-//            }
-//        });
-//        redisService.set("ZLLGL", JSONObject.toJSONString(powerrdMap));
-//
-//        log.info("--------------------------redis十三种状态");
+        redisService.select(9);
+        log.info("--------------------------redisWT");
+        List<ProBasicEquipment> windturbineList = windturbineService.list().stream().filter(i-> i.getIsable().equals(1)).collect(Collectors.toList());
+        log.info("--------------------------windturbineList"+windturbineList.size());
+        windturbineList.stream().forEach(i->{
+            Map<String, ProBasicEquipmentPoint> codeaimap = new HashMap<>();
+            QueryWrapper<ProBasicEquipmentPoint> qw = new QueryWrapper<>();
+            qw.eq("windturbine_id",i.getId());
+            List<ProBasicEquipmentPoint> windturbinetestingpointai2List = windturbinetestingpointnewService.list(qw);
+            log.info("--------------------------windturbinetestingpointai2List"+windturbinetestingpointai2List.size());
+            windturbinetestingpointai2List.stream().forEach(x->{
+                codeaimap.put(x.getUniformCode(),x);
+            });
+            log.info("--------------------------codeaimap"+codeaimap.size());
+            String s = JSONObject.toJSONString(codeaimap);
+            redisService.set(i.getId(),s);
+        });
+
+
+        log.info("--------------------------redisSQ");
+        List<ProBasicSquare> squareList = proBasicSquareService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
+        squareList.stream().forEach(i->{
+            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
+            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
+            qw.eq("windpowerstation_id",i.getId());
+            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
+            windpowerstationtestingpoint2List.stream().forEach(x->{
+                codeaimap.put(x.getUniformCode(),x);
+            });
+            String s = JSONObject.toJSONString(codeaimap);
+            redisService.set(i.getId(),s);
+        });
+
+        log.info("--------------------------redisLN");
+        List<ProBasicLine> lineList = lineService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
+        lineList.stream().forEach(i->{
+            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
+            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
+            qw.eq("windpowerstation_id",i.getId());
+            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
+            windpowerstationtestingpoint2List.stream().forEach(x->{
+                codeaimap.put(x.getUniformCode(),x);
+            });
+            String s = JSONObject.toJSONString(codeaimap);
+            redisService.set(i.getId(),s);
+        });
+
+
+
+        log.info("--------------------------redisPJ");
+        List<ProBasicProject> projectList = projectService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
+        projectList.stream().forEach(i->{
+            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
+            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
+            qw.eq("windpowerstation_id",i.getId());
+            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
+            windpowerstationtestingpoint2List.stream().forEach(x->{
+                codeaimap.put(x.getUniformCode(),x);
+            });
+            String s = JSONObject.toJSONString(codeaimap);
+            redisService.set(i.getId(),s);
+        });
+
+        log.info("--------------------------redisSubWP");
+        redisService.select(9);
+        List<ProBasicSubStation> subStationList = subStationService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
+        subStationList.stream().forEach(i->{
+            Map<String, ProBasicSubStationTestpoint> codeaimap = new HashMap<>();
+            QueryWrapper<ProBasicSubStationTestpoint> qw = new QueryWrapper<>();
+            qw.eq("windpowerstation_id",i.getId());
+            List<ProBasicSubStationTestpoint> windpowerstationtestingpoint2List = proBasicSubStationTestpointService.list(qw);
+            windpowerstationtestingpoint2List.stream().forEach(x->{
+                codeaimap.put(x.getUniformCode(),x);
+            });
+            String s = JSONObject.toJSONString(codeaimap);
+            redisService.set(i.getId(),s);
+        });
+
+        log.info("--------------------------redisWeatherWP");
+        List<ProBasicWeatherStation> weatherStationList = proBasicWeatherStationService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
+        weatherStationList.stream().forEach(i->{
+            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
+            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
+            qw.eq("windpowerstation_id",i.getId());
+            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
+            windpowerstationtestingpoint2List.stream().forEach(x->{
+                codeaimap.put(x.getUniformCode(),x);
+            });
+            String s = JSONObject.toJSONString(codeaimap);
+            redisService.set(i.getId(),s);
+        });
+
+        log.info("--------------------------redisWP");
+        List<ProBasicPowerstation> wpList = windpowerstationService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
+
+        wpList.stream().forEach(i->{
+            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
+            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
+            qw.eq("windpowerstation_id",i.getId());
+            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
+            windpowerstationtestingpoint2List.stream().forEach(x->{
+                codeaimap.put(x.getUniformCode(),x);
+            });
+            String s = JSONObject.toJSONString(codeaimap);
+            redisService.set(i.getId(),s);
+        });
+
+        log.info("--------------------------redisCOMPANY");
+        List<ProBasicCompany> coms = companyService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
+//        List<String> comList = coms.stream().map(i->i.getId()).collect(Collectors.toList());
+        List<String> comList = new ArrayList<>();
+        coms.stream().forEach(company -> {
+            comList.add(company.getId()+"0");
+            comList.add(company.getId()+"-1");
+            comList.add(company.getId()+"-2");
+        });
+        comList.stream().forEach(i->{
+            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
+            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
+            qw.eq("windpowerstation_id",i);
+            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
+            windpowerstationtestingpoint2List.stream().forEach(x->{
+                codeaimap.put(x.getUniformCode(),x);
+            });
+            String s = JSONObject.toJSONString(codeaimap);
+            redisService.set(i,s);
+        });
+
+        log.info("--------------------------redisREGION");
+        List<ProBasicRegion> regs = regionsService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
+        List<String> regList = new ArrayList<>();
+//        List<String> regList = regs.stream().map(i->i.getId()).collect(Collectors.toList());
+        regs.stream().forEach(region -> {
+            regList.add(region.getId()+"0");
+            regList.add(region.getId()+"-1");
+            regList.add(region.getId()+"-2");
+        });
+        regList.stream().forEach(i->{
+            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
+            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
+            qw.eq("windpowerstation_id",i);
+            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
+            windpowerstationtestingpoint2List.stream().forEach(x->{
+                codeaimap.put(x.getUniformCode(),x);
+            });
+            String s = JSONObject.toJSONString(codeaimap);
+            redisService.set(i,s);
+        });
+        log.info("--------------------------redisGroup");
+        List<ProBasicEnergyGroup> groups = energyGroupService.list().stream().filter(i->i.getIsAble().equals(1) && !i.getParentid().equals("0")).collect(Collectors.toList());
+        List<String> groupList = new ArrayList<>();
+//        List<String> regList = regs.stream().map(i->i.getId()).collect(Collectors.toList());
+        groups.stream().forEach(group -> {
+            groupList.add(group.getId()+"0");
+            groupList.add(group.getId()+"-1");
+            groupList.add(group.getId()+"-2");
+        });
+        groupList.stream().forEach(i->{
+            Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
+            QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
+            qw.eq("windpowerstation_id",i);
+            List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
+            windpowerstationtestingpoint2List.stream().forEach(x->{
+                codeaimap.put(x.getUniformCode(),x);
+            });
+            String s = JSONObject.toJSONString(codeaimap);
+            redisService.set(i,s);
+        });
+        redisService.select(9);
+        log.info("--------------------------redis理论保证功率");
+        Map<String, Map<Double, ProBasicModelPowerRd>> powerrdMap = new HashMap<>();
+
+        List<ProBasicModelPowerRd> proBasicModelPowerRds = proBasicModelPowerRdService.list();
+        proBasicModelPowerRds.stream().forEach(powerrd->{
+            if (powerrdMap.containsKey(powerrd.getModelId())){
+                powerrdMap.get(powerrd.getModelId()).put(powerrd.getSpeed(),powerrd);
+            }else {
+                Map<Double,ProBasicModelPowerRd> powerMap = new HashMap<>();
+                powerMap.put(powerrd.getSpeed(),powerrd);
+                powerrdMap.put(powerrd.getModelId(),powerMap);
+            }
+        });
+        redisService.set("ZLLGL", JSONObject.toJSONString(powerrdMap));
+
+        log.info("--------------------------redis十三种状态");
         Map<String, List<ProBasicStatusPoint>> sszztMap = new HashMap<>();
         List<ProBasicStatusPoint> windturbinestatusdis = proBasicStatusPointService.list();
         windturbinestatusdis.stream().forEach(w->{

+ 236 - 230
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/CycleCalculationService.java

@@ -381,15 +381,18 @@ public class CycleCalculationService {
                         double jxss = generalLoss(mxztPointDatas, zsglPointDatas, ssglPointDatas, 6);
                         //检修受累
                         double jxsl = generalLoss(mxztPointDatas, zsglPointDatas, ssglPointDatas, 7);
-                        //待机
-                        double djss = generalLoss(mxztPointDatas, zsglPointDatas, ssglPointDatas, 0);
-                        //手动停机
-                        double sdtj = generalLoss(mxztPointDatas, zsglPointDatas, ssglPointDatas, 1);
-                        //性能
+//                        //待机
+//                        double djss = generalLoss(mxztPointDatas, zsglPointDatas, ssglPointDatas, 0);
+//                        //手动停机
+//                        double sdtj = generalLoss(mxztPointDatas, zsglPointDatas, ssglPointDatas, 1);
+//                        //性能
 //                    double xnss = generalLoss(mxztPointDatas, zsglPointDatas, ssglPointDatas, 2);
                         double xnss = 0;
-                        //发电降出力
-                        double fdjcl = generalLoss(mxztPointDatas, zsglPointDatas, ssglPointDatas, 3);
+                        double djss = 0;
+                        double sdtj = 0;
+                        double fdjcl = 0;
+//                        //发电降出力
+//                        double fdjcl = generalLoss(mxztPointDatas, zsglPointDatas, ssglPointDatas, 3);
                         //限电降出力
                         double xdjcl = generalLoss(mxztPointDatas, zsglPointDatas, ssglPointDatas, 8);
                         //限电停机
@@ -503,16 +506,19 @@ public class CycleCalculationService {
                             rjxss = DoubleUtils.sum(lsjxss, jxss);
                             double lsjxsl = edosUtil.getSectionData(rjxslPoint, currentDate.getTime()).getPointValueInDouble();
                             rjxsl = DoubleUtils.sum(lsjxsl, jxsl);
-                            double lsdjss = edosUtil.getSectionData(rdjssPoint, currentDate.getTime()).getPointValueInDouble();
-                            rdjss = DoubleUtils.sum(lsdjss, djss);
-                            double lssdtj = edosUtil.getSectionData(rsdtjPoint, currentDate.getTime()).getPointValueInDouble();
-                            rsdtj = DoubleUtils.sum(lssdtj, sdtj);
-                            double lsxnss = edosUtil.getSectionData(rxnssPoint, currentDate.getTime()).getPointValueInDouble();
+//                            double lsdjss = edosUtil.getSectionData(rdjssPoint, currentDate.getTime()).getPointValueInDouble();
+//                            rdjss = DoubleUtils.sum(lsdjss, djss);
+//                            double lssdtj = edosUtil.getSectionData(rsdtjPoint, currentDate.getTime()).getPointValueInDouble();
+//                            rsdtj = DoubleUtils.sum(lssdtj, sdtj);
+//                            double lsxnss = edosUtil.getSectionData(rxnssPoint, currentDate.getTime()).getPointValueInDouble();
 //                        rxnss = DoubleUtils.sum(lsxnss, xnss);
 
+                            rdjss = 0.0;
+                            rsdtj = 0.0;
                             rxnss = 0.0;
-                            double lsfdjcl = edosUtil.getSectionData(rfdjclPoint, currentDate.getTime()).getPointValueInDouble();
-                            rfdjcl = DoubleUtils.sum(lsfdjcl, fdjcl);
+                            rfdjcl = 0.0;
+//                            double lsfdjcl = edosUtil.getSectionData(rfdjclPoint, currentDate.getTime()).getPointValueInDouble();
+//                            rfdjcl = DoubleUtils.sum(lsfdjcl, fdjcl);
                             double lsxdjcl = edosUtil.getSectionData(rxdjclPoint, currentDate.getTime()).getPointValueInDouble();
                             rxdjcl = DoubleUtils.sum(lsxdjcl, xdjcl);
                             double lsxdtj = edosUtil.getSectionData(rxdtjPoint, currentDate.getTime()).getPointValueInDouble();
@@ -1471,30 +1477,30 @@ public class CycleCalculationService {
                     }
                     return v;
                 });
-                rdjss.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(rdjssPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                ydjss.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(ydjssPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                ndjss.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(ndjssPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
+//                rdjss.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(rdjssPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                ydjss.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(ydjssPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                ndjss.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(ndjssPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
                 djss15.updateAndGet(v -> {
                     try {
                         return new Double((double) (v + edosUtil.getSectionData(djss15Point, currentDate.getTime()).getPointValueInDouble()));
@@ -1503,30 +1509,30 @@ public class CycleCalculationService {
                     }
                     return v;
                 });
-                rsdtj.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(rsdtjPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                ysdtj.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(ysdtjPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                nsdtj.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(nsdtjPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
+//                rsdtj.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(rsdtjPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                ysdtj.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(ysdtjPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                nsdtj.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(nsdtjPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
                 sdtj15.updateAndGet(v -> {
                     try {
                         return new Double((double) (v + edosUtil.getSectionData(sdtj15Point, currentDate.getTime()).getPointValueInDouble()));
@@ -1569,30 +1575,30 @@ public class CycleCalculationService {
                     }
                     return v;
                 });
-                rfdjcl.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(rfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                yfdjcl.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(yfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                nfdjcl.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(nfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
+//                rfdjcl.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(rfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                yfdjcl.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(yfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                nfdjcl.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(nfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
                 fdjcl15.updateAndGet(v -> {
                     try {
                         return new Double((double) (v + edosUtil.getSectionData(fdjcl15Point, currentDate.getTime()).getPointValueInDouble()));
@@ -2582,30 +2588,30 @@ public class CycleCalculationService {
                     }
                     return v;
                 });
-                rdjss.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(rdjssPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                ydjss.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(ydjssPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                ndjss.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(ndjssPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
+//                rdjss.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(rdjssPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                ydjss.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(ydjssPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                ndjss.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(ndjssPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
                 djss15.updateAndGet(v -> {
                     try {
                         return new Double((double) (v + edosUtil.getSectionData(djss15Point, currentDate.getTime()).getPointValueInDouble()));
@@ -2614,30 +2620,30 @@ public class CycleCalculationService {
                     }
                     return v;
                 });
-                rsdtj.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(rsdtjPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                ysdtj.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(ysdtjPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                nsdtj.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(nsdtjPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
+//                rsdtj.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(rsdtjPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                ysdtj.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(ysdtjPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                nsdtj.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(nsdtjPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
                 sdtj15.updateAndGet(v -> {
                     try {
                         return new Double((double) (v + edosUtil.getSectionData(sdtj15Point, currentDate.getTime()).getPointValueInDouble()));
@@ -2678,30 +2684,30 @@ public class CycleCalculationService {
                     }
                     return v;
                 });
-                rfdjcl.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(rfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                yfdjcl.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(yfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                nfdjcl.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(nfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
+//                rfdjcl.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(rfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                yfdjcl.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(yfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                nfdjcl.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(nfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
                 fdjcl15.updateAndGet(v -> {
                     try {
                         return new Double((double) (v + edosUtil.getSectionData(fdjcl15Point, currentDate.getTime()).getPointValueInDouble()));
@@ -3690,30 +3696,30 @@ public class CycleCalculationService {
                     }
                     return v;
                 });
-                rdjss.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(rdjssPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                ydjss.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(ydjssPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                ndjss.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(ndjssPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
+//                rdjss.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(rdjssPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                ydjss.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(ydjssPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                ndjss.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(ndjssPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
                 djss15.updateAndGet(v -> {
                     try {
                         return new Double((double) (v + edosUtil.getSectionData(djss15Point, currentDate.getTime()).getPointValueInDouble()));
@@ -3722,30 +3728,30 @@ public class CycleCalculationService {
                     }
                     return v;
                 });
-                rsdtj.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(rsdtjPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                ysdtj.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(ysdtjPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                nsdtj.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(nsdtjPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
+//                rsdtj.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(rsdtjPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                ysdtj.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(ysdtjPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                nsdtj.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(nsdtjPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
                 sdtj15.updateAndGet(v -> {
                     try {
                         return new Double((double) (v + edosUtil.getSectionData(sdtj15Point, currentDate.getTime()).getPointValueInDouble()));
@@ -3786,30 +3792,30 @@ public class CycleCalculationService {
                     }
                     return v;
                 });
-                rfdjcl.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(rfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                yfdjcl.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(yfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
-                nfdjcl.updateAndGet(v -> {
-                    try {
-                        return new Double((double) (v + edosUtil.getSectionData(nfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                    return v;
-                });
+//                rfdjcl.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(rfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                yfdjcl.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(yfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
+//                nfdjcl.updateAndGet(v -> {
+//                    try {
+//                        return new Double((double) (v + edosUtil.getSectionData(nfdjclPoint, currentDate.getTime()).getPointValueInDouble()));
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//                    return v;
+//                });
                 fdjcl15.updateAndGet(v -> {
                     try {
                         return new Double((double) (v + edosUtil.getSectionData(fdjcl15Point, currentDate.getTime()).getPointValueInDouble()));

+ 35 - 16
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/StatusService.java

@@ -444,9 +444,15 @@ public class StatusService {
     /**
      * 计算风机状态
      */
+
+
+
+    /**
+     * 计算风机状态
+     */
     public void statusReal() throws Exception {
         Map<String, Map<String, ProBasicEquipmentPoint>> wtpAimap = CacheContext.wtpAimap;
-        List<ProBasicEquipment> wtls = CacheContext.wtls;
+
         Map<String, List<ProBasicStatusPoint>> statusMap = CacheContext.statusMap;
         Map<String, ProEconEquipmentmodel> modelMap = CacheContext.modelMap;
         Map<String, Map<Integer, Integer>> aistateMap = CacheContext.aistateMap;
@@ -454,11 +460,13 @@ public class StatusService {
 
         List<PointData> resultList = new ArrayList<>();
 
-        int times=0;
 
         List<String> pointls=new ArrayList<>();
 
         List<PointData> pointDatals = new ArrayList<>();
+
+        List<ProBasicEquipment> wtls = CacheContext.wtls;
+
         for(ProBasicEquipment wt:wtls) {
             Map<String, ProBasicEquipmentPoint> equipmentPointMap = wtpAimap.get(wt.getId());
             //中间状态点
@@ -467,8 +475,7 @@ public class StatusService {
             ProBasicEquipmentPoint gpztPoint = equipmentPointMap.get(ContantXk.GPZT);
             //明细状态点
             ProBasicEquipmentPoint mxztPoint = equipmentPointMap.get(ContantXk.MXZT);
-            //实时功率点
-            ProBasicEquipmentPoint ssglPoint = equipmentPointMap.get(ContantXk.CJ_SSGL);
+
             //状态持续时间,以秒计算
             ProBasicEquipmentPoint ztcxsjPoint = equipmentPointMap.get(ContantXk.ZTCXSJ);
 
@@ -476,16 +483,15 @@ public class StatusService {
             pointls.add(gpztPoint.getNemCode());
 
             pointls.add(mxztPoint.getNemCode());
-            pointls.add(ssglPoint.getNemCode());
+
             pointls.add(ztcxsjPoint.getNemCode());
 
-            times++;
-            if(times==1000)
+
+            if(pointls.size()>=1000)
             {
                 List<PointData> templs=edosUtil.getRealData(pointls);
                 pointDatals.addAll(templs);
                 pointls=new ArrayList<>();
-                times=0;
             }
         }
         if(!pointls.isEmpty())
@@ -495,6 +501,8 @@ public class StatusService {
         }
 
 
+
+
         for(int x=0;x<wtls.size();x++) {
             ProBasicEquipment wt=wtls.get(x);
             Map<String, ProBasicEquipmentPoint> equipmentPointMap = wtpAimap.get(wt.getId());
@@ -524,8 +532,8 @@ public class StatusService {
             double mxzt = 0;
             double ztcxsj = 0;
             try {
-                mxzt = pointDatals.get(x*5+2).getPointValueInDouble();
-                ztcxsj =pointDatals.get(x*5+4).getPointValueInDouble();
+                mxzt = pointDatals.get(x*4+2).getPointValueInDouble();
+                ztcxsj =pointDatals.get(x*4+3).getPointValueInDouble();
 
 //                mxzt = edosUtil.getSectionData(mxztPoint, currentDate.getTime()).getPointValueInDouble();
 //                ztcxsj = edosUtil.getSectionData(ztcxsjPoint, currentDate.getTime()).getPointValueInDouble();
@@ -546,14 +554,17 @@ public class StatusService {
                     c.setTime(currentDate);
 
 //
-//                    if (wt.getId().equals("SXJ_KGDL_BHB_F_WT_0032_EQ")) {
+//                    if (wt.getId().equals("SXJ_KGDL_NJL_F_WT_0044_EQ")) {
 //                        System.out.println("");
 //                    }
 
+                    //实时功率点
+                    ProBasicEquipmentPoint ssglPoint = equipmentPointMap.get(ContantXk.CJ_SSGL);
+                    PointData ssgldata= edosUtil.getRealData(ssglPoint);
 
-                    double ssgl = pointDatals.get(x*5+3).getPointValueInDouble();
-                    double gpzt = pointDatals.get(x*5+1).getPointValueInDouble();
-                    double zjzt = pointDatals.get(x*5).getPointValueInDouble();
+                    double ssgl = ssgldata.getPointValueInDouble();
+                    double gpzt = pointDatals.get(x*4+1).getPointValueInDouble();
+                    double zjzt = pointDatals.get(x*4).getPointValueInDouble();
 //                    double ssgl = edosUtil.getSectionData(ssglPoint, currentDate.getTime()).getPointValueInDouble();
 //                    double gpzt = edosUtil.getSectionData(gpztPoint, currentDate.getTime()).getPointValueInDouble();
 //                    double xdzt = edosUtil.getSectionData(xdztPoint, currentDate.getTime()).getPointValueInDouble();
@@ -563,7 +574,7 @@ public class StatusService {
                     }else  if (zjzt == 3) {
                         mxstatus = getGpzt(gpzt, ssgl);
                     } else {
-                        mxstatus = getMxzt(zjzt,modelMap, aistateMap, statusMap, wt);
+                        mxstatus = getMxzt(zjzt,modelMap, aistateMap, statusMap, wt,ssgl);
                     }
 
                     if (mxstatus == 0 || mxstatus == 1) {
@@ -1071,7 +1082,7 @@ public class StatusService {
         edosUtil.sendMultiPoint(resultList);
     }
 
-    private double getMxzt(double zjzt,Map<String, ProEconEquipmentmodel> modelMap,Map<String, Map<Integer, Integer>> aistateMap,Map<String, List<ProBasicStatusPoint>> statusMap,ProBasicEquipment wt) throws Exception {
+    private double getMxzt(double zjzt,Map<String, ProEconEquipmentmodel> modelMap,Map<String, Map<Integer, Integer>> aistateMap,Map<String, List<ProBasicStatusPoint>> statusMap,ProBasicEquipment wt,double ssgl) throws Exception {
 
         double mxstatus = 2;
 
@@ -1139,6 +1150,14 @@ public class StatusService {
             if (stateMap.containsKey("MX002") && stateMap.containsKey("MX003")){
                 mxstatus = Double.parseDouble(stateMap.get("MX003"));
             }
+
+
+            if (mxstatus==2 ){
+              if(ssgl<0 || ssgl==0 )
+              {
+                  mxstatus=0;
+              }
+            }
             if (zjzt==3){
                 if ( stateMap.containsKey("MX009")){
                     mxstatus = 9;

+ 483 - 71
realtime/generationXK-service/src/main/java/com/gyee/generation/task/SaticSchedulePgTask.java

@@ -93,13 +93,14 @@ public class SaticSchedulePgTask {
 
     @Resource
     private StationPowerService powerService;
+
     /**
      * 缓存Redis散点图数据
      * 每天执行一次
      */
 
     @XxlJob("initialRedis_PG")
-    public void initialRedis_PG()  {
+    public void initialRedis_PG() {
 
 
         XxlJobHelper.log("缓存Redis散点图数据调度程序执行开始!........");
@@ -119,7 +120,7 @@ public class SaticSchedulePgTask {
      */
 
     @XxlJob("calFailRate_PG")
-    public void calFailRate_PG()  {
+    public void calFailRate_PG() {
 
 
         XxlJobHelper.log("故障转换率记录调度程序执行开始!........");
@@ -132,13 +133,14 @@ public class SaticSchedulePgTask {
     }
 
     //3.添加定时任务
+
     /**
      * 15分钟数据统计
      * 每15分钟执行一次
      */
 
     @XxlJob("calEquipmentInfo15minute_PG")
-    public void calEquipmentInfo15minute_PG()  {
+    public void calEquipmentInfo15minute_PG() {
 
 
         XxlJobHelper.log("15分钟数据统计记录调度程序执行开始!........");
@@ -151,13 +153,14 @@ public class SaticSchedulePgTask {
     }
 
     //3.添加定时任务
+
     /**
      * 切入切出统计
      * 每5分钟执行一次
      */
 
     @XxlJob("inputOrOutPutSpeed_PG")
-    public void inputOrOutPutSpeed_PG()  {
+    public void inputOrOutPutSpeed_PG() {
 
 
         XxlJobHelper.log("切入切出状态切换记录调度程序执行开始!........");
@@ -170,13 +173,14 @@ public class SaticSchedulePgTask {
     }
 
     //3.添加定时任务
+
     /**
      * 切入切出统计
      * 每天1点执行一次
      */
 
     @XxlJob("inputOrOutPut_PG")
-    public void inputOrOutPut_PG()  {
+    public void inputOrOutPut_PG() {
 
 
         XxlJobHelper.log("切入切出统计调度程序执行开始!........");
@@ -193,7 +197,7 @@ public class SaticSchedulePgTask {
      * 每5分钟执行一次
      */
     @XxlJob("shutdown_PG")
-    public void shutdown_PG()  {
+    public void shutdown_PG() {
 
         XxlJobHelper.log("停机记录调度程序执行开始!........");
 
@@ -211,7 +215,7 @@ public class SaticSchedulePgTask {
      * 每5分钟执行一次
      */
     @XxlJob("brownouts_PG")
-    public void brownouts_PG()  {
+    public void brownouts_PG() {
 
         XxlJobHelper.log("限电停机记录调度程序执行开始!........");
 
@@ -228,29 +232,316 @@ public class SaticSchedulePgTask {
      * 日、月、年功率曲线拟合
      * 每天执行一次
      */
-    @XxlJob("powerCurveFittingnew_PG")
-    public void powerCurveFittingnew_PG()  {
+//    @XxlJob("powerCurveFittingnew_PG")
+//    public void powerCurveFittingnew_PG()  {
+//
+//        XxlJobHelper.log("日、月、年功率曲线拟合调度程序执行开始!........");
+//
+//        Date date=new Date();
+//        try {
+//            XxlJobHelper.log("日序执行开始!........");
+//            powerCurveFittingByTimeService.cureFittingDay(date);
+//            XxlJobHelper.log("日处理完成!........");
+//
+//            XxlJobHelper.log("月序执行开始!........");
+//            powerCurveFittingByTimeService.cureFittingMonth(date,"0");
+//            XxlJobHelper.log("月处理完成!........");
+//
+//            XxlJobHelper.log("年序执行开始!........");
+//            powerCurveFittingByTimeService.cureFittingYear(date);
+//            XxlJobHelper.log("年处理完成!........");
+//
+////            powerCurveFittingByTimeGfService.cureFittingDay(date);
+////            powerCurveFittingByTimeGfService.cureFittingMonth(date,"0");
+////            powerCurveFittingByTimeGfService.cureFittingYear(date);
+//
+//
+//
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//            XxlJobHelper.log(e.getMessage());
+//        }
+//
+//        XxlJobHelper.log("日、月、年功率曲线拟合调度任务处理完成!........");
+//    }
+
+
+    /**
+     * 平遥朱坑风电场功率预测
+     * 每天一次
+     */
+    @XxlJob("shutdown_SXJ_KGDL_ZK_FDC_STA")
+    public void shutdown_SXJ_KGDL_ZK_FDC_STA() {
+
+        XxlJobHelper.log("平遥朱坑风电场功率预测调度程序执行开始!........");
+
+        Date date = new Date();
+        try {
+            XxlJobHelper.log("日序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingDay(date, "SXJ_KGDL_ZK_FDC_STA");
+            XxlJobHelper.log("日处理完成!........");
+
+            XxlJobHelper.log("月序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_ZK_FDC_STA");
+            XxlJobHelper.log("月处理完成!........");
+
+            XxlJobHelper.log("年序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_ZK_FDC_STA");
+            XxlJobHelper.log("年处理完成!........");
+
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            XxlJobHelper.log(e.getMessage());
+        }
+
+        XxlJobHelper.log("平遥朱坑风电场功率预测调度任务处理完成!........");
+    }
+
+
+    /**
+     * 平鲁高家堰风电场功率预测
+     * 每天一次
+     */
+    @XxlJob("shutdown_SXJ_KGDL_GJY_FDC_STA")
+    public void shutdown_SXJ_KGDL_GJY_FDC_STA() {
+
+        XxlJobHelper.log("平鲁高家堰风电场功率预测调度程序执行开始!........");
+
+        Date date = new Date();
+        try {
+            XxlJobHelper.log("日序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingDay(date, "SXJ_KGDL_GJY_FDC_STA");
+            XxlJobHelper.log("日处理完成!........");
+
+            XxlJobHelper.log("月序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_GJY_FDC_STA");
+            XxlJobHelper.log("月处理完成!........");
+
+            XxlJobHelper.log("年序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_GJY_FDC_STA");
+            XxlJobHelper.log("年处理完成!........");
+
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            XxlJobHelper.log(e.getMessage());
+        }
+
+        XxlJobHelper.log("平鲁高家堰风电场功率预测调度任务处理完成!........");
+    }
+
+    /**
+     * 平鲁败虎堡风电场功率预测
+     * 每天一次
+     */
+    @XxlJob("shutdown_SXJ_KGDL_BHB_FDC_STA")
+    public void shutdown_SXJ_KGDL_BHB_FDC_STA() {
+
+        XxlJobHelper.log("平鲁败虎堡风电场功率预测调度程序执行开始!........");
+
+        Date date = new Date();
+        try {
+            XxlJobHelper.log("日序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingDay(date, "SXJ_KGDL_BHB_FDC_STA");
+            XxlJobHelper.log("日处理完成!........");
+
+            XxlJobHelper.log("月序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_BHB_FDC_STA");
+            XxlJobHelper.log("月处理完成!........");
+
+            XxlJobHelper.log("年序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_BHB_FDC_STA");
+            XxlJobHelper.log("年处理完成!........");
+
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            XxlJobHelper.log(e.getMessage());
+        }
+        XxlJobHelper.log("平鲁败虎堡风电场功率预测调度任务处理完成!........");
+    }
+
+    /**
+     * 平鲁红石峁风电场功率预测
+     * 每天一次
+     */
+    @XxlJob("shutdown_SXJ_KGDL_HSM_FDC_STA")
+    public void shutdown_SXJ_KGDL_HSM_FDC_STA() {
+
+        XxlJobHelper.log("平鲁红石峁风电场功率预测调度程序执行开始!........");
+
+        Date date = new Date();
+        try {
+            XxlJobHelper.log("日序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingDay(date, "SXJ_KGDL_HSM_FDC_STA");
+            XxlJobHelper.log("日处理完成!........");
+
+            XxlJobHelper.log("月序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_HSM_FDC_STA");
+            XxlJobHelper.log("月处理完成!........");
+
+            XxlJobHelper.log("年序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_HSM_FDC_STA");
+            XxlJobHelper.log("年处理完成!........");
+
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            XxlJobHelper.log(e.getMessage());
+        }
+        XxlJobHelper.log("平鲁红石峁风电场功率预测调度任务处理完成!........");
+    }
+
+    /**
+     * 寿阳羊头崖风电场功率预测
+     * 每天一次
+     */
+    @XxlJob("shutdown_SXJ_KGDL_YTY_FDC_STA")
+    public void shutdown_SXJ_KGDL_YTY_FDC_STA() {
+
+        XxlJobHelper.log("寿阳羊头崖风电场功率预测调度程序执行开始!........");
+
+        Date date = new Date();
+        try {
+            XxlJobHelper.log("日序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingDay(date, "SXJ_KGDL_YTY_FDC_STA");
+            XxlJobHelper.log("日处理完成!........");
+
+            XxlJobHelper.log("月序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_YTY_FDC_STA");
+            XxlJobHelper.log("月处理完成!........");
+
+            XxlJobHelper.log("年序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_YTY_FDC_STA");
+            XxlJobHelper.log("年处理完成!........");
+
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            XxlJobHelper.log(e.getMessage());
+        }
+        XxlJobHelper.log("寿阳羊头崖风电场功率预测调度任务处理完成!........");
+    }
+
+
+    /**
+     * 平鲁败虎堡三期风电场功率预测
+     * 每天一次
+     */
+    @XxlJob("shutdown_SXJ_KGDL_BHB3_FDC_STA")
+    public void shutdown_SXJ_KGDL_BHB3_FDC_STA() {
+
+        XxlJobHelper.log("平鲁败虎堡三期风电场功率预测调度程序执行开始!........");
+
+        Date date = new Date();
+        try {
+            XxlJobHelper.log("日序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingDay(date, "SXJ_KGDL_BHB3_FDC_STA");
+            XxlJobHelper.log("日处理完成!........");
+
+            XxlJobHelper.log("月序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_BHB3_FDC_STA");
+            XxlJobHelper.log("月处理完成!........");
+
+            XxlJobHelper.log("年序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_BHB3_FDC_STA");
+            XxlJobHelper.log("年处理完成!........");
+
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            XxlJobHelper.log(e.getMessage());
+        }
+        XxlJobHelper.log("平鲁败虎堡三期风电场功率预测调度任务处理完成!........");
+    }
+
+
+    /**
+     * 宁武盘道梁风电场功率预测
+     * 每天一次
+     */
+    @XxlJob("shutdown_SXJ_KGDL_PDL_FDC_STA")
+    public void shutdown_SXJ_KGDL_PDL_FDC_STA() {
+
+        XxlJobHelper.log("宁武盘道梁风电场功率预测调度程序执行开始!........");
+
+        Date date = new Date();
+        try {
+            XxlJobHelper.log("日序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingDay(date, "SXJ_KGDL_PDL_FDC_STA");
+            XxlJobHelper.log("日处理完成!........");
+
+            XxlJobHelper.log("月序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_PDL_FDC_STA");
+            XxlJobHelper.log("月处理完成!........");
+
+            XxlJobHelper.log("年序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_PDL_FDC_STA");
+            XxlJobHelper.log("年处理完成!........");
+
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            XxlJobHelper.log(e.getMessage());
+        }
+        XxlJobHelper.log("宁武盘道梁风电场功率预测调度任务处理完成!........");
+    }
+
+    /**
+     * 朔城区牛家岭风电场功率预测
+     * 每天一次
+     */
+    @XxlJob("shutdown_SXJ_KGDL_NJL_FDC_STA")
+    public void shutdown_SXJ_KGDL_NJL_FDC_STA() {
 
-        XxlJobHelper.log("日、月、年功率曲线拟合调度程序执行开始!........");
+        XxlJobHelper.log("朔城区牛家岭风电场功率预测调度程序执行开始!........");
 
-        Date date=new Date();
+        Date date = new Date();
         try {
             XxlJobHelper.log("日序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingDay(date);
+            powerCurveFittingByTimeService.cureFittingDay(date, "SXJ_KGDL_NJL_FDC_STA");
             XxlJobHelper.log("日处理完成!........");
 
             XxlJobHelper.log("月序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingMonth(date,"0");
+            powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_NJL_FDC_STA");
             XxlJobHelper.log("月处理完成!........");
 
             XxlJobHelper.log("年序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingYear(date);
+            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_NJL_FDC_STA");
             XxlJobHelper.log("年处理完成!........");
 
-//            powerCurveFittingByTimeGfService.cureFittingDay(date);
-//            powerCurveFittingByTimeGfService.cureFittingMonth(date,"0");
-//            powerCurveFittingByTimeGfService.cureFittingYear(date);
 
+        } catch (Exception e) {
+            e.printStackTrace();
+            XxlJobHelper.log(e.getMessage());
+        }
+        XxlJobHelper.log("朔城区牛家岭风电场功率预测调度任务处理完成!........");
+    }
+
+
+    /**
+     * 寿阳尹灵芝风电场功率预测
+     * 每天一次
+     */
+    @XxlJob("shutdown_SXJ_KGDL_YLZ_FDC_STA")
+    public void shutdown_SXJ_KGDL_YLZ_FDC_STA() {
+
+        XxlJobHelper.log("寿阳尹灵芝风电场功率预测调度程序执行开始!........");
+
+        Date date = new Date();
+        try {
+            XxlJobHelper.log("日序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingDay(date, "SXJ_KGDL_YLZ_FDC_STA");
+            XxlJobHelper.log("日处理完成!........");
+
+            XxlJobHelper.log("月序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_YLZ_FDC_STA");
+            XxlJobHelper.log("月处理完成!........");
+
+            XxlJobHelper.log("年序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_YLZ_FDC_STA");
+            XxlJobHelper.log("年处理完成!........");
 
 
         } catch (Exception e) {
@@ -258,21 +549,145 @@ public class SaticSchedulePgTask {
             XxlJobHelper.log(e.getMessage());
         }
 
-        XxlJobHelper.log("日、月、年功率曲线拟合调度任务处理完成!........");
+        XxlJobHelper.log("寿阳尹灵芝风电场功率预测调度任务处理完成!........");
     }
 
 
     /**
+     * 平鲁禹丰风电场功率预测
+     * 每天一次
+     */
+    @XxlJob("shutdown_SXJ_KGDL_YF_FDC_STA")
+    public void shutdown_SXJ_KGDL_YF_FDC_STA() {
+
+        XxlJobHelper.log("平鲁禹丰风电场功率预测调度程序执行开始!........");
+
+        Date date = new Date();
+        try {
+            XxlJobHelper.log("日序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingDay(date, "SXJ_KGDL_YF_FDC_STA");
+            XxlJobHelper.log("日处理完成!........");
+
+            XxlJobHelper.log("月序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_YF_FDC_STA");
+            XxlJobHelper.log("月处理完成!........");
+
+            XxlJobHelper.log("年序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_YF_FDC_STA");
+            XxlJobHelper.log("年处理完成!........");
+
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            XxlJobHelper.log(e.getMessage());
+        }
+        XxlJobHelper.log("平鲁禹丰风电场功率预测调度任务处理完成!........");
+    }
+
+    /**
+     * 寿阳平头镇风电场功率预测
+     * 每天一次
+     */
+    @XxlJob("shutdown_SXJ_KGDL_PTZ_FDC_STA")
+    public void shutdown_SXJ_KGDL_PTZ_FDC_STA() {
+
+        XxlJobHelper.log("寿阳平头镇风电场功率预测调度程序执行开始!........");
+
+        Date date = new Date();
+        try {
+            XxlJobHelper.log("日序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingDay(date, "SXJ_KGDL_PTZ_FDC_STA");
+            XxlJobHelper.log("日处理完成!........");
+
+            XxlJobHelper.log("月序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_PTZ_FDC_STA");
+            XxlJobHelper.log("月处理完成!........");
+
+            XxlJobHelper.log("年序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_PTZ_FDC_STA");
+            XxlJobHelper.log("年处理完成!........");
+
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            XxlJobHelper.log(e.getMessage());
+        }
+        XxlJobHelper.log("寿阳平头镇风电场功率预测调度任务处理完成!........");
+    }
+
+    /**
+     * 右玉小五台风电场功率预测
+     * 每天一次
+     */
+    @XxlJob("shutdown_SXJ_KGDL_XWT_FDC_STA")
+    public void shutdown_SXJ_KGDL_XWT_FDC_STA() {
+
+        XxlJobHelper.log("右玉小五台风电场功率预测调度程序执行开始!........");
+
+        Date date = new Date();
+        try {
+            XxlJobHelper.log("日序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingDay(date, "SXJ_KGDL_XWT_FDC_STA");
+            XxlJobHelper.log("日处理完成!........");
+
+            XxlJobHelper.log("月序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_XWT_FDC_STA");
+            XxlJobHelper.log("月处理完成!........");
+
+            XxlJobHelper.log("年序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_XWT_FDC_STA");
+            XxlJobHelper.log("年处理完成!........");
+
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            XxlJobHelper.log(e.getMessage());
+        }
+        XxlJobHelper.log("右玉小五台风电场功率预测调度任务处理完成!........");
+    }
+
+
+    /**
+     * 右玉丁家窑风电场功率预测
+     * 每天一次
+     */
+    @XxlJob("shutdown_SXJ_KGDL_DJY_FDC_STA")
+    public void shutdown_SXJ_KGDL_DJY_FDC_STA() {
+
+        XxlJobHelper.log("右玉丁家窑风电场功率预测调度程序执行开始!........");
+
+        Date date = new Date();
+        try {
+            XxlJobHelper.log("日序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingDay(date, "SXJ_KGDL_DJY_FDC_STA");
+            XxlJobHelper.log("日处理完成!........");
+
+            XxlJobHelper.log("月序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_DJY_FDC_STA");
+            XxlJobHelper.log("月处理完成!........");
+
+            XxlJobHelper.log("年序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_DJY_FDC_STA");
+            XxlJobHelper.log("年处理完成!........");
+
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            XxlJobHelper.log(e.getMessage());
+        }
+        XxlJobHelper.log("右玉丁家窑风电场功率预测调度任务处理完成!........");
+    }
+
+    /**
      * 场站1表
-     *  15分钟只执行一次
-     *
+     * 15分钟只执行一次
      */
     @XxlJob("windPowerInfo1_PG")
     public void windPowerInfo1_PG() throws Exception {
 
         XxlJobHelper.log("场站指标1调度程序执行开始!........");
 
-        Date date=new Date();
+        Date date = new Date();
 
         windPowerInfo1Service.calLineInfoDay(date);
         windPowerInfo1Service.calProjectInfoDay(date);
@@ -286,15 +701,14 @@ public class SaticSchedulePgTask {
 
     /**
      * 场站2表
-     *  15分钟只执行一次
-     *
+     * 15分钟只执行一次
      */
     @XxlJob("windPowerInfo2_PG")
     public void windPowerInfo2_PG() throws Exception {
 
         XxlJobHelper.log("场站指标2调度程序执行开始!........");
 
-        Date date=new Date();
+        Date date = new Date();
 
         windPowerInfo2Service.calLineInfoDay(date);
         windPowerInfo2Service.calProjectInfoDay(date);
@@ -309,15 +723,14 @@ public class SaticSchedulePgTask {
 
     /**
      * 场站3表
-     *  15分钟只执行一次
-     *
+     * 15分钟只执行一次
      */
     @XxlJob("windPowerInfo3_PG")
     public void windPowerInfo3_PG() throws Exception {
 
         XxlJobHelper.log("场站指标3调度程序执行开始!........");
 
-        Date date=new Date();
+        Date date = new Date();
 
         windPowerInfo3Service.calLineInfoDay(date);
         windPowerInfo3Service.calProjectInfoDay(date);
@@ -331,15 +744,14 @@ public class SaticSchedulePgTask {
 
     /**
      * 场站4表
-     *  15分钟只执行一次
-     *
+     * 15分钟只执行一次
      */
     @XxlJob("windPowerInfo4_PG")
     public void windPowerInfo4_PG() throws Exception {
 
         XxlJobHelper.log("场站指标4调度程序执行开始!........");
 
-        Date date=new Date();
+        Date date = new Date();
 
         windPowerInfo4Service.calLineInfoDay(date);
         windPowerInfo4Service.calProjectInfoDay(date);
@@ -350,17 +762,17 @@ public class SaticSchedulePgTask {
         XxlJobHelper.log("场站指标4指标调度程序执行完成!........");
 
     }
+
     /**
      * 场站5表
-     *  15分钟只执行一次
-     *
+     * 15分钟只执行一次
      */
     @XxlJob("windPowerInfo5_PG")
     public void windPowerInfo5_PG() throws Exception {
 
         XxlJobHelper.log("场站指标5调度程序执行开始!........");
 
-        Date date=new Date();
+        Date date = new Date();
 
         windPowerInfo5Service.calLineInfoDay(date);
         windPowerInfo5Service.calProjectInfoDay(date);
@@ -375,15 +787,14 @@ public class SaticSchedulePgTask {
 
     /**
      * 场站6表
-     *  15分钟只执行一次
-     *
+     * 15分钟只执行一次
      */
     @XxlJob("windPowerInfo6_PG")
     public void windPowerInfo6_PG() throws Exception {
 
         XxlJobHelper.log("场站指标6调度程序执行开始!........");
 
-        Date date=new Date();
+        Date date = new Date();
 
         windPowerInfo6Service.calLineInfoDay(date);
         windPowerInfo6Service.calProjectInfoDay(date);
@@ -397,21 +808,19 @@ public class SaticSchedulePgTask {
 
     /**
      * 设备1-5表
-     *  15分钟只执行一次
-     *
+     * 15分钟只执行一次
      */
     @XxlJob("equipment_PowerInfo1_PG")
     public void equipment_PowerInfo1_PG() throws Exception {
 
         XxlJobHelper.log("设备指标1调度程序执行开始!........");
 
-        Date date=new Date();
+        Date date = new Date();
 
 
         equipmentInfo1Service.calEquipmentInfoDay(date);
 
 
-
         XxlJobHelper.log("设备指标1调度程序执行完成!........");
 
     }
@@ -419,15 +828,14 @@ public class SaticSchedulePgTask {
 
     /**
      * 设备2表
-     *  15分钟只执行一次
-     *
+     * 15分钟只执行一次
      */
     @XxlJob("equipment_PowerInfo2_PG")
     public void equipment_PowerInfo2_PG() throws Exception {
 
         XxlJobHelper.log("设备指标2调度程序执行开始!........");
 
-        Date date=new Date();
+        Date date = new Date();
 
         equipmentInfo2Service.calEquipmentInfoDay(date);
 
@@ -438,15 +846,14 @@ public class SaticSchedulePgTask {
 
     /**
      * 设备3表
-     *  15分钟只执行一次
-     *
+     * 15分钟只执行一次
      */
     @XxlJob("equipment_PowerInfo3_PG")
     public void equipment_PowerInfo3_PG() throws Exception {
 
         XxlJobHelper.log("设备指标3调度程序执行开始!........");
 
-        Date date=new Date();
+        Date date = new Date();
 
 
         equipmentInfo3Service.calEquipmentInfoDay(date);
@@ -459,16 +866,14 @@ public class SaticSchedulePgTask {
 
     /**
      * 设备3表
-     *  15分钟只执行一次
-     *
+     * 15分钟只执行一次
      */
     @XxlJob("equipment_PowerInfo4_PG")
     public void equipment_PowerInfo4_PG() throws Exception {
 
         XxlJobHelper.log("设备指标4调度程序执行开始!........");
 
-        Date date=new Date();
-
+        Date date = new Date();
 
 
         equipmentInfo4Service.calEquipmentInfoDay(date);
@@ -480,15 +885,14 @@ public class SaticSchedulePgTask {
 
     /**
      * 设备5表
-     *  15分钟只执行一次
-     *
+     * 15分钟只执行一次
      */
     @XxlJob("equipment_PowerInfo5_PG")
     public void equipment_PowerInfo5_PG() throws Exception {
 
         XxlJobHelper.log("设备指标5调度程序执行开始!........");
 
-        Date date=new Date();
+        Date date = new Date();
 
 
         equipmentInfo5Service.calEquipmentInfoDay(date);
@@ -497,13 +901,14 @@ public class SaticSchedulePgTask {
         XxlJobHelper.log("设备指标调度5程序执行完成!........");
 
     }
+
     /**
      * 等级评估统计
      * 每天执行一次
      */
 
     @XxlJob("equipmentInfoDayTop_PG")
-    public void equipmentInfoDayTop_PG()  {
+    public void equipmentInfoDayTop_PG() {
 
 
         XxlJobHelper.log("等级评估统计调度程序执行开始!........");
@@ -523,7 +928,7 @@ public class SaticSchedulePgTask {
      */
 
     @XxlJob("windturbineGoodness_PG")
-    public void windturbineGoodness_PG()  {
+    public void windturbineGoodness_PG() {
 
 
         XxlJobHelper.log("功率一致性系数和拟合优度统计调度程序执行开始!........");
@@ -537,7 +942,7 @@ public class SaticSchedulePgTask {
 
 
     @XxlJob("wtAlysisDay_PG")
-    public void wtAlysisDay_PG()  {
+    public void wtAlysisDay_PG() {
 
 
         XxlJobHelper.log("分析数据统计调度程序执行开始!........");
@@ -554,7 +959,7 @@ public class SaticSchedulePgTask {
      * 每天2点执行一次
      */
     @XxlJob("wtwindDayInfo_PG")
-    public void wtwindDayInfo_PG()  {
+    public void wtwindDayInfo_PG() {
 
 
         XxlJobHelper.log("设备风资源统计调度程序执行开始!........");
@@ -571,7 +976,7 @@ public class SaticSchedulePgTask {
      * 每天2点执行一次
      */
     @XxlJob("wpwindDayInfo_PG")
-    public void wpwindDayInfo_PG()  {
+    public void wpwindDayInfo_PG() {
 
 
         XxlJobHelper.log("场站风资源统计调度程序执行开始!........");
@@ -589,13 +994,13 @@ public class SaticSchedulePgTask {
      */
 
     @XxlJob("calWindDeviation_PG")
-    public void calWindDeviation_PG()  {
+    public void calWindDeviation_PG() {
 
 
         XxlJobHelper.log("对风偏差率调度程序执行开始!........");
         String yesterdayStr = DateUtils.getYesterdayStr("yyyy-MM-dd");
         try {
-            windDeviationService.save(yesterdayStr,yesterdayStr);
+            windDeviationService.save(yesterdayStr, yesterdayStr);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -1040,12 +1445,12 @@ public class SaticSchedulePgTask {
 //        XxlJobHelper.log("屯留吾元光伏电站停机记录调度任务处理完成!........");
 //    }
 
-     /**
+    /**
      * 短期功率预测精度计算
      * 每两秒执行一次
      */
     @XxlJob("shorttermpowerpredictionaccuracycalculator")
-    public void shorttermpowerpredictionaccuracycalculator()  {
+    public void shorttermpowerpredictionaccuracycalculator() {
 
         XxlJobHelper.log("短期功率预测精度计算调度程序执行开始!........");
 
@@ -1053,9 +1458,14 @@ public class SaticSchedulePgTask {
 
 
             // 输入数据
-            double[] predictedPower ={}; { /* 96个点的预测功率值 */ };
-            double[] actualPower ={}; { /* 96个点的实际功率值 */ };
-            double installedCapacity=0 ; /* 装机容量 */;
+            double[] predictedPower = {};
+            { /* 96个点的预测功率值 */ }
+            ;
+            double[] actualPower = {};
+            { /* 96个点的实际功率值 */ }
+            ;
+            double installedCapacity = 0; /* 装机容量 */
+            ;
 
             // 计算准确率
             double accuracy = shortTermPowerPredictionAccuracyCalculator.calculateAccuracy(predictedPower, actualPower, installedCapacity);
@@ -1111,9 +1521,12 @@ public class SaticSchedulePgTask {
         try {
 
             // 输入数据
-            double actualGeneration =0; /* 当日新能源场站非限电时段实际发电量 */;
-            double availablePower =0; /* 当日新能源场站非限电时段可用电量 */;
-            double installedCapacity = 0;/* 全场装机容量 */;
+            double actualGeneration = 0; /* 当日新能源场站非限电时段实际发电量 */
+            ;
+            double availablePower = 0; /* 当日新能源场站非限电时段可用电量 */
+            ;
+            double installedCapacity = 0;/* 全场装机容量 */
+            ;
 
             // 计算日准确率
             double accuracy = AvailablePowerAccuracyCalculator.calculateAccuracy(actualGeneration, availablePower);
@@ -1128,7 +1541,6 @@ public class SaticSchedulePgTask {
             System.out.println("考核分数: " + score + "分/万千瓦");
 
 
-
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -1136,12 +1548,12 @@ public class SaticSchedulePgTask {
     }
 
     @XxlJob("PredictedPowerccuracy")
-    public void Powerccuracy()  {
+    public void Powerccuracy() {
 
 
         XxlJobHelper.log("预测功率准确率计算执行开始!........");
         try {
-                    powerService.predictedPower();
+            powerService.predictedPower();
         } catch (Exception e) {
             e.printStackTrace();
         }

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

@@ -163,6 +163,16 @@ 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))
 		{
@@ -173,7 +183,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日发电量
 				pewp.setRfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+				rfdl=pewp.getRfdl();
 			}
 		}
 		if(pointmap.containsKey(ContantXk.RKYDL))
@@ -210,7 +220,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日故障损失电量
 				pewp.setRgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+				rgzssdl=pewp.getRgzssdl();
 			}
 		}
 		if(pointmap.containsKey(ContantXk.RCNSLGZSSDL))
@@ -221,7 +231,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日场内受累故障损失电量
 				pewp.setRcnslgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+				rcnslgzssdl=pewp.getRcnslgzssdl();
 			}
 		}
 
@@ -233,7 +243,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日检修损失电量
 				pewp.setRjxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+				rjxssdl=pewp.getRjxssdl();
 			}
 		}
 
@@ -245,7 +255,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日场内受累检修损失电量
 				pewp.setRcnsljxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+				rcnsljxssdl=pewp.getRcnsljxssdl();
 			}
 		}
 
@@ -256,8 +266,8 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			if(StringUtils.notEmp(pointValue))
 			{
 				//日待机损失电量
-				pewp.setRdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+//				pewp.setRdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				pewp.setRdjssdl(0.0);
 			}
 		}
 		if(pointmap.containsKey(ContantXk.RQXJCLSSDL))
@@ -267,8 +277,8 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			if(StringUtils.notEmp(pointValue))
 			{
 				//日缺陷降出力损失电量
-				pewp.setRqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+//				pewp.setRqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				pewp.setRqxjclssdl(0.0);
 			}
 		}
 		if(pointmap.containsKey(ContantXk.RSDTJSSDL))
@@ -278,7 +288,8 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			if(StringUtils.notEmp(pointValue))
 			{
 				//日手动停机损失电量
-				pewp.setRsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+//				pewp.setRsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				pewp.setRsdtjssdl(0.0);
 
 			}
 		}
@@ -289,8 +300,8 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			if(StringUtils.notEmp(pointValue))
 			{
 				//日性能损失电量
-				pewp.setRxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+//				pewp.setRxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				pewp.setRxnssdl(0.0);
 			}
 		}
 
@@ -302,7 +313,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日限电停机损失电量
 				pewp.setRxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+				rxdtjssdl=pewp.getRxdtjssdl();
 			}
 		}
 
@@ -315,7 +326,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日限电降出力损失电量
 				pewp.setRxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+				rxdjclssdl=pewp.getRxdjclssdl();
 			}
 		}
 
@@ -327,7 +338,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日场外受累电网损失电量
 				pewp.setRcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+				rcwsldwssdl=pewp.getRcwsldwssdl();
 			}
 		}
 		if(pointmap.containsKey(ContantXk.RCWSLTQSSDL))
@@ -338,7 +349,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//日场外受累天气损失电量
 				pewp.setRcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+				rcwsltqssdl=pewp.getRcwsltqssdl();
 			}
 		}
 
@@ -377,6 +388,9 @@ 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));
+
 //*******************************************日信息统计*********************************************************/
 
 //*******************************************月信息统计*********************************************************/
@@ -424,7 +438,15 @@ 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))
 		{
@@ -435,6 +457,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月发电量
 				pewp.setYfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				yfdl=pewp.getYfdl();
 
 			}
 		}
@@ -472,6 +495,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月故障损失电量
 				pewp.setYgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				ygzssdl=pewp.getYgzssdl();
 
 			}
 		}
@@ -483,6 +507,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月场内受累故障损失电量
 				pewp.setYcnslgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				ycnslgzssdl=pewp.getYcnslgzssdl();
 
 			}
 		}
@@ -495,6 +520,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月检修损失电量
 				pewp.setYjxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				yjxssdl=pewp.getYjxssdl();
 
 			}
 		}
@@ -507,6 +533,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月场内受累检修损失电量
 				pewp.setYcnsljxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				ycnsljxssdl=pewp.getYcnsljxssdl();
 
 			}
 		}
@@ -518,7 +545,8 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			if(StringUtils.notEmp(pointValue))
 			{
 				//月待机损失电量
-				pewp.setYdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+//				pewp.setYdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				pewp.setYdjssdl(0.0);
 
 			}
 		}
@@ -529,7 +557,8 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			if(StringUtils.notEmp(pointValue))
 			{
 				//月缺陷降出力损失电量
-				pewp.setYqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+//				pewp.setYqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				pewp.setYqxjclssdl(0.0);
 
 			}
 		}
@@ -540,7 +569,8 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			if(StringUtils.notEmp(pointValue))
 			{
 				//月手动停机损失电量
-				pewp.setYsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+//				pewp.setYsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				pewp.setYsdtjssdl(0.0);
 
 			}
 		}
@@ -551,7 +581,8 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			if(StringUtils.notEmp(pointValue))
 			{
 				//月性能损失电量
-				pewp.setYxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+//				pewp.setYxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				pewp.setYxnssdl(0.0);
 
 			}
 		}
@@ -564,6 +595,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月限电停机损失电量
 				pewp.setYxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				yxdtjssdl=pewp.getYxdtjssdl();
 
 			}
 		}
@@ -577,6 +609,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月限电降出力损失电量
 				pewp.setYxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				yxdjclssdl=pewp.getYxdjclssdl();
 
 			}
 		}
@@ -589,6 +622,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月场外受累电网损失电量
 				pewp.setYcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				ycwsldwssdl=pewp.getYcwsldwssdl();
 
 			}
 		}
@@ -600,7 +634,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//月场外受累天气损失电量
 				pewp.setYcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+				ycwsltqssdl=pewp.getYcwsltqssdl();
 			}
 		}
 
@@ -639,7 +673,8 @@ 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));
 //*******************************************月信息统计*********************************************************/
 
 //*******************************************年信息统计*********************************************************/
@@ -683,7 +718,15 @@ 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);
@@ -693,6 +736,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年发电量
 				pewp.setNfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				nfdl=pewp.getNfdl();
 
 			}
 		}
@@ -730,6 +774,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年故障损失电量
 				pewp.setNgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				ngzssdl=pewp.getNgzssdl();
 
 			}
 		}
@@ -741,6 +786,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年场内受累故障损失电量
 				pewp.setNcnslgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				ncnslgzssdl=pewp.getNcnslgzssdl();
 
 			}
 		}
@@ -753,6 +799,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年检修损失电量
 				pewp.setNjxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				njxssdl=pewp.getNjxssdl();
 
 			}
 		}
@@ -765,6 +812,8 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年场内受累检修损失电量
 				pewp.setNcnsljxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				ncnsljxssdl=pewp.getNcnsljxssdl();
+
 
 			}
 		}
@@ -776,7 +825,8 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			if(StringUtils.notEmp(pointValue))
 			{
 				//年待机损失电量
-				pewp.setNdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+//				pewp.setNdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				pewp.setNdjssdl(0.0);
 
 			}
 		}
@@ -787,7 +837,8 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			if(StringUtils.notEmp(pointValue))
 			{
 				//年缺陷降出力损失电量
-				pewp.setNqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+//				pewp.setNqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				pewp.setNqxjclssdl(0.0);
 
 			}
 		}
@@ -798,7 +849,8 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			if(StringUtils.notEmp(pointValue))
 			{
 				//年手动停机损失电量
-				pewp.setNsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+//				pewp.setNsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				pewp.setNsdtjssdl(0.0);
 
 			}
 		}
@@ -809,7 +861,8 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			if(StringUtils.notEmp(pointValue))
 			{
 				//年性能损失电量
-				pewp.setNxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+//				pewp.setNxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				pewp.setNxnssdl(0.0);
 
 			}
 		}
@@ -822,6 +875,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年限电停机损失电量
 				pewp.setNxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				nxdtjssdl=pewp.getNxdtjssdl();
 
 			}
 		}
@@ -835,6 +889,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年限电降出力损失电量
 				pewp.setNxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				nxdjclssdl=pewp.getNxdjclssdl();
 
 			}
 		}
@@ -847,6 +902,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年场外受累电网损失电量
 				pewp.setNcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
+				ncwsldwssdl=pewp.getNcwsldwssdl();
 
 			}
 		}
@@ -858,7 +914,7 @@ public class EquipmentInfo1ThreadPool implements Callable<String>, Serializable
 			{
 				//年场外受累天气损失电量
 				pewp.setNcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
-
+				ncwsltqssdl=pewp.getNcwsltqssdl();
 			}
 		}
 
@@ -896,6 +952,9 @@ 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) {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 8 - 8
realtime/generationXK-service/src/main/resources/application-jn.yml


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

@@ -56,7 +56,7 @@ public class GenerationTest {
 //        realtimeService.savaRealtimeTarget();
 //        cycleCalculationService.saveCyle();
 //        statusService.powerRationing();
-        statusService.statusReal();
+        statusService.startStatusReal();
 //        statusService.calculateStatusNumber();
 //        regionCalService.companyCal();
 //        regionCalService.RegionCal();

+ 55 - 19
realtime/generationXK-service/src/test/java/com/gyee/generation/HealthTest.java

@@ -2,7 +2,7 @@ package com.gyee.generation;
 
 import com.gyee.generation.service.InitialRedisService;
 import com.gyee.generation.service.InputOrOutPutService;
-import com.gyee.generation.service.initalcache.CacheService;
+import com.gyee.generation.service.WindturbineGoodnessService;
 import com.gyee.generation.util.SpringUtils;
 import org.springframework.boot.SpringApplication;
 
@@ -22,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("完成!。。。。。。");
 //
 //
 //
@@ -121,13 +121,13 @@ public class HealthTest {
 //        System.out.println("曲线拟合调度程序执行开始!。。。。。。");
 //        PowerCurveFittingByTimeService powerCurveFittingByTimeService= SpringUtils.getBean("powerCurveFittingByTimeService");
 //
-////        XxlJobHelper.log("日序执行开始!........");
-////        powerCurveFittingByTimeService.cureFittingDay(c.getTime());
-////        XxlJobHelper.log("日处理完成!........");
+//        XxlJobHelper.log("日序执行开始!........");
+//        powerCurveFittingByTimeService.cureFittingDay(c.getTime(),"SXJ_KGDL_YLZ_FDC_STA");
+//        XxlJobHelper.log("日处理完成!........");
 ////
-//        XxlJobHelper.log("月序执行开始!........");
-//        powerCurveFittingByTimeService.cureFittingMonth(c.getTime(),"1");
-//        XxlJobHelper.log("月处理完成!........");
+////        XxlJobHelper.log("月序执行开始!........");
+////        powerCurveFittingByTimeService.cureFittingMonth(c.getTime(),"1");
+////        XxlJobHelper.log("月处理完成!........");
 ////
 ////        XxlJobHelper.log("年序执行开始!........");
 ////        powerCurveFittingByTimeService.cureFittingYear(c.getTime());
@@ -189,11 +189,19 @@ public class HealthTest {
 //
 //
 //
-//        c.set(Calendar.DAY_OF_MONTH,9);
-//        for(int i=0;i<6;i++)
+
+//        c.set(Calendar.DAY_OF_MONTH,1);
+//
+//        c.setTime(DateUtils.truncate(c.getTime()));
+//
+//        begin=new Date();
+//        System.out.println("设备指标记录调度程序执行开始!。。。。。。");
+//        for(int i=0;i<20;i++)
 //        {
-//            begin=new Date();
-//            System.out.println("设备指标记录调度程序执行开始!。。。。。。");
+//
+//
+//
+//            System.out.println(DateUtils.format(c.getTime(),"yyyy-MM-dd HH:mm:ss").toString());
 //            EquipmentInfo1Service equipmentInfo1Service= SpringUtils.getBean("equipmentInfo1Service");
 //            EquipmentInfo2Service equipmentInfo2Service= SpringUtils.getBean("equipmentInfo2Service");
 //            EquipmentInfo3Service equipmentInfo3Service= SpringUtils.getBean("equipmentInfo3Service");
@@ -216,10 +224,11 @@ public class HealthTest {
 //            equipmentInfoDayTopService.calEquipmentInfoYearTop(c.getTime());
 //
 //            wtAlysisDayService.calEquipmentInfoDay(c.getTime());
-//            c.add(Calendar.DAY_OF_MONTH,1);
-//        }
 //
+//            c.add(Calendar.DAY_OF_MONTH,1);
 //
+//            System.out.println("完成一次!。。。。。。");
+//        }
 //
 //        end=new Date();
 //        System.out.println("执行用时"+ DateUtils.secondsDiff(begin,end) +"秒");
@@ -228,14 +237,41 @@ public class HealthTest {
 //
 //
 //
+//       c.set(Calendar.DAY_OF_MONTH,19);
+//
+//        c.setTime(DateUtils.truncate(c.getTime()));
+//
 //        begin=new Date();
 //        System.out.println("功率一致性系数和拟合优度调度程序执行开始!。。。。。。");
-//        WindturbineGoodnessService windturbineGoodnessService= SpringUtils.getBean("windturbineGoodnessService");
+//        for(int i=0;i<3;i++)
+//        {
+//
+//
+//
+//            System.out.println(DateUtils.format(c.getTime(),"yyyy-MM-dd HH:mm:ss").toString());
+//            WindturbineGoodnessService windturbineGoodnessService= SpringUtils.getBean("windturbineGoodnessService");
+//
+//            windturbineGoodnessService.calWindturbineGoodness(c.getTime());
+//
+//
+//            c.add(Calendar.DAY_OF_MONTH,1);
+//
+//           System.out.println("完成一次!。。。 。。。");
+//        }
+//
 //
-//        windturbineGoodnessService.calWindturbineGoodness(c.getTime());
 //        end=new Date();
 //        System.out.println("执行用时"+ DateUtils.secondsDiff(begin,end) +"秒");
 //        System.out.println("功率一致性系数和拟合优度调度程序执行结束!。。。。。。");
+
+        begin=new Date();
+        System.out.println("功率一致性系数和拟合优度调度程序执行开始!。。。。。。");
+        WindturbineGoodnessService windturbineGoodnessService= SpringUtils.getBean("windturbineGoodnessService");
+
+        windturbineGoodnessService.calWindturbineGoodness(c.getTime());
+        end=new Date();
+        System.out.println("执行用时"+ com.gyee.generation.util.DateUtils.secondsDiff(begin,end) +"秒");
+        System.out.println("功率一致性系数和拟合优度调度程序执行结束!。。。。。。");
 //
 //        c.add(Calendar.DAY_OF_MONTH,-1);
 //        begin=new Date();

+ 8 - 6
realtime/generationXK-service/src/test/java/com/gyee/generation/RealTest.java

@@ -1,10 +1,7 @@
 package com.gyee.generation;
 
 import com.gyee.common.util.DateUtils;
-import com.gyee.generation.service.realtimelibrary.CalculationService;
-import com.gyee.generation.service.realtimelibrary.CycleCalculationService;
-import com.gyee.generation.service.realtimelibrary.RealtimeService;
-import com.gyee.generation.service.realtimelibrary.StatusService;
+import com.gyee.generation.service.realtimelibrary.*;
 import com.gyee.generation.util.SpringUtils;
 import org.springframework.boot.SpringApplication;
 
@@ -22,6 +19,8 @@ public class RealTest {
         CalculationService calculationService= SpringUtils.getBean("calculationService");
         RealtimeService realtimeService= SpringUtils.getBean("realtimeService");
 
+        RegionCalreService regionCalreService= SpringUtils.getBean("regionCalreService");
+
 //        inputOrOutPutService.initialInputOrOutputSpeed();
         Calendar c = Calendar.getInstance();
         Date begin=null;
@@ -34,14 +33,17 @@ public class RealTest {
         System.out.println("状态判定调度程序执行开始!。。。。。。");
 
 //        statusService.middleStatusReal();
-//        statusService.statusReal();
+        statusService.startStatusReal();
 
-        cycleCalculationService.saveCyle();
+//        cycleCalculationService.saveCyle();
 
 //        realtimeService.savaRealtimeTarget();
 //        cycleCalculationService.saveCyle();
 //
 //        realtimeService.savaRealtimeTarget();
+
+//        regionCalreService.aqts();
+
         end=new Date();
         System.out.println("执行用时"+ DateUtils.secondsDiff(begin,end) +"秒");
         System.out.println("状态判定调度程序执行结束!。。。。。。");