Explorar o código

计算服务算法优化调整

shilin hai 1 ano
pai
achega
78880a8773
Modificáronse 22 ficheiros con 652 adicións e 358 borrados
  1. 81 27
      realtime/generationXK-service/src/main/java/com/gyee/generation/GenerationMain.java
  2. 3 3
      realtime/generationXK-service/src/main/java/com/gyee/generation/config/ThreadPoolTaskConfig.java
  3. 89 89
      realtime/generationXK-service/src/main/java/com/gyee/generation/config/XxlJobConfig.java
  4. 8 5
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo1Service.java
  5. 6 4
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo2Service.java
  6. 6 5
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo3Service.java
  7. 6 3
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo4Service.java
  8. 2 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo5Service.java
  9. 1 1
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WtAlysisDayService.java
  10. 155 157
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/initalcache/CacheService.java
  11. 2 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/initialpoint/IinitialPoint.java
  12. 4 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/initialpoint/InitialPointGoldenXkByEqEdosService.java
  13. 225 3
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/initialpoint/InitialPointGoldenXkByEqService.java
  14. 4 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/initialpoint/InitialPointGoldenXkService.java
  15. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/SafetyDayService.java
  16. 3 3
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/StatusService.java
  17. 40 40
      realtime/generationXK-service/src/main/java/com/gyee/generation/task/SaticSchedulePgTask.java
  18. 1 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/task/thread/EconWtAlysisDayThread.java
  19. 2 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/task/thread/EquipmentInfo3Thread.java
  20. 8 11
      realtime/generationXK-service/src/main/java/com/gyee/generation/task/thread/EquipmentInfo3ThreadPool.java
  21. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/util/ExcelExport.java
  22. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/util/realtimesource/EdosUtil.java

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

@@ -32,45 +32,53 @@ public class GenerationMain {
 //            logger.info(df.format(c.getTime()).toString());
 //
 //
-//
-//
-//            EquipmentInfo1Service equipmentInfo1Service= SpringUtils.getBean("equipmentInfo1Service");
-//            EquipmentInfo2Service equipmentInfo2Service= SpringUtils.getBean("equipmentInfo2Service");
-//            EquipmentInfo3Service equipmentInfo3Service= SpringUtils.getBean("equipmentInfo3Service");
-//
-//
+//            EquipmentInfo1Service equipmentInfo1Service = SpringUtils.getBean("equipmentInfo1Service");
+//            EquipmentInfo2Service equipmentInfo2Service = SpringUtils.getBean("equipmentInfo2Service");
+//            EquipmentInfo3Service equipmentInfo3Service = SpringUtils.getBean("equipmentInfo3Service");
 //
 //
 //            equipmentInfo1Service.calEquipmentInfoDay(begin);
+//            logger.info("equipmentInfo1Service完成一次!。。。。。。");
+//            TimeUnit.SECONDS.sleep(3);
 //            equipmentInfo2Service.calEquipmentInfoDay(begin);
+//            logger.info("equipmentInfo2Service完成一次!。。。。。。");
+//            TimeUnit.SECONDS.sleep(3);
 //            equipmentInfo3Service.calEquipmentInfoDay(begin);
-//
-//            EquipmentInfo5Service equipmentInfo5Service= SpringUtils.getBean("equipmentInfo5Service");
-//            EquipmentInfo4Service equipmentInfo4Service= SpringUtils.getBean("equipmentInfo4Service");
-//
+//            logger.info("equipmentInfo3Service完成一次!。。。。。。");
+//            TimeUnit.SECONDS.sleep(3);
+//            logger.info("equipmentInfo5Service开始!。。。。。。");
+//            EquipmentInfo5Service equipmentInfo5Service = SpringUtils.getBean("equipmentInfo5Service");
+//            TimeUnit.SECONDS.sleep(3);
+//            EquipmentInfo4Service equipmentInfo4Service = SpringUtils.getBean("equipmentInfo4Service");
+//            TimeUnit.SECONDS.sleep(3);
 //            equipmentInfo5Service.calEquipmentInfoDay(begin);
+//            logger.info("equipmentInfo5Service完成一次!。。。。。。");
+//            logger.info("equipmentInfo4Service开始!。。。。。。");
 //            equipmentInfo4Service.calEquipmentInfoDay(begin);
+//            logger.info("equipmentInfo4Service完成一次!。。。。。。");
 //
+//            WtAlysisDayService wtAlysisDayService = SpringUtils.getBean("wtAlysisDayService");
 //
-//            WtAlysisDayService wtAlysisDayService= SpringUtils.getBean("wtAlysisDayService");
-//
-//            EquipmentInfoDayTopService equipmentInfoDayTopService= SpringUtils.getBean("equipmentInfoDayTopService");
+//            EquipmentInfoDayTopService equipmentInfoDayTopService = SpringUtils.getBean("equipmentInfoDayTopService");
 //            equipmentInfoDayTopService.calEquipmentInfoDayTop(begin);
 //            equipmentInfoDayTopService.calEquipmentInfoMonthTop(begin);
 //            equipmentInfoDayTopService.calEquipmentInfoYearTop(begin);
 //
-//            wtAlysisDayService.calEquipmentInfoDay(new Date());
-//
+//            TimeUnit.SECONDS.sleep(3);
+//            logger.info("wtAlysisyService开始!。。。。。。");
+//            wtAlysisDayService.calEquipmentInfoDay(begin);
+//            logger.info("wtAlysisyService完成!。。。。。。");
 //            end = new Date();
 //            logger.info(df.format(end).toString());
 //            logger.info("完成一次!。。。。。。");
 //            logger.info("执行用时" + com.gyee.generation.util.DateUtils.secondsDiff(begin, end) + "秒");
-//            Thread.sleep(3000);
+//
+//            TimeUnit.MINUTES.sleep(15);
 //        }
 //
 //        /*************************风机历史计算服务**************************/
-
-
+//
+//
 //        /*************************逆变器历史计算服务**************************/
 //        Calendar c = Calendar.getInstance();
 //        Logger logger = LoggerFactory.getLogger(GenerationMain.class);
@@ -83,25 +91,24 @@ public class GenerationMain {
 //            logger.info(df.format(c.getTime()).toString());
 //
 //
-//
-//
-//            EquipmentInfo1Service equipmentInfo1Service= SpringUtils.getBean("equipmentInfo1Service");
-//            EquipmentInfo2Service equipmentInfo2Service= SpringUtils.getBean("equipmentInfo2Service");
-//            EquipmentInfo3Service equipmentInfo3Service= SpringUtils.getBean("equipmentInfo3Service");
-//
-//
+//            EquipmentInfo1Service equipmentInfo1Service = SpringUtils.getBean("equipmentInfo1Service");
+//            EquipmentInfo2Service equipmentInfo2Service = SpringUtils.getBean("equipmentInfo2Service");
+//            EquipmentInfo3Service equipmentInfo3Service = SpringUtils.getBean("equipmentInfo3Service");
 //
 //
 //            equipmentInfo1Service.calEquipmentInfoDay(begin);
+//            TimeUnit.SECONDS.sleep(30);
 //            equipmentInfo2Service.calEquipmentInfoDay(begin);
+//            TimeUnit.SECONDS.sleep(30);
 //            equipmentInfo3Service.calEquipmentInfoDay(begin);
+//            TimeUnit.SECONDS.sleep(30);
 //
 //
 //            end = new Date();
 //            logger.info(df.format(end).toString());
 //            logger.info("完成一次!。。。。。。");
 //            logger.info("执行用时" + com.gyee.generation.util.DateUtils.secondsDiff(begin, end) + "秒");
-//            Thread.sleep(3000);
+//            TimeUnit.MINUTES.sleep(15);
 //        }
 //
 //        /*************************逆变器历史计算服务**************************/
@@ -134,5 +141,52 @@ public class GenerationMain {
 //        }
 //
 //        /*************************状态实时状态计算服务**************************/
+//
+//        /*************************健康管理测点导出**************************/
+//        Calendar c = Calendar.getInstance();
+//
+//
+//        Date begin = new Date();
+//        Date end = null;
+//        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+//        System.out.println(df.format(c.getTime()).toString());
+//
+//
+//        InitialPointGoldenXkByEqService initialPointGoldenXkByEqService = SpringUtils.getBean("initialPointGoldenXkByEqService");
+//
+//        initialPointGoldenXkByEqService.initalJkfc();
+//        initialPointGoldenXkByEqService.initalJkfj();
+//
+//
+//        end = new Date();
+//        System.out.println(df.format(end).toString());
+//        System.out.println("完成一次!。。。。。。");
+//        System.out.println("执行用时" + com.gyee.generation.util.DateUtils.secondsDiff(begin, end) + "秒");
+//
+//
+//        /*************************健康管理测点导出**************************/
+//
+//
+// /*************************redis缓存**************************/
+//        Calendar c = Calendar.getInstance();
+//
+//
+//        Date begin = new Date();
+//        Date end = null;
+//        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+//        System.out.println(df.format(c.getTime()).toString());
+//
+//
+//        CacheService cacheService= SpringUtils.getBean("cacheService");
+//        cacheService.initRedisCache();
+//
+//        end = new Date();
+//        System.out.println(df.format(end).toString());
+//        System.out.println("完成一次!。。。。。。");
+//        System.out.println("执行用时" + com.gyee.generation.util.DateUtils.secondsDiff(begin, end) + "秒");
+//
+//
+//        /*************************redis缓存**************************/
+////
     }
 }

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

@@ -14,15 +14,15 @@ public class ThreadPoolTaskConfig {
      */
 
     /** 核心线程数(默认线程数) */
-    private static final int corePoolSize =240;
+    private static final int corePoolSize =120;
     /** 最大线程数 */
     private static final int maxPoolSize = 360;
     /** 允许线程空闲时间(单位:默认为秒) */
-    private static final int keepAliveTime = 3;
+    private static final int keepAliveTime = 30;
     /** 缓冲队列大小 */
     private static final int queueCapacity = 360;
     /** 允许等待最长时间 */
-    private static final int awaitTime = 3600;
+    private static final int awaitTime = 60;
     /** 线程池名前缀 */
     private static final String threadNamePrefix = "GYEE-Thread-";
 

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

@@ -1,91 +1,91 @@
-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-executor5.properties")
-//@PropertySource("classpath:xxl-job-executorWPLY.properties")
-//@PropertySource("classpath:xxl-job-executorRG.properties")
-//@PropertySource("classpath:xxl-job-executorJN.properties")
+//package com.gyee.generation.config;
 //
-//@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-executorGF000.properties")
-//@PropertySource("classpath:xxl-job-executorGF001.properties")
-//@PropertySource("classpath:xxl-job-executorGF002.properties")
-//@PropertySource("classpath:xxl-job-executorGF003.properties")
+//
+//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-executor5.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-executorGF000.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-executorGF007.properties")
-//@PropertySource("classpath:xxl-job-executorGF008.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-executorGF005.properties")
+////@PropertySource("classpath:xxl-job-executorGF006.properties")
+////@PropertySource("classpath:xxl-job-executorGF007.properties")
+////@PropertySource("classpath:xxl-job-executorGF008.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();
+//     */
+//
+//
+//}

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

@@ -18,6 +18,8 @@ import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.Executor;
 import java.util.stream.Collectors;
@@ -43,7 +45,8 @@ public class EquipmentInfo1Service {
         Calendar c=Calendar.getInstance();
         c.setTime(recordDate);
 
-        if(c.get(Calendar.HOUR_OF_DAY)==0 && c.get(Calendar.MINUTE)==0)
+        if(c.get(Calendar.HOUR_OF_DAY)==0 )
+//      if(c.get(Calendar.HOUR_OF_DAY)==0 && c.get(Calendar.MINUTE)==0)
         {
             c.add(Calendar.DAY_OF_MONTH,-1);
         }
@@ -56,7 +59,7 @@ public class EquipmentInfo1Service {
         Date begin= DateUtils.truncate(c.getTime());
 
 
-        Map<String,ProEconEquipmentInfoDay1> pep1map=new HashMap<>();
+        Map<String,ProEconEquipmentInfoDay1> pep1map=new ConcurrentHashMap<>();
         Calendar cl=Calendar.getInstance();
         cl.setTime(DateUtils.truncate(recordDate));
         cl.add(Calendar.DAY_OF_MONTH,-1);
@@ -71,7 +74,7 @@ public class EquipmentInfo1Service {
                 pep1map.put(pep.getWindturbineId(),pep);
             }
         }
-        List<ProEconEquipmentInfoDay1> dayls=new ArrayList<>();
+        List<ProEconEquipmentInfoDay1> dayls=new CopyOnWriteArrayList<>();
 //        final CountDownLatch latch = new CountDownLatch(CacheContext.wtls.size());
 //
         List<String> wpls=new ArrayList<>();
@@ -127,6 +130,7 @@ public class EquipmentInfo1Service {
         }
 
         if (!wttemps.isEmpty()) {
+
             final CountDownLatch latch = new CountDownLatch(wttemps.size());
             for (ProBasicEquipment wt1 : wttemps) {
                 new Thread(new EquipmentInfo1Thread(executor, wt1, pep1map,
@@ -134,10 +138,9 @@ public class EquipmentInfo1Service {
                         edosUtil, latch)).start();
             }
             latch.await();
-            Thread.sleep(12);
         }
 
-
+        System.out.println("ok");
         c=Calendar.getInstance();
         c.setTime(recordDate);
 

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

@@ -18,6 +18,8 @@ import javax.annotation.Resource;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.Executor;
 import java.util.stream.Collectors;
@@ -41,7 +43,8 @@ public class EquipmentInfo2Service {
     public void calEquipmentInfoDay(Date recordDate) throws Exception {
         Calendar c = Calendar.getInstance();
         c.setTime(recordDate);
-        if(c.get(Calendar.HOUR_OF_DAY)==0 && c.get(Calendar.MINUTE)==0){
+        if(c.get(Calendar.HOUR_OF_DAY)==0 ){
+//      if(c.get(Calendar.HOUR_OF_DAY)==0 && c.get(Calendar.MINUTE)==0)
             c.add(Calendar.DAY_OF_MONTH, -1);
         }
 
@@ -75,7 +78,7 @@ public class EquipmentInfo2Service {
 //            proEconEquipmentInfoDay2Service.removeByIds(tempids);
 //        }
 
-        Map<String, ProEconEquipmentInfoDay2> pep2map = new HashMap<>();
+        Map<String, ProEconEquipmentInfoDay2> pep2map = new ConcurrentHashMap<>();
         Calendar cl = Calendar.getInstance();
         cl.setTime(recordDate);
 //
@@ -93,7 +96,7 @@ public class EquipmentInfo2Service {
         }
 
         List<String> wpls = new ArrayList<>();
-        List<ProEconEquipmentInfoDay2> dayls = new ArrayList<>();
+        List<ProEconEquipmentInfoDay2> dayls = new CopyOnWriteArrayList<>();
 //        final CountDownLatch latch = new CountDownLatch(CacheContext.wtls.size());
 //        for(ProBasicEquipment wt:CacheContext.wtls)
 //        {
@@ -156,7 +159,6 @@ public class EquipmentInfo2Service {
                         edosUtil, latch)).start();
             }
             latch.await();
-            Thread.sleep(12);
         }
 
         c = Calendar.getInstance();

+ 6 - 5
realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo3Service.java

@@ -16,6 +16,8 @@ import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.Executor;
 import java.util.stream.Collectors;
@@ -40,8 +42,8 @@ public class EquipmentInfo3Service {
     public void calEquipmentInfoDay(Date recordDate) throws Exception {
         Calendar c=Calendar.getInstance();
         c.setTime(recordDate);
-        if(c.get(Calendar.HOUR_OF_DAY)==0 && c.get(Calendar.MINUTE)==0)
-        {
+        if(c.get(Calendar.HOUR_OF_DAY)==0 ){
+//      if(c.get(Calendar.HOUR_OF_DAY)==0 && c.get(Calendar.MINUTE)==0)
             c.add(Calendar.DAY_OF_MONTH,-1);
         }
 
@@ -83,7 +85,7 @@ public class EquipmentInfo3Service {
 //            proEconEquipmentInfoDay3Service.removeByIds(tempids);
 //        }
 
-        Map<String,ProEconEquipmentInfoDay3> pep3map=new HashMap<>();
+        Map<String,ProEconEquipmentInfoDay3> pep3map=new ConcurrentHashMap<>();
         Calendar cl=Calendar.getInstance();
         cl.setTime(recordDate);
 
@@ -104,7 +106,7 @@ public class EquipmentInfo3Service {
         }
 
         List<String> wpls=new ArrayList<>();
-            List<ProEconEquipmentInfoDay3> dayls=new ArrayList<>();
+            List<ProEconEquipmentInfoDay3> dayls=new CopyOnWriteArrayList<>();
 //        final CountDownLatch latch = new CountDownLatch(+CacheContext.wtls.size());
 //        for(ProBasicEquipment wt:CacheContext.wtls)
 //        {
@@ -168,7 +170,6 @@ public class EquipmentInfo3Service {
                         edosUtil, latch)).start();
             }
             latch.await();
-            Thread.sleep(12);
         }
 
 

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

@@ -16,6 +16,8 @@ import javax.annotation.Resource;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.Executor;
 import java.util.stream.Collectors;
@@ -72,7 +74,8 @@ public class EquipmentInfo4Service {
     public void calEquipmentInfoDay(Date recordDate) throws Exception {
         Calendar c = Calendar.getInstance();
         c.setTime(recordDate);
-        if(c.get(Calendar.HOUR_OF_DAY)==0 && c.get(Calendar.MINUTE)==0){
+        if(c.get(Calendar.HOUR_OF_DAY)==0 ){
+//      if(c.get(Calendar.HOUR_OF_DAY)==0 && c.get(Calendar.MINUTE)==0)
             c.add(Calendar.DAY_OF_MONTH,-1);
         }
 
@@ -160,7 +163,7 @@ public class EquipmentInfo4Service {
         }
 
         //获取曲线风机切入风速
-        Map<String, ProEconInOrOutSpeedTotal> peioomap = new HashMap<>();
+        Map<String, ProEconInOrOutSpeedTotal> peioomap = new ConcurrentHashMap<>();
 
         QueryWrapper<ProEconInOrOutSpeedTotal> queryWrapper2 = new QueryWrapper<>();
         queryWrapper2.eq("record_date",lastDay);
@@ -197,7 +200,7 @@ public class EquipmentInfo4Service {
 //        Map<String, Map<String, Double>> glqxyizxMap = coefficientService.coefficient(begin);
 //        //拟合优度接口调用
 //        Map<String, Map<String, Double>> nhydMap = goodnessOfFitService.goodnessOfFit(begin);
-        List<ProEconEquipmentInfoDay4> dayls=new ArrayList<>();
+        List<ProEconEquipmentInfoDay4> dayls=new CopyOnWriteArrayList<>();
 
         List<String> wpls=new ArrayList<>();
 //        final CountDownLatch latch = new CountDownLatch(CacheContext.wt_fjls.size());

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

@@ -47,7 +47,8 @@ public class EquipmentInfo5Service {
 
         Calendar c = Calendar.getInstance();
         c.setTime(currentDate);
-        if(c.get(Calendar.HOUR_OF_DAY)==0 && c.get(Calendar.MINUTE)==0){
+        if(c.get(Calendar.HOUR_OF_DAY)==0 ){
+//      if(c.get(Calendar.HOUR_OF_DAY)==0 && c.get(Calendar.MINUTE)==0)
             c.add(Calendar.DAY_OF_MONTH,-1);
         }
 

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

@@ -170,6 +170,7 @@ public class WtAlysisDayService {
         }
 
         if (!wttemps.isEmpty()) {
+
             final CountDownLatch latch = new CountDownLatch(wttemps.size());
             for (ProBasicEquipment wt1 : wttemps) {
                 new Thread(new EconWtAlysisDayThread(executor,wt1,  eqday1map,
@@ -180,7 +181,6 @@ public class WtAlysisDayService {
                         edosUtil, c, proEconWtAlysisDayService,latch)).start();
             }
             latch.await();
-            Thread.sleep(120);
         }
 
         //判断是否有重复记录,

+ 155 - 157
realtime/generationXK-service/src/main/java/com/gyee/generation/service/initalcache/CacheService.java

@@ -4,8 +4,7 @@ package com.gyee.generation.service.initalcache;/*
 */
 
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.gyee.generation.model.auto.*;
+import com.gyee.generation.model.auto.ProBasicStatusPoint;
 import com.gyee.generation.service.auto.*;
 import com.gyee.generation.util.redis.RedisService;
 import lombok.extern.slf4j.Slf4j;
@@ -17,7 +16,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.stream.Collectors;
 
 @Service
 @Slf4j
@@ -60,97 +58,38 @@ public class CacheService {
 
     public void initRedisCache(){
         redisService.select(9);
-        log.info("--------------------------redisWT");
-//        List<ProBasicEquipment> windturbineList = windturbineService.list().stream().filter(i->(
-//                i.getWindpowerstationId().equals("SXJ_KGDL_XWT_FDC_STA")
-////                        ||
-////                i.getWindpowerstationId().equals("SXJ_KGDL_GJY_FDC_STA") ||
-////                        i.getWindpowerstationId().equals("SXJ_KGDL_NJL_FDC_STA") ||
-////                        i.getWindpowerstationId().equals("SXJ_KGDL_PDL_FDC_STA")  ||
-////                        i.getWindpowerstationId().equals("SXJ_KGDL_ZK_FDC_STA")
-//        ) &&  i.getIsable().equals(1)).collect(Collectors.toList());
-        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->{
+//        log.info("--------------------------redisWT");
+////        List<ProBasicEquipment> windturbineList = windturbineService.list().stream().filter(i->(
+////                i.getWindpowerstationId().equals("SXJ_KGDL_XWT_FDC_STA")
+//////                        ||
+//////                i.getWindpowerstationId().equals("SXJ_KGDL_GJY_FDC_STA") ||
+//////                        i.getWindpowerstationId().equals("SXJ_KGDL_NJL_FDC_STA") ||
+//////                        i.getWindpowerstationId().equals("SXJ_KGDL_PDL_FDC_STA")  ||
+//////                        i.getWindpowerstationId().equals("SXJ_KGDL_ZK_FDC_STA")
+////        ) &&  i.getIsable().equals(1)).collect(Collectors.toList());
+//        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("--------------------------redisWeatherWP");
-//        List<ProBasicWeatherStation> weatherStationList = proBasicWeatherStationService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
-//        weatherStationList.stream().forEach(i->{
+//        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());
@@ -162,99 +101,158 @@ public class CacheService {
 //            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->{
+//        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);
+//            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,s);
+//            redisService.set(i.getId(),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->{
+//
+//
+//        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);
+//            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,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");
+//            redisService.set(i.getId(),s);
 //        });
-//        groupList.stream().forEach(i->{
+//
+////        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);
+//            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,s);
+//            redisService.set(i.getId(),s);
 //        });
-//        redisService.select(9);
-//        log.info("--------------------------redis理论保证功率");
-//        Map<String, Map<Double, ProBasicModelPowerRd>> powerrdMap = new HashMap<>();
+////
+////        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));
 //
-//        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十三种状态");
+//        log.info("--------------------------redis十三种状态");
         Map<String, List<ProBasicStatusPoint>> sszztMap = new HashMap<>();
         List<ProBasicStatusPoint> windturbinestatusdis = proBasicStatusPointService.list();
         windturbinestatusdis.stream().forEach(w->{
@@ -267,7 +265,7 @@ public class CacheService {
             }
         });
         redisService.set("SSZZT", JSONObject.toJSONString(sszztMap));
-
-        log.info("--------------------------完成");
+//
+//        log.info("--------------------------完成");
     }
 }

+ 2 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/initialpoint/IinitialPoint.java

@@ -31,5 +31,7 @@ public interface IinitialPoint {
      */
     public void initalFgl() throws IOException;
 
+    public void initalJkfc() throws IOException ;
 
+    public void initalJkfj() throws IOException ;
 }

+ 4 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/initialpoint/InitialPointGoldenXkByEqEdosService.java

@@ -1216,6 +1216,10 @@ public class InitialPointGoldenXkByEqEdosService implements IinitialPoint {
 
     }
 
+    public void initalJkfc() throws IOException {}
+
+    public void initalJkfj() throws IOException {
+    }
 
 
 }

+ 225 - 3
realtime/generationXK-service/src/main/java/com/gyee/generation/service/initialpoint/InitialPointGoldenXkByEqService.java

@@ -897,9 +897,6 @@ public class InitialPointGoldenXkByEqService implements IinitialPoint {
         // windturbinetestingpointService.deleteAll();
 
 
-
-
-
         List<ProBasicEquipmentPoint> allpoints = new ArrayList<>();
 
         List<ProEconTestingPoint>  fdls=proEconTestingPointService.list().stream().filter(i->i.getTypeId().equals("fj") || i.getTypeId().equals(FJJSFW)).collect(Collectors.toList());
@@ -1074,5 +1071,230 @@ public class InitialPointGoldenXkByEqService implements IinitialPoint {
     }
 
 
+    public void initalJkfj() throws IOException {
+
+
+
+        List<ProBasicEquipmentPoint> allpoints = new ArrayList<>();
+
+
+
+        List<ProEconTestingPoint>  gfls=proEconTestingPointService.list().stream().filter(i->i.getTypeId().equals("jkfjc") ).collect(Collectors.toList());
+
+        for (ProBasicPowerstation wp : CacheContext.wpls) {
+
+            List<ProEconTestingPoint> ls=new ArrayList<>();
+            if(wp.getId().contains("GDC"))
+            {
+                ls=gfls;
+
+            }
+            List<ProBasicEquipment> wtls = CacheContext.wpwtmap.get(wp.getId());
+
+
+            if (!ls.isEmpty() ) {
+                for (ProBasicEquipment wt : wtls) {
+
+                    List<ProBasicEquipmentPoint> points = new ArrayList<>();
+                    for (int i = 0; i < ls.size(); i++) {
+
+
+
+                        ProEconTestingPoint stp = ls.get(i);
+//                        if(!stp.getTypeId().contains("jsfw") && !stp.getModel().equals(wt.getModelId()))
+//                        {
+//                            continue;
+//                        }
+                        StringBuilder sb = new StringBuilder();
+//                        sb.append(wp.getPhoto());
+
+                        String temp = wp.getId().substring(0, wp.getId().lastIndexOf("_"));
+                        temp = temp.substring(0, temp.lastIndexOf("_"));
+                        temp = temp.substring(temp.lastIndexOf("_")+1);
+                        if(wp.getId().contains("FDC"))
+                        {
+                            sb.append(wp.getCompanyId().substring(0,wp.getCompanyId().lastIndexOf("_"))).append("_").append(temp).append("_F_");
+                        }else
+                        {
+                            sb.append(wp.getCompanyId().substring(0,wp.getCompanyId().lastIndexOf("_"))).append("_").append(temp).append("_G_");
+                        }
+
+
+                        temp = null;
+                        temp = wt.getProjectId().substring(0, wt.getProjectId().lastIndexOf("_"));
+                        sb.append("P").append(Integer.valueOf(temp.substring(temp.length() - 2))).append("_");
+                        temp = wt.getLineId().substring(0, wt.getProjectId().lastIndexOf("_"));
+                        sb.append("L").append(Integer.valueOf(temp.substring(temp.length() - 2))).append("_");
+
+                        temp = wt.getId().substring(wt.getId().lastIndexOf("_")-4,wt.getId().lastIndexOf("_") );
+
+                        if (temp.length() == 1) {
+                            sb.append("000").append(temp).append("_");
+                        } else if (temp.length() == 2) {
+                            sb.append("00").append(temp).append("_");
+                        }else if (temp.length() == 3) {
+                            sb.append("0").append(temp).append("_");
+                        } else {
+                            sb.append(temp).append("_");
+                        }
+
+
+                        if(ls.get(i).getUniformCode().indexOf("AI")>=0)
+                        {
+                            sb.append("AI");
+
+                        }else if(ls.get(i).getUniformCode().indexOf("DI")>=0)
+                        {
+                            sb.append("DI");
+
+                        }else
+                        {
+                            sb.append("CI");
+
+                        }
+
+                        sb.append(stp.getNemCode());
+
+                        StringBuilder sba = new StringBuilder();
+
+                        temp = wp.getId().substring(0, wp.getId().lastIndexOf("_"));
+                        temp = temp.substring(0, temp.lastIndexOf("_"));
+                        temp = temp.substring(temp.lastIndexOf("_")+1);
+
+                        String temp2=wp.getCompanyId().substring(0,wp.getCompanyId().lastIndexOf("_"));
+                        temp2=temp2.substring(temp2.indexOf("_")+1);
+
+                        String temp3=wp.getId().substring(0,wp.getId().lastIndexOf("_"));
+                        temp3=temp3.substring(0,temp3.lastIndexOf("_"));
+                        temp3=temp3.substring(temp3.lastIndexOf("_")+1);
+                        if (wp.getId().indexOf("FDC")>=0) {
+                            sba.append(temp2).append(temp3).append("FJ");
+                        } else if (wp.getId().indexOf("GDC")>=0) {
+                            sba.append(temp2).append(temp3).append("GF");
+                        }
+
+                        StringBuilder sbtable = new StringBuilder();
+
+
+                        if (stp.getUniformCode().indexOf("AI")<0 && stp.getUniformCode().indexOf("DI")<0) {
+                            sbtable.append(sba).append("JSFW.");
+                            sbtable.append(sb);
+                        } else {
+                            sbtable.append(sba).append(".");
+                            sbtable.append(sb);
+                        }
+
+                        ProBasicEquipmentPoint po = new ProBasicEquipmentPoint();
+                        po.setId(StringUtils.getUUID());
+//                        po.setNemCode(V2Config.getInitialcode());
+
+                        if (stp.getUniformCode().indexOf("AI")<0 && stp.getUniformCode().indexOf("DI")<0)
+                        {
+                            po.setNemCode(String.valueOf(sbtable));
+                        }else
+                        {
+                            po.setNemCode(String.valueOf(sbtable));
+                        }
+
+                        sb = new StringBuilder();
+                        sb.append(wt.getName()).append(stp.getName());
+                        po.setName(String.valueOf(sb));
+                        po.setModel(wt.getModelId());
+                        po.setModelId(wt.getModelId());
+                        po.setWindturbineId(wt.getId());
+                        po.setUniformCode(stp.getUniformCode());
+                        po.setWindpowerstationId(wt.getWindpowerstationId());
+                        po.setLogicalUnitId(ls.get(i).getLogicalUnitId());
+
+                        if (stp.getUniformCode().indexOf("AI")<0 && stp.getUniformCode().indexOf("DI")<0) {
+                            sb = new StringBuilder();
+
+                            sb.append(wp.getId().substring(0,wp.getId().lastIndexOf("_")).replace("_", "")).append(".JSFW").append(sba);
+
+                            po.setRealtimeId(String.valueOf(sb));
+                        } else {
+                            sb = new StringBuilder();
+
+                            sb.append(wp.getId().substring(0,wp.getId().lastIndexOf("_")).replace("_", "")).append(".").append(sba);
+
+                            po.setRealtimeId(String.valueOf(sb));
+                        }
+
+                        points.add(po);
+
+
+//                               allpoints.addAll(points);
+                    }
+                    allpoints.addAll(points);
+                }
+
+            }
+//            }
+
+
+        }
+
+
+        //创建一个数组用于设置表头
+        String[] arr = new String[]{"编号", "编码", "名称","别名", "型号", "单位", "英文名称", "类型编号", "所属型号", "最大值", "最小值", "合理最大值",
+                "合理最小值", "风机编号", "统一编码", "短ID", "长ID", "风场编号", "实时配置编号", "部件编号", "集团测点编号", "具体名称", "系数"};
+        String heardName = "风机测点表";
+        //调用Excel导出工具类
+        ExcelExport.exportToPath(allpoints, arr, heardName, 6, "风机健康测点");
+
+    }
+
+
+
+    public void initalJkfc() throws IOException {
+
+
+        List<ProEconTestingPoint> fdpointls = proEconTestingPointService.list().stream()
+                .filter(i->i.getTypeId().equals("jkfcc") ).collect(Collectors.toList());
+        List<ProEconTestingPoint> gfpointls = proEconTestingPointService.list().stream()
+                .filter(i->i.getTypeId().equals("jkfcc")).collect(Collectors.toList());
+
+
+
+
+        List<ProBasicPowerstationPoint> allpoints = new ArrayList<>();
+
+
+
+        /*********************************************场站、项目、线路测点生成*****************************************************/
+
+
+        for (ProBasicPowerstation wp : CacheContext.wpls) {
+            List<ProEconTestingPoint> ls=null;
+//            if(wp.getId().contains("FDC"))
+//            {
+//                ls=fdpointls;
+//
+//            }else
+//            {
+//                ls=gfpointls;
+//
+//            }
+
+            if(wp.getId().contains("GDC"))
+            {
+                ls=gfpointls;
+
+            }
+            createWpPoints(wp, ls, allpoints);
+            createPjPoints(wp, ls, allpoints);
+            createLnPoints(wp, ls, allpoints);
+
+        }
+
+
+        //创建一个数组用于设置表头
+        //  编号,编码,名称,实时库名称,型号,单位,英文名称,类型编号,所属型号,最大值,最小值,合理最大值,合理最小值,统一编码,短ID,长ID,场站编号,实时配置编号,集团测点编号,具体名称,系数
+        String[] arr = new String[]{"编号", "编码", "名称","实时库名称", "型号", "单位", "英文名称", "类型编号", "所属型号", "最大值", "最小值", "合理最大值",
+                "合理最小值", "统一编码", "短ID", "长ID", "风场编号", "实时配置编号", "集团测点编号", "具体名称", "系数"};
+        String heardName = "场站测点表";
+        //调用Excel导出工具类
+        ExcelExport.exportToPath(allpoints, arr, heardName, 6, "场站健康测点");
+    }
 
 }

+ 4 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/initialpoint/InitialPointGoldenXkService.java

@@ -988,5 +988,9 @@ public class InitialPointGoldenXkService implements IinitialPoint {
     }
 
 
+    public void initalJkfc() throws IOException {}
+
+    public void initalJkfj() throws IOException {
+    }
 
 }

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

@@ -41,12 +41,12 @@ public class SafetyDayService {
             if (StringUtils.isNotNull(powerstationPoint)){
                 double aqts = 0;
                 try {
-                    aqts = edosUtil.getSectionData(powerstationPoint, currentDate.getTime()).getPointValueInDouble();
+                    aqts = edosUtil.getRealData(powerstationPoint).getPointValueInDouble();
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
 
-                if(aqts!=0)
+                if(aqts>1)
                 {
                     aqts ++;
                     PointData pointData = PointUtil.createPointData(currentDate, aqts, powerstationPoint.getNemCode(), powerstationPoint.getName());

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

@@ -379,11 +379,11 @@ public class StatusService {
                 int pointValueInDouble = (int) edosUtil.getRealData(windturbinestatusdi.getNemCode()).getPointValueInDouble();
 
                 if (stateMap.containsKey(pointValueInDouble)) {
-                    status = (double) stateMap.get(pointValueInDouble);
+                  double   temp = (double) stateMap.get(pointValueInDouble);
 
-                    if (status == 3) {
+                    if (temp == 3) {
                         status = 2;
-                    } else if (status == 8 || status == 9) {
+                    } else if (temp == 8 || temp == 9) {
                         status = 3;
                     }
                 }

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

@@ -238,7 +238,7 @@ public class SaticSchedulePgTask {
 
 
                 Date end = new Date();
-                System.out.println("执行用时" + DateUtils.millisecondDiff(begin, end) + "秒");
+                System.out.println("执行用时" + DateUtils.secondsDiff(begin, end) + "秒");
                 System.out.println("停机记录调度调度程序执行结束!。。。。。。");
 
                 Thread.sleep(200);
@@ -326,9 +326,9 @@ public class SaticSchedulePgTask {
             powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_ZK_FDC_STA");
             XxlJobHelper.log("月处理完成!........");
 
-            XxlJobHelper.log("年序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_ZK_FDC_STA");
-            XxlJobHelper.log("年处理完成!........");
+//            XxlJobHelper.log("年序执行开始!........");
+//            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_ZK_FDC_STA");
+//            XxlJobHelper.log("年处理完成!........");
 
 
         } catch (Exception e) {
@@ -359,9 +359,9 @@ public class SaticSchedulePgTask {
             powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_GJY_FDC_STA");
             XxlJobHelper.log("月处理完成!........");
 
-            XxlJobHelper.log("年序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_GJY_FDC_STA");
-            XxlJobHelper.log("年处理完成!........");
+//            XxlJobHelper.log("年序执行开始!........");
+//            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_GJY_FDC_STA");
+//            XxlJobHelper.log("年处理完成!........");
 
 
         } catch (Exception e) {
@@ -391,9 +391,9 @@ public class SaticSchedulePgTask {
             powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_BHB_FDC_STA");
             XxlJobHelper.log("月处理完成!........");
 
-            XxlJobHelper.log("年序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_BHB_FDC_STA");
-            XxlJobHelper.log("年处理完成!........");
+//            XxlJobHelper.log("年序执行开始!........");
+//            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_BHB_FDC_STA");
+//            XxlJobHelper.log("年处理完成!........");
 
 
         } catch (Exception e) {
@@ -422,9 +422,9 @@ public class SaticSchedulePgTask {
             powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_HSM_FDC_STA");
             XxlJobHelper.log("月处理完成!........");
 
-            XxlJobHelper.log("年序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_HSM_FDC_STA");
-            XxlJobHelper.log("年处理完成!........");
+//            XxlJobHelper.log("年序执行开始!........");
+//            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_HSM_FDC_STA");
+//            XxlJobHelper.log("年处理完成!........");
 
 
         } catch (Exception e) {
@@ -453,9 +453,9 @@ public class SaticSchedulePgTask {
             powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_YTY_FDC_STA");
             XxlJobHelper.log("月处理完成!........");
 
-            XxlJobHelper.log("年序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_YTY_FDC_STA");
-            XxlJobHelper.log("年处理完成!........");
+//            XxlJobHelper.log("年序执行开始!........");
+//            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_YTY_FDC_STA");
+//            XxlJobHelper.log("年处理完成!........");
 
 
         } catch (Exception e) {
@@ -485,9 +485,9 @@ public class SaticSchedulePgTask {
             powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_BHB3_FDC_STA");
             XxlJobHelper.log("月处理完成!........");
 
-            XxlJobHelper.log("年序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_BHB3_FDC_STA");
-            XxlJobHelper.log("年处理完成!........");
+//            XxlJobHelper.log("年序执行开始!........");
+//            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_BHB3_FDC_STA");
+//            XxlJobHelper.log("年处理完成!........");
 
 
         } catch (Exception e) {
@@ -517,9 +517,9 @@ public class SaticSchedulePgTask {
             powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_PDL_FDC_STA");
             XxlJobHelper.log("月处理完成!........");
 
-            XxlJobHelper.log("年序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_PDL_FDC_STA");
-            XxlJobHelper.log("年处理完成!........");
+//            XxlJobHelper.log("年序执行开始!........");
+//            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_PDL_FDC_STA");
+//            XxlJobHelper.log("年处理完成!........");
 
 
         } catch (Exception e) {
@@ -548,9 +548,9 @@ public class SaticSchedulePgTask {
             powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_NJL_FDC_STA");
             XxlJobHelper.log("月处理完成!........");
 
-            XxlJobHelper.log("年序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_NJL_FDC_STA");
-            XxlJobHelper.log("年处理完成!........");
+//            XxlJobHelper.log("年序执行开始!........");
+//            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_NJL_FDC_STA");
+//            XxlJobHelper.log("年处理完成!........");
 
 
         } catch (Exception e) {
@@ -580,9 +580,9 @@ public class SaticSchedulePgTask {
             powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_YLZ_FDC_STA");
             XxlJobHelper.log("月处理完成!........");
 
-            XxlJobHelper.log("年序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_YLZ_FDC_STA");
-            XxlJobHelper.log("年处理完成!........");
+//            XxlJobHelper.log("年序执行开始!........");
+//            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_YLZ_FDC_STA");
+//            XxlJobHelper.log("年处理完成!........");
 
 
         } catch (Exception e) {
@@ -613,9 +613,9 @@ public class SaticSchedulePgTask {
             powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_YF_FDC_STA");
             XxlJobHelper.log("月处理完成!........");
 
-            XxlJobHelper.log("年序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_YF_FDC_STA");
-            XxlJobHelper.log("年处理完成!........");
+//            XxlJobHelper.log("年序执行开始!........");
+//            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_YF_FDC_STA");
+//            XxlJobHelper.log("年处理完成!........");
 
 
         } catch (Exception e) {
@@ -644,9 +644,9 @@ public class SaticSchedulePgTask {
             powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_PTZ_FDC_STA");
             XxlJobHelper.log("月处理完成!........");
 
-            XxlJobHelper.log("年序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_PTZ_FDC_STA");
-            XxlJobHelper.log("年处理完成!........");
+//            XxlJobHelper.log("年序执行开始!........");
+//            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_PTZ_FDC_STA");
+//            XxlJobHelper.log("年处理完成!........");
 
 
         } catch (Exception e) {
@@ -675,9 +675,9 @@ public class SaticSchedulePgTask {
             powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_XWT_FDC_STA");
             XxlJobHelper.log("月处理完成!........");
 
-            XxlJobHelper.log("年序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_XWT_FDC_STA");
-            XxlJobHelper.log("年处理完成!........");
+//            XxlJobHelper.log("年序执行开始!........");
+//            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_XWT_FDC_STA");
+//            XxlJobHelper.log("年处理完成!........");
 
 
         } catch (Exception e) {
@@ -707,9 +707,9 @@ public class SaticSchedulePgTask {
             powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_DJY_FDC_STA");
             XxlJobHelper.log("月处理完成!........");
 
-            XxlJobHelper.log("年序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_DJY_FDC_STA");
-            XxlJobHelper.log("年处理完成!........");
+//            XxlJobHelper.log("年序执行开始!........");
+//            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_DJY_FDC_STA");
+//            XxlJobHelper.log("年处理完成!........");
 
 
         } catch (Exception e) {

+ 1 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/task/thread/EconWtAlysisDayThread.java

@@ -88,6 +88,7 @@ public class EconWtAlysisDayThread implements Runnable {
 			// 超时后,进行相应处理
 		}finally {
 			latch.countDown();
+
 		}
 	}
 }

+ 2 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/task/thread/EquipmentInfo3Thread.java

@@ -70,7 +70,9 @@ public class EquipmentInfo3Thread implements Runnable {
 			futureTask.cancel(true);
 			// 超时后,进行相应处理
 		}finally {
+
 			latch.countDown();
+
 		}
 	}
 }

+ 8 - 11
realtime/generationXK-service/src/main/java/com/gyee/generation/task/thread/EquipmentInfo3ThreadPool.java

@@ -65,7 +65,7 @@ public class EquipmentInfo3ThreadPool implements Callable<String>, Serializable
 
 		// //便于观察,等待一段时间
 
-		try {
+
 			if(CacheContext.wtpAimap.containsKey(wt.getId()))
 			{
 
@@ -111,10 +111,7 @@ public class EquipmentInfo3ThreadPool implements Callable<String>, Serializable
 			}
 
 
-		} catch (Exception e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
+
 		threadPoolTaskData = null;
 
 		return result;
@@ -701,11 +698,11 @@ public class EquipmentInfo3ThreadPool implements Callable<String>, Serializable
 		//日合计运行次数
 		pewp.setRyxcs(zcfdcs);
 //		//日合计限电次数
-//		pewp.setRxdcs(xdtjcs);
+		pewp.setRxdcs(xdtjcs);
 		//日合计通讯中断次数
 		pewp.setRtxzdcs(txzdcs);
 //		//日合计受累次数
-//		pewp.setRslcs(slsc);
+		pewp.setRslcs(slsc);
 
 
 		pewp.setRxdcs(0.0);
@@ -733,11 +730,11 @@ public class EquipmentInfo3ThreadPool implements Callable<String>, Serializable
 			//月合计运行次数
 			pewp.setYyxcs(StringUtils.round(pepid.getYyxcs()+pewp.getRyxcs(),2));
 //			//月合计限电次数
-//			pewp.setYxdcs(StringUtils.round(pepid.getYxdcs()+pewp.getRxdcs(),2));
+			pewp.setYxdcs(StringUtils.round(pepid.getYxdcs()+pewp.getRxdcs(),2));
 			//月合计通讯中断次数
 			pewp.setYtxzdcs(StringUtils.round(pepid.getYtxzdcs()+pewp.getRtxzdcs(),2));
 //			//月合计受累次数
-//			pewp.setYslcs(StringUtils.round(pepid.getYslcs()+pewp.getRslcs(),2));
+			pewp.setYslcs(StringUtils.round(pepid.getYslcs()+pewp.getRslcs(),2));
 
 
 			//月合计限电次数
@@ -770,11 +767,11 @@ public class EquipmentInfo3ThreadPool implements Callable<String>, Serializable
 			//年合计运行次数
 			pewp.setNyxcs(StringUtils.round(pepid.getNyxcs()+pewp.getRyxcs(),2));
 //			//年合计限电次数
-//			pewp.setNxdcs(StringUtils.round(pepid.getNxdcs()+pewp.getRxdcs(),2));
+			pewp.setNxdcs(StringUtils.round(pepid.getNxdcs()+pewp.getRxdcs(),2));
 			//年合计通讯中断次数
 			pewp.setNtxzdcs(StringUtils.round(pepid.getNtxzdcs()+pewp.getRtxzdcs(),2));
 //			//年合计受累次数
-//			pewp.setNslcs(StringUtils.round(pepid.getNslcs()+pewp.getRslcs(),2));
+			pewp.setNslcs(StringUtils.round(pepid.getNslcs()+pewp.getRslcs(),2));
 
 			//年合计限电次数
 			pewp.setNxdcs(StringUtils.round(0,2));

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

@@ -238,8 +238,8 @@ public final class ExcelExport {
 
         if(StringUtils.notEmp(filename))
         {
-            StringBuilder sb=new StringBuilder("/usr/local/gyee/temprun/");
-          //  StringBuilder sb=new StringBuilder("d:\\powerdata\\");
+            //StringBuilder sb=new StringBuilder("/usr/local/gyee/temprun/");
+            StringBuilder sb=new StringBuilder("d:\\powerdata\\");
             sb.append(filename);
             sb.append(".csv");
 

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

@@ -1707,8 +1707,8 @@ public class EdosUtil implements IEdosUtil {
 
         if (!pointls.isEmpty() ){
 
-            if ( pointls.get(0).getEdnaId().startsWith("GF-")){
-                url = baseURL2 + "/history/batch";
+            if (pointls.get(0).getEdnaId().startsWith("GF-")){
+                url = baseURL2 + "/latest/batch";
             }
 
             List<JSONObject> writeList = new ArrayList<>();