浏览代码

Merge branch 'master' of http://124.70.43.205:3000/xieshengjie/sis

# Conflicts:
#	web/runeconomy-xk/src/main/resources/application-yun.yml
chenminghua 2 年之前
父节点
当前提交
5c40bb93dc
共有 74 个文件被更改,包括 7320 次插入1899 次删除
  1. 49 0
      common/src/main/java/com/gyee/common/util/ReflexUtil.java
  2. 0 1
      pom.xml
  3. 1 0
      realtime/generationXK-service/pom.xml
  4. 9 8
      realtime/generationXK-service/src/main/java/com/gyee/generation/GenerationMain.java
  5. 5 5
      realtime/generationXK-service/src/main/java/com/gyee/generation/config/GeneratorCodeConfig.java
  6. 68 68
      realtime/generationXK-service/src/main/java/com/gyee/generation/config/XxlJobConfig.java
  7. 37 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/controller/ProEconWpwindDayInfoController.java
  8. 0 58
      realtime/generationXK-service/src/main/java/com/gyee/generation/controller/matrix/MatrixController.java
  9. 33 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconWpwindDayInfoMapper.java
  10. 4 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconWindturbineGoodness.java
  11. 641 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProEconWpwindDayInfo.java
  12. 319 4
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfoDayTopService.java
  13. 25 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindturbineGoodnessService.java
  14. 33 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/IProEconWpwindDayInfoService.java
  15. 37 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconWpwindDayInfoServiceImpl.java
  16. 123 121
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/initalcache/CacheService.java
  17. 11 11
      realtime/generationXK-service/src/main/resources/application-xk.yml
  18. 34 4
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/config/CacheContext.java
  19. 1 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicEnergyGroupController.java
  20. 20 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicWeatherStationController.java
  21. 3 3
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProEconEquipmentmodelController.java
  22. 27 2
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProEconTestingPointController.java
  23. 16 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/mapper/auto/ProBasicWeatherStationMapper.java
  24. 61 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/model/auto/ProBasicWeatherStation.java
  25. 6 1
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/model/auto/ProEconEquipmentmodel.java
  26. 16 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicWeatherStationService.java
  27. 1 1
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProEconEquipmentmodelService.java
  28. 4 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProEconTestingPointService.java
  29. 20 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicWeatherStationServiceImpl.java
  30. 3 3
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProEconEquipmentmodelServiceImpl.java
  31. 237 23
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProEconTestingPointServiceImpl.java
  32. 1 8
      web/runeconomy-xk/pom.xml
  33. 42 2
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/ProBasicEquipmentController.java
  34. 110 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/ProEconEquipmentInfoDayTopController.java
  35. 26 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/ProEconPointCodeController.java
  36. 140 1
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/bmk/BenchmarkingController.java
  37. 2 2
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/goodness/WindpowerDetailChartController.java
  38. 176 875
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/goodness/WindturbineDetailChartController.java
  39. 313 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/goodness/WindturbineDetailLineChartController.java
  40. 279 275
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/goodness/WindturbineDetailPieChartAController.java
  41. 0 1
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/goodness/WindturbineGoodnessDetailController.java
  42. 81 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/performacompare/EquipmentPerformaCompareController.java
  43. 61 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/specific/SpecificController.java
  44. 181 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/dto/EquipmentInfoDayTopDTO.java
  45. 10 1
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/dto/response/ProEconPointCodeDTO.java
  46. 5 1
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/init/CacheContext.java
  47. 1 1
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProBasicEquipment.java
  48. 49 22
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconEquipmentInfoDayTop.java
  49. 50 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/BrownoutsEvent2Service.java
  50. 50 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/ShutdownEvent2Service.java
  51. 713 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/WtwindDayInfoService.java
  52. 14 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProBasicEquipmentService.java
  53. 16 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconEquipmentInfoDayTopService.java
  54. 2 2
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPointCodeService.java
  55. 2 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPowerstationInfoDay1Service.java
  56. 3 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPowerstationInfoDay4Service.java
  57. 4 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconWtAlysisDayService.java
  58. 5 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconWtPowerCurveFittingService.java
  59. 4 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconWtwindDayInfoService.java
  60. 42 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProBasicEquipmentServiceImpl.java
  61. 146 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconEquipmentInfoDayTopServiceImpl.java
  62. 573 38
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPointCodeServiceImpl.java
  63. 18 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay1ServiceImpl.java
  64. 18 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay4ServiceImpl.java
  65. 25 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconWtAlysisDayServiceImpl.java
  66. 26 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconWtPowerCurveFittingServiceImpl.java
  67. 41 17
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconWtwindDayInfoServiceImpl.java
  68. 462 13
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/bmk/BenchmarkingService.java
  69. 140 144
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/goodness/WindturbinegoodnessService.java
  70. 226 175
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/homepage/EconomyPointHomePageService.java
  71. 851 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/performacompare/EquipmentPerformaCompareService.java
  72. 566 4
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/specific/SpecificService.java
  73. 1 1
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/threerate/ThreeRateService.java
  74. 1 1
      web/runeconomy-xk/src/main/resources/application-yun.yml

+ 49 - 0
common/src/main/java/com/gyee/common/util/ReflexUtil.java

@@ -0,0 +1,49 @@
+package com.gyee.common.util;/*
+@author   谢生杰
+@date   2022/11/26-15:27
+*/
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+import java.lang.reflect.Field;
+
+public class ReflexUtil {
+
+    public static Object getFieldValueByObject(Object object,String targetFieldName) throws Exception{
+        //获取该对象的class
+        Class objClass = object.getClass();
+        //初始化返回时
+        Object result = null;
+
+        //获取所有的属性数组
+        Field[] fields = objClass.getDeclaredFields();
+
+        for (Field field : fields){
+            //属性名称
+            String currentFieldName = "";
+
+            try {
+                boolean has_JsonProperty = field.isAnnotationPresent(JsonProperty.class);
+                if (has_JsonProperty){
+                    currentFieldName = field.getAnnotation(JsonProperty.class).value();
+                }else {
+                    currentFieldName = field.getName();
+                }
+
+                if (currentFieldName.equals(targetFieldName)) {
+                    field.setAccessible(true);
+                    result = field.get(object);
+
+                    return result;
+                }
+            }catch (SecurityException e) {
+                e.printStackTrace();
+            }catch (IllegalArgumentException e){
+                e.printStackTrace();
+            }catch (IllegalAccessException e){
+                e.printStackTrace();
+            }
+        }
+        return result;
+    }
+}

+ 0 - 1
pom.xml

@@ -120,7 +120,6 @@
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-maven-plugin</artifactId>
         <configuration>
-          <fork>true</fork>
           <addResources>true</addResources>
         </configuration>
       </plugin>

+ 1 - 0
realtime/generationXK-service/pom.xml

@@ -124,6 +124,7 @@
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.7.1</version>
                 <executions>
                     <execution>
                         <goals>

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

@@ -1,13 +1,11 @@
 package com.gyee.generation;
 
-import com.gyee.generation.service.WtAlysisDayService;
+import com.gyee.generation.service.initalcache.CacheService;
 import com.gyee.generation.util.SpringUtils;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 
-import java.util.Date;
-
 /**
  * @ClassName : GenerationMain
  * @Author : xieshengjie
@@ -122,6 +120,9 @@ public class GenerationMain {
 
 //        EquipmentInfoDayTopService equipmentInfoDayTopService= SpringUtils.getBean("equipmentInfoDayTopService");
 //        equipmentInfoDayTopService.calEquipmentInfoDayTop(new Date());
+//        equipmentInfoDayTopService.calEquipmentInfoMonthTop(new Date());
+//        equipmentInfoDayTopService.calEquipmentInfoYearTop(new Date());
+
 //        Calendar c=Calendar.getInstance();
 //        c.set(Calendar.MONTH,7);
 //        c.set(Calendar.DAY_OF_MONTH,31);
@@ -133,8 +134,8 @@ public class GenerationMain {
 //        System.out.println("执行用时"+ DateUtils.secondsDiff(date,end) +"秒");
 //        System.out.println("计算完成");
 //
-//        CacheService cacheService= SpringUtils.getBean("cacheService");
-//        cacheService.initRedisCache();
+        CacheService cacheService= SpringUtils.getBean("cacheService");
+        cacheService.initRedisCache();
 //
 //        PowerCurveFittingModelService powerCurveFittingModelService= SpringUtils.getBean("powerCurveFittingModelService");
 //        powerCurveFittingModelService.cureFittingModel();
@@ -142,8 +143,8 @@ public class GenerationMain {
 //        WindturbineGoodnessService windturbineGoodnessService= SpringUtils.getBean("windturbineGoodnessService");
 //        windturbineGoodnessService.calWindturbineGoodness(new Date());
 
-        WtAlysisDayService wtAlysisDayService= SpringUtils.getBean("wtAlysisDayService");
-        wtAlysisDayService.calEquipmentInfoDay(new Date());
-
+//        WtAlysisDayService wtAlysisDayService= SpringUtils.getBean("wtAlysisDayService");
+//        wtAlysisDayService.calEquipmentInfoDay(new Date());
+System.out.println("完成");
     }
 }

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

@@ -59,12 +59,12 @@ public class GeneratorCodeConfig {
 //        dsc.setUrl("jdbc:oracle:thin:@10.83.68.165:1521:gdsj");
 
         dsc.setDriverName("org.postgresql.Driver");
+//        dsc.setUsername("postgres");
+//        dsc.setPassword("postgres");
+//        dsc.setUrl("jdbc:postgresql://192.168.11.248:5432/IMS_NEM_SD");
+        dsc.setUrl("jdbc:postgresql://124.70.75.91:5432/jn_test");
         dsc.setUsername("postgres");
-        dsc.setPassword("postgres");
-        dsc.setUrl("jdbc:postgresql://192.168.11.248:5432/IMS_NEM_SD");
-//        dsc.setUrl("jdbc:postgresql://120.46.148.180:5432/postgres");
-//        dsc.setUsername("gdprod");
-//        dsc.setPassword("gd123");
+        dsc.setPassword("gd123");
         mpg.setDataSource(dsc);
 
 

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

@@ -1,68 +1,68 @@
-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")
-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();
-    */
-
-
-}
+//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")
+//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();
+//    */
+//
+//
+//}

+ 37 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/controller/ProEconWpwindDayInfoController.java

@@ -0,0 +1,37 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 1、日风向平均风速
+2、日风向最大风速
+3、日风向次数
+4、日风向频率
+5、日风向静风次数
+6、日风向静风频率
+7、月风向平均风速
+8、月风向最大风速
+9、月风向次数
+10、月风向频率
+11、月风向静风次数
+12、月风向静风频率
+13、年风向平均风速
+14、年风向最大风速
+15、年风向次数
+16、年风向频率
+17、年风向静风次数
+18、年风向静风频率 前端控制器
+ * </p>
+ *
+ * @author shilin
+ * @since 2022-11-25
+ */
+@RestController
+@RequestMapping("//pro-econ-wpwind-day-info")
+public class ProEconWpwindDayInfoController {
+
+}

+ 0 - 58
realtime/generationXK-service/src/main/java/com/gyee/generation/controller/matrix/MatrixController.java

@@ -1,58 +0,0 @@
-package com.gyee.generation.controller.matrix;
-
-import com.gyee.common.config.R;
-import com.gyee.common.model.StringUtils;
-
-import com.gyee.generation.service.realtimelibrary.TestService;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import java.util.Map;
-
-/**
- * @ClassName : MatrixController
- * @Author : xieshengjie
- * @Date: 2022/2/25 17:05
- * @Description :
- */
-@RestController
-@RequestMapping("/matrix")
-public class MatrixController {
-    @Resource
-    private TestService matrixService;
-
-    /**
-     * 简单矩阵
-     * @return
-     */
-    @GetMapping("/matrixDatas")
-    @ResponseBody
-    @CrossOrigin(origins = "*", maxAge = 3600)
-    public R matrixDatas()  {
-
-        Map<String, Object> resultMap = matrixService.matrixDatas();
-        if (StringUtils.isNotNull(resultMap)) {
-            return R.ok().data(resultMap);
-        }else{
-            return R.error().message("访问失败");
-        }
-    }
-
-//    /**
-//     * 明细矩阵
-//     * @return
-//     */
-//    @GetMapping("/matrixMxDatas")
-//    @ResponseBody
-//    @CrossOrigin(origins = "*", maxAge = 3600)
-//    public R matrixMxDatas()  {
-//
-//        Map<String, Object> resultMap = matrixService.matrixMxDatas();
-//        if (StringUtils.isNotNull(resultMap)) {
-//            return R.ok(resultMap.size()).data(resultMap);
-//        }else{
-//            return R.error().message("访问失败");
-//        }
-//    }
-
-}

+ 33 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProEconWpwindDayInfoMapper.java

@@ -0,0 +1,33 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.ProEconWpwindDayInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 1、日风向平均风速
+2、日风向最大风速
+3、日风向次数
+4、日风向频率
+5、日风向静风次数
+6、日风向静风频率
+7、月风向平均风速
+8、月风向最大风速
+9、月风向次数
+10、月风向频率
+11、月风向静风次数
+12、月风向静风频率
+13、年风向平均风速
+14、年风向最大风速
+15、年风向次数
+16、年风向频率
+17、年风向静风次数
+18、年风向静风频率 Mapper 接口
+ * </p>
+ *
+ * @author shilin
+ * @since 2022-11-25
+ */
+public interface ProEconWpwindDayInfoMapper extends BaseMapper<ProEconWpwindDayInfo> {
+
+}

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

@@ -95,4 +95,8 @@ public class ProEconWindturbineGoodness extends Model {
 
     private String companyId;
     private String types;
+
+    private Double daySpeed;
+    private Double monthSpeed;
+    private Double yearSpeed;
 }

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

@@ -0,0 +1,641 @@
+package com.gyee.generation.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.time.LocalDate;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 1、日风向平均风速
+2、日风向最大风速
+3、日风向次数
+4、日风向频率
+5、日风向静风次数
+6、日风向静风频率
+7、月风向平均风速
+8、月风向最大风速
+9、月风向次数
+10、月风向频率
+11、月风向静风次数
+12、月风向静风频率
+13、年风向平均风速
+14、年风向最大风速
+15、年风向次数
+16、年风向频率
+17、年风向静风次数
+18、年风向静风频率
+ * </p>
+ *
+ * @author shilin
+ * @since 2022-11-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ProEconWpwindDayInfo extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    private Integer id;
+
+    private String windpowerstationid;
+
+    private LocalDate recorddate;
+
+    private BigDecimal ca;
+
+    private BigDecimal cb;
+
+    private BigDecimal cc;
+
+    private BigDecimal cd;
+
+    private BigDecimal cf;
+
+    private BigDecimal cg;
+
+    private BigDecimal e;
+
+    private BigDecimal ese;
+
+    private BigDecimal se;
+
+    private BigDecimal sse;
+
+    private BigDecimal s;
+
+    private BigDecimal ssw;
+
+    private BigDecimal sw;
+
+    private BigDecimal wsw;
+
+    private BigDecimal w;
+
+    private BigDecimal wnw;
+
+    private BigDecimal nw;
+
+    private BigDecimal nnw;
+
+    private BigDecimal n;
+
+    private BigDecimal nne;
+
+    private BigDecimal ne;
+
+    private BigDecimal ene;
+
+    private BigDecimal e2;
+
+    private BigDecimal ese2;
+
+    private BigDecimal se2;
+
+    private BigDecimal sse2;
+
+    private BigDecimal s2;
+
+    private BigDecimal ssw2;
+
+    private BigDecimal sw2;
+
+    private BigDecimal wsw2;
+
+    private BigDecimal w2;
+
+    private BigDecimal wnw2;
+
+    private BigDecimal nw2;
+
+    private BigDecimal nnw2;
+
+    private BigDecimal n2;
+
+    private BigDecimal nne2;
+
+    private BigDecimal ne2;
+
+    private BigDecimal ene2;
+
+    private BigDecimal e3;
+
+    private BigDecimal ese3;
+
+    private BigDecimal se3;
+
+    private BigDecimal sse3;
+
+    private BigDecimal s3;
+
+    private BigDecimal ssw3;
+
+    private BigDecimal sw3;
+
+    private BigDecimal wsw3;
+
+    private BigDecimal w3;
+
+    private BigDecimal wnw3;
+
+    private BigDecimal nw3;
+
+    private BigDecimal nnw3;
+
+    private BigDecimal n3;
+
+    private BigDecimal nne3;
+
+    private BigDecimal ne3;
+
+    private BigDecimal ene3;
+
+    private BigDecimal e4;
+
+    private BigDecimal ese4;
+
+    private BigDecimal se4;
+
+    private BigDecimal sse4;
+
+    private BigDecimal s4;
+
+    private BigDecimal ssw4;
+
+    private BigDecimal sw4;
+
+    private BigDecimal wsw4;
+
+    private BigDecimal w4;
+
+    private BigDecimal wnw4;
+
+    private BigDecimal nw4;
+
+    private BigDecimal nnw4;
+
+    private BigDecimal n4;
+
+    private BigDecimal nne4;
+
+    private BigDecimal ne4;
+
+    private BigDecimal ene4;
+
+    private BigDecimal e5;
+
+    private BigDecimal ese5;
+
+    private BigDecimal se5;
+
+    private BigDecimal sse5;
+
+    private BigDecimal s5;
+
+    private BigDecimal ssw5;
+
+    private BigDecimal sw5;
+
+    private BigDecimal wsw5;
+
+    private BigDecimal w5;
+
+    private BigDecimal wnw5;
+
+    private BigDecimal nw5;
+
+    private BigDecimal nnw5;
+
+    private BigDecimal n5;
+
+    private BigDecimal nne5;
+
+    private BigDecimal ne5;
+
+    private BigDecimal ene5;
+
+    private BigDecimal e6;
+
+    private BigDecimal ese6;
+
+    private BigDecimal se6;
+
+    private BigDecimal sse6;
+
+    private BigDecimal s6;
+
+    private BigDecimal ssw6;
+
+    private BigDecimal sw6;
+
+    private BigDecimal wsw6;
+
+    private BigDecimal w6;
+
+    private BigDecimal wnw6;
+
+    private BigDecimal nw6;
+
+    private BigDecimal nnw6;
+
+    private BigDecimal n6;
+
+    private BigDecimal nne6;
+
+    private BigDecimal ne6;
+
+    private BigDecimal ene6;
+
+    private BigDecimal e7;
+
+    private BigDecimal ese7;
+
+    private BigDecimal se7;
+
+    private BigDecimal sse7;
+
+    private BigDecimal s7;
+
+    private BigDecimal ssw7;
+
+    private BigDecimal sw7;
+
+    private BigDecimal wsw7;
+
+    private BigDecimal w7;
+
+    private BigDecimal wnw7;
+
+    private BigDecimal nw7;
+
+    private BigDecimal nnw7;
+
+    private BigDecimal n7;
+
+    private BigDecimal nne7;
+
+    private BigDecimal ne7;
+
+    private BigDecimal ene7;
+
+    private BigDecimal e8;
+
+    private BigDecimal ese8;
+
+    private BigDecimal se8;
+
+    private BigDecimal sse8;
+
+    private BigDecimal s8;
+
+    private BigDecimal ssw8;
+
+    private BigDecimal sw8;
+
+    private BigDecimal wsw8;
+
+    private BigDecimal w8;
+
+    private BigDecimal wnw8;
+
+    private BigDecimal nw8;
+
+    private BigDecimal nnw8;
+
+    private BigDecimal n8;
+
+    private BigDecimal nne8;
+
+    private BigDecimal ne8;
+
+    private BigDecimal ene8;
+
+    private BigDecimal e9;
+
+    private BigDecimal ese9;
+
+    private BigDecimal se9;
+
+    private BigDecimal sse9;
+
+    private BigDecimal s9;
+
+    private BigDecimal ssw9;
+
+    private BigDecimal sw9;
+
+    private BigDecimal wsw9;
+
+    private BigDecimal w9;
+
+    private BigDecimal wnw9;
+
+    private BigDecimal nw9;
+
+    private BigDecimal nnw9;
+
+    private BigDecimal n9;
+
+    private BigDecimal nne9;
+
+    private BigDecimal ne9;
+
+    private BigDecimal ene9;
+
+    private BigDecimal e10;
+
+    private BigDecimal ese10;
+
+    private BigDecimal se10;
+
+    private BigDecimal sse10;
+
+    private BigDecimal s10;
+
+    private BigDecimal ssw10;
+
+    private BigDecimal sw10;
+
+    private BigDecimal wsw10;
+
+    private BigDecimal w10;
+
+    private BigDecimal wnw10;
+
+    private BigDecimal nw10;
+
+    private BigDecimal nnw10;
+
+    private BigDecimal n10;
+
+    private BigDecimal nne10;
+
+    private BigDecimal ne10;
+
+    private BigDecimal ene10;
+
+    private BigDecimal e11;
+
+    private BigDecimal ese11;
+
+    private BigDecimal se11;
+
+    private BigDecimal sse11;
+
+    private BigDecimal s11;
+
+    private BigDecimal ssw11;
+
+    private BigDecimal sw11;
+
+    private BigDecimal wsw11;
+
+    private BigDecimal w11;
+
+    private BigDecimal wnw11;
+
+    private BigDecimal nw11;
+
+    private BigDecimal nnw11;
+
+    private BigDecimal n11;
+
+    private BigDecimal nne11;
+
+    private BigDecimal ne11;
+
+    private BigDecimal ene11;
+
+    private BigDecimal e12;
+
+    private BigDecimal ese12;
+
+    private BigDecimal se12;
+
+    private BigDecimal sse12;
+
+    private BigDecimal s12;
+
+    private BigDecimal ssw12;
+
+    private BigDecimal sw12;
+
+    private BigDecimal wsw12;
+
+    private BigDecimal w12;
+
+    private BigDecimal wnw12;
+
+    private BigDecimal nw12;
+
+    private BigDecimal nnw12;
+
+    private BigDecimal n12;
+
+    private BigDecimal nne12;
+
+    private BigDecimal ne12;
+
+    private BigDecimal ene12;
+
+    private BigDecimal e13;
+
+    private BigDecimal ese13;
+
+    private BigDecimal se13;
+
+    private BigDecimal sse13;
+
+    private BigDecimal s13;
+
+    private BigDecimal ssw13;
+
+    private BigDecimal sw13;
+
+    private BigDecimal wsw13;
+
+    private BigDecimal w13;
+
+    private BigDecimal wnw13;
+
+    private BigDecimal nw13;
+
+    private BigDecimal nnw13;
+
+    private BigDecimal n13;
+
+    private BigDecimal nne13;
+
+    private BigDecimal ne13;
+
+    private BigDecimal ene13;
+
+    private BigDecimal e14;
+
+    private BigDecimal ese14;
+
+    private BigDecimal se14;
+
+    private BigDecimal sse14;
+
+    private BigDecimal s14;
+
+    private BigDecimal ssw14;
+
+    private BigDecimal sw14;
+
+    private BigDecimal wsw14;
+
+    private BigDecimal w14;
+
+    private BigDecimal wnw14;
+
+    private BigDecimal nw14;
+
+    private BigDecimal nnw14;
+
+    private BigDecimal n14;
+
+    private BigDecimal nne14;
+
+    private BigDecimal ne14;
+
+    private BigDecimal ene14;
+
+    private BigDecimal e15;
+
+    private BigDecimal ese15;
+
+    private BigDecimal se15;
+
+    private BigDecimal sse15;
+
+    private BigDecimal s15;
+
+    private BigDecimal ssw15;
+
+    private BigDecimal sw15;
+
+    private BigDecimal wsw15;
+
+    private BigDecimal w15;
+
+    private BigDecimal wnw15;
+
+    private BigDecimal nw15;
+
+    private BigDecimal nnw15;
+
+    private BigDecimal n15;
+
+    private BigDecimal nne15;
+
+    private BigDecimal ne15;
+
+    private BigDecimal ene15;
+
+    private BigDecimal e16;
+
+    private BigDecimal ese16;
+
+    private BigDecimal se16;
+
+    private BigDecimal sse16;
+
+    private BigDecimal s16;
+
+    private BigDecimal ssw16;
+
+    private BigDecimal sw16;
+
+    private BigDecimal wsw16;
+
+    private BigDecimal w16;
+
+    private BigDecimal wnw16;
+
+    private BigDecimal nw16;
+
+    private BigDecimal nnw16;
+
+    private BigDecimal n16;
+
+    private BigDecimal nne16;
+
+    private BigDecimal ne16;
+
+    private BigDecimal ene16;
+
+    private BigDecimal e17;
+
+    private BigDecimal ese17;
+
+    private BigDecimal se17;
+
+    private BigDecimal sse17;
+
+    private BigDecimal s17;
+
+    private BigDecimal ssw17;
+
+    private BigDecimal sw17;
+
+    private BigDecimal wsw17;
+
+    private BigDecimal w17;
+
+    private BigDecimal wnw17;
+
+    private BigDecimal nw17;
+
+    private BigDecimal nnw17;
+
+    private BigDecimal n17;
+
+    private BigDecimal nne17;
+
+    private BigDecimal ne17;
+
+    private BigDecimal ene17;
+
+    private BigDecimal e18;
+
+    private BigDecimal ese18;
+
+    private BigDecimal se18;
+
+    private BigDecimal sse18;
+
+    private BigDecimal s18;
+
+    private BigDecimal ssw18;
+
+    private BigDecimal sw18;
+
+    private BigDecimal wsw18;
+
+    private BigDecimal w18;
+
+    private BigDecimal wnw18;
+
+    private BigDecimal nw18;
+
+    private BigDecimal nnw18;
+
+    private BigDecimal n18;
+
+    private BigDecimal nne18;
+
+    private BigDecimal ne18;
+
+    private BigDecimal ene18;
+
+    private BigDecimal ch;
+
+    private BigDecimal ci;
+
+    private BigDecimal cj;
+
+
+}

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

@@ -80,7 +80,7 @@ public class EquipmentInfoDayTopService {
                 ProEconEquipmentInfoDayTop top =topls.get(i);
                 top.setDayRank(i+1);
             }
-
+            proEconEquipmentInfoDayTopService.saveBatch(topls);
         }
 
     }
@@ -206,7 +206,7 @@ public class EquipmentInfoDayTopService {
         peeidt.setRecordDate(DateUtils.truncate(recordDate));
         peeidt.setYear(DateUtils.getYear(recordDate));
         peeidt.setMonth(DateUtils.getMonth(recordDate) + 1);
-
+        initial(peeidt);
         List<ProEconEquipmentInfoDay1> pepid1ls = proEconEquipmentInfoDay1Service.list().stream()
                 .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate)) == 0
                         && i.getWindturbineId().equals(wt.getId())
@@ -326,7 +326,7 @@ public class EquipmentInfoDayTopService {
         peeidt.setRecordDate(DateUtils.truncate(recordDate));
         peeidt.setYear(DateUtils.getYear(recordDate));
         peeidt.setMonth(DateUtils.getMonth(recordDate) + 1);
-
+        initial(peeidt);
         List<ProEconEquipmentInfoDay1> pepid1ls = proEconEquipmentInfoDay1Service.list().stream()
                 .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate)) == 0
                         && i.getWindturbineId().equals(wt.getId())
@@ -446,7 +446,7 @@ public class EquipmentInfoDayTopService {
         peeidt.setRecordDate(DateUtils.truncate(recordDate));
         peeidt.setYear(DateUtils.getYear(recordDate));
         peeidt.setMonth(DateUtils.getMonth(recordDate) + 1);
-
+        initial(peeidt);
         List<ProEconEquipmentInfoDay1> pepid1ls = proEconEquipmentInfoDay1Service.list().stream()
                 .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate)) == 0
                         && i.getWindturbineId().equals(wt.getId())
@@ -1141,6 +1141,321 @@ public class EquipmentInfoDayTopService {
 
         return filedls;
     }
+
+    private void initial(ProEconEquipmentInfoDayTop po)
+    {
+        /**
+         * 发电量
+         */
+        po.setDayfdl(0.0);
+
+        /**
+         * 发电量月
+         */
+        po.setMonthfdl(0.0);
+
+        /**
+         * 发电量年
+         */
+        po.setYearfdl(0.0);
+
+        /**
+         * 理论发电量
+         */
+        po.setDayllfdl(0.0);
+
+        /**
+         * 理论发电量月
+         */
+        po.setMonthllfdl(0.0);
+
+        /**
+         * 理论发电量年
+         */
+        po.setYearllfdl(0.0);
+
+        /**
+         * 平均风速
+         */
+        po.setDayfs(0.0);
+
+        /**
+         * 月平均风速
+         */
+        po.setMonthfs(0.0);
+
+        /**
+         * 年平均风速
+         */
+        po.setYearfs(0.0);
+
+        /**
+         * 平均功率
+         */
+        po.setDaygl(0.0);
+
+        /**
+         * 月平均功率
+         */
+        po.setMonthgl(0.0);
+
+        /**
+         * 年平均功率
+         */
+        po.setYeargl(0.0);
+
+        /**
+         * 故障损失电量
+         */
+        po.setDaygzssdl(0.0);
+
+        /**
+         * 月故障损失电量
+         */
+        po.setMonthgzssdl(0.0);
+
+        /**
+         * 年故障损失电量
+         */
+        po.setYeargzssdl(0.0);
+
+        /**
+         * 日限电损失电量
+         */
+        po.setDayxdssdl(0.0);
+
+        /**
+         * 月限电损失电量
+         */
+        po.setMonthxdssdl(0.0);
+
+        /**
+         * 年限电损失电量
+         */
+        po.setYearxdssdl(0.0);
+
+        /**
+         * 日维护损失电量
+         */
+        po.setDaywhssdl(0.0);
+
+        /**
+         * 月维护损失电量
+         */
+        po.setMonthwhssdl(0.0);
+
+        /**
+         * 年维护损失电量
+         */
+        po.setYearwhssdl(0.0);
+
+        /**
+         * 日性能损失电量
+         */
+        po.setDayxnssdl(0.0);
+
+        /**
+         * 月性能损失电量
+         */
+        po.setMonthxnssdl(0.0);
+
+        /**
+         * 年性能损失电量
+         */
+        po.setYearxnssdl(0.0);
+
+        /**
+         * 日故障时间
+         */
+        po.setDaygzsj(0.0);
+
+        /**
+         * 月故障时间
+         */
+        po.setMonthgzsj(0.0);
+
+        /**
+         * 年故障时间
+         */
+        po.setYeargzsj(0.0);
+
+        /**
+         * 日维护时间
+         */
+        po.setDaywhsj(0.0);
+
+        /**
+         * 月维护时间
+         */
+        po.setMonthwhsj(0.0);
+
+        /**
+         * 年维护时间
+         */
+        po.setYearwhsj(0.0);
+
+        /**
+         * 日运行时间
+         */
+        po.setDayyxsj(0.0);
+
+        /**
+         * 月运行时间
+         */
+        po.setMonthyxsj(0.0);
+
+        /**
+         * 年运行时间
+         */
+        po.setYearyxsj(0.0);
+
+        /**
+         * 日停机时间
+         */
+        po.setDaytjsj(0.0);
+
+        /**
+         * 月停机时间
+         */
+        po.setMonthtjsj(0.0);
+
+        /**
+         * 年停机时间
+         */
+        po.setYeartjsj(0.0);
+
+        /**
+         * 日利用小时数
+         */
+        po.setDaylyxs(0.0);
+
+        /**
+         * 月利用小时数
+         */
+        po.setMonthlyxs(0.0);
+
+        /**
+         * 年利用小时数
+         */
+        po.setYearlyxs(0.0);
+
+        /**
+         * 日拟合优度
+         */
+        po.setDaynhyd(0.0);
+
+        /**
+         * 月拟合优度
+         */
+        po.setMonthnhyd(0.0);
+
+        /**
+         * 年拟合优度
+         */
+        po.setYearnhyd(0.0);
+
+        /**
+         * 日设备可利用率
+         */
+        po.setDaysbklyl(0.0);
+
+        /**
+         * 月设备可利用率
+         */
+        po.setMonthsbklyl(0.0);
+
+        /**
+         * 年设备可利用率
+         */
+        po.setYearsbklyl(0.0);
+
+        /**
+         * 日等效可用系数
+         */
+        po.setDaydxkyxs(0.0);
+
+        /**
+         * 月等效可用系数
+         */
+        po.setMonthdxkyxs(0.0);
+
+        /**
+         * 年等效可用系数
+         */
+        po.setYeardxkyxs(0.0);
+
+        /**
+         * 有效风时数
+         */
+        po.setDayyxfss(0.0);
+
+        /**
+         * 月有效风时数
+         */
+        po.setMonthyxfss(0.0);
+
+        /**
+         * 年有效风时数
+         */
+        po.setYearyxfss(0.0);
+
+        /**
+         * 日小风切入
+         */
+        po.setDayxfqr(0.0);
+
+        /**
+         * 月小风切入
+         */
+        po.setMonthxfqr(0.0);
+
+        /**
+         * 年小风切入
+         */
+        po.setYearxfqr(0.0);
+
+        /**
+         * 日静风频率
+         */
+        po.setDayjfpl(0.0);
+
+        /**
+         * 月静风频率
+         */
+        po.setMonthjfpl(0.0);
+
+        /**
+         * 年静风频率
+         */
+        po.setYearjfpl(0.0);
+
+        /**
+         * 日功率一致性系数
+         */
+        po.setDayglyzxxs(0.0);
+
+        /**
+         * 月功率一致性系数
+         */
+        po.setMonthglyzxxs(0.0);
+
+        /**
+         * 年功率一致性系数
+         */
+        po.setYearglyzxxs(0.0);
+
+
+        /**
+         * 综合排名
+         */
+        po.setDayRank(0);
+
+
+        /**
+         * 分数
+         */
+        po.setDayScore(0.0);
+    }
 }
 
 

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

@@ -3,7 +3,9 @@ package com.gyee.generation.service;
 
 import com.gyee.generation.init.CacheContext;
 import com.gyee.generation.model.auto.ProBasicEquipment;
+import com.gyee.generation.model.auto.ProEconEquipmentInfoDay1;
 import com.gyee.generation.model.auto.ProEconWindturbineGoodness;
+import com.gyee.generation.service.auto.IProEconEquipmentInfoDay1Service;
 import com.gyee.generation.service.auto.IProEconWindturbineGoodnessService;
 import com.gyee.generation.util.DateUtils;
 import org.springframework.stereotype.Service;
@@ -22,6 +24,10 @@ public class WindturbineGoodnessService {
     @Resource
     private IProEconWindturbineGoodnessService proEconWindturbineGoodnessService;
 
+    @Resource
+    private IProEconEquipmentInfoDay1Service proEconEquipmentInfoDay1Service;
+
+
     public void calWindturbineGoodness(Date recordDate) throws Exception {
 
 
@@ -44,14 +50,21 @@ public class WindturbineGoodnessService {
         for(ProBasicEquipment wt: CacheContext.wtls)
         {
 
-            Map<String, Map<String, Double>> coefficientMap=coefficientService.coefficient(wt.getId(),recordDate);
-            Map<String, Map<String,Double>> fitMap=goodnessOfFitService.goodnessOfFit(wt.getId(),recordDate);
+            Map<String, Map<String, Double>> coefficientMap=coefficientService.coefficient(wt.getId(),DateUtils.truncate(recordDate));
+            Map<String, Map<String,Double>> fitMap=goodnessOfFitService.goodnessOfFit(wt.getId(),DateUtils.truncate(recordDate));
+
+          List<ProEconEquipmentInfoDay1> day1ls=  proEconEquipmentInfoDay1Service.list().stream().filter(i->
+                    i.getWindturbineId().equals(wt.getId())
+            && i.getRecordDate().compareTo(DateUtils.truncate(recordDate))==0
+            ).collect(Collectors.toList());
+
             ProEconWindturbineGoodness po=new ProEconWindturbineGoodness();
             po.setModelId(wt.getModelId());
             po.setWindturbineId(wt.getId());
             po.setRecordDate(DateUtils.truncate(recordDate));
             po.setWindtpowerstationId(wt.getWindpowerstationId());
             po.setCompanyId(wt.getCompanyId());
+
             if(wt.getWindpowerstationId().contains("FDC"))
             {
                 po.setTypes("-1");
@@ -65,6 +78,16 @@ public class WindturbineGoodnessService {
             po.setDayCoefficient(0.0);
             po.setMonthCoefficient(0.0);
             po.setYearCoefficient(0.0);
+            po.setDaySpeed(0.0);
+            po.setMonthSpeed(0.0);
+            po.setYearSpeed(0.0);
+
+            if(!day1ls.isEmpty())
+            {
+                po.setDaySpeed(day1ls.get(0).getRpjfs());
+                po.setMonthSpeed(day1ls.get(0).getYpjfs());
+                po.setYearSpeed(day1ls.get(0).getYpjfs());
+            }
             if(fitMap.containsKey(wt.getId()))
             {
                 Map<String, Double> map=fitMap.get(wt.getId());

+ 33 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/IProEconWpwindDayInfoService.java

@@ -0,0 +1,33 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.ProEconWpwindDayInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 1、日风向平均风速
+2、日风向最大风速
+3、日风向次数
+4、日风向频率
+5、日风向静风次数
+6、日风向静风频率
+7、月风向平均风速
+8、月风向最大风速
+9、月风向次数
+10、月风向频率
+11、月风向静风次数
+12、月风向静风频率
+13、年风向平均风速
+14、年风向最大风速
+15、年风向次数
+16、年风向频率
+17、年风向静风次数
+18、年风向静风频率 服务类
+ * </p>
+ *
+ * @author shilin
+ * @since 2022-11-25
+ */
+public interface IProEconWpwindDayInfoService extends IService<ProEconWpwindDayInfo> {
+
+}

+ 37 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProEconWpwindDayInfoServiceImpl.java

@@ -0,0 +1,37 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.ProEconWpwindDayInfo;
+import com.gyee.generation.mapper.auto.ProEconWpwindDayInfoMapper;
+import com.gyee.generation.service.auto.IProEconWpwindDayInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 1、日风向平均风速
+2、日风向最大风速
+3、日风向次数
+4、日风向频率
+5、日风向静风次数
+6、日风向静风频率
+7、月风向平均风速
+8、月风向最大风速
+9、月风向次数
+10、月风向频率
+11、月风向静风次数
+12、月风向静风频率
+13、年风向平均风速
+14、年风向最大风速
+15、年风向次数
+16、年风向频率
+17、年风向静风次数
+18、年风向静风频率 服务实现类
+ * </p>
+ *
+ * @author shilin
+ * @since 2022-11-25
+ */
+@Service
+public class ProEconWpwindDayInfoServiceImpl extends ServiceImpl<ProEconWpwindDayInfoMapper, ProEconWpwindDayInfo> implements IProEconWpwindDayInfoService {
+
+}

+ 123 - 121
realtime/generationXK-service/src/main/java/com/gyee/generation/service/initalcache/CacheService.java

@@ -50,116 +50,118 @@ public class CacheService {
 
 
     public void initRedisCache(){
-//        log.info("--------------------------redisWT");
-//        List<ProBasicEquipment> windturbineList = windturbineService.list().stream().filter(i->i.getIsable().equals(1)).collect(Collectors.toList());
-//        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);
-//            windturbinetestingpointai2List.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("--------------------------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());
+        log.info("--------------------------redisWT");
+        List<ProBasicEquipment> windturbineList = windturbineService.list().stream().filter(i->i.getIsable().equals(1)).collect(Collectors.toList());
+        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);
+            windturbinetestingpointai2List.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("--------------------------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());
-//        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> 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);
-//        });
+        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("--------------------------redis理论保证功率");
         Map<String, Map<Double,ProBasicModelPowerRd>> powerrdMap = new HashMap<>();
 
@@ -175,18 +177,18 @@ public class CacheService {
         });
         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->{
-//            if (sszztMap.containsKey(w.getWindturbineId())){
-//                sszztMap.get(w.getWindturbineId()).add(w);
-//            }else {
-//                List<ProBasicStatusPoint> wdisList = new ArrayList<>();
-//                wdisList.add(w);
-//                sszztMap.put(w.getWindturbineId(),wdisList);
-//            }
-//        });
-//        redisService.set("SSZZT",JSONObject.toJSONString(sszztMap));
+        log.info("--------------------------redis十三种状态");
+        Map<String,List<ProBasicStatusPoint>> sszztMap = new HashMap<>();
+        List<ProBasicStatusPoint> windturbinestatusdis = proBasicStatusPointService.list();
+        windturbinestatusdis.stream().forEach(w->{
+            if (sszztMap.containsKey(w.getWindturbineId())){
+                sszztMap.get(w.getWindturbineId()).add(w);
+            }else {
+                List<ProBasicStatusPoint> wdisList = new ArrayList<>();
+                wdisList.add(w);
+                sszztMap.put(w.getWindturbineId(),wdisList);
+            }
+        });
+        redisService.set("SSZZT",JSONObject.toJSONString(sszztMap));
     }
 }

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

@@ -9,8 +9,8 @@ spring:
     allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
   #redis集群
   redis:
-    #host: 127.0.0.1
-    host: 192.168.11.250
+    host: 124.70.18.168
+    #host: 192.168.11.250
     port: 6379
     timeout: 100000
     #    集群环境打开下面注释,单机不需要打开
@@ -19,7 +19,7 @@ spring:
 #      nodes: 10.83.68.151:6379,10.83.68.152:6379,10.83.68.153:6379,10.83.68.154:6379,10.83.68.155:6379,10.83.68.156:6379,10.83.68.157:6379,10.83.68.158:6379,10.83.68.159:6379
 #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
 #      maxRedirects: 3
-    password:
+    password: gdnxfd123
     application:
       name: test
     jedis:
@@ -28,18 +28,18 @@ spring:
         min-idle: 0
         max-idle: 8
         max-wait: -1
-    database: 9
+    database: 0
   autoconfigure:
     exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
     driver-class-name: org.postgresql.Driver
-    url: jdbc:postgresql://192.168.11.248:5432/IMS_NEM_SD?rewriteBatchedStatements=true
+#    url: jdbc:postgresql://192.168.11.248:5432/IMS_NEM_SD?rewriteBatchedStatements=true
+#    username: postgres
+#    password: postgres
+    url: jdbc:postgresql://124.70.75.91:5432/jn_test
     username: postgres
-    password: postgres
-#    url: jdbc:postgresql://120.46.148.180:5432/postgres
-#    username: gdprod
-#    password: gd123
+    password: gd123
     oracle-schema=:
     #    type: com.alibaba.druid.pool.DruidDataSource
     #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
@@ -87,8 +87,8 @@ logging:
     com.example: debug
 #db url
 db:
-  #url: http://127.0.0.1:8011/ts
-  url: http://192.168.11.250:8011/ts
+  url: http://127.0.0.1:8011/ts
+  #url: http://192.168.11.250:8011/ts
 #参与计算的场站
 #runWindpowerstation: SD_GDDL_RZLX_FDC_STA,SD_GDDL_QDJN_FDC_STA,SD_GDDL_WHWD_FDC_STA,SD_GDDL_WHXQ_FDC_STA,SD_GDDL_RZWL_FDC_STA,SD_GDDL_WFZC_FDC_STA,SD_GDDL_DZXJ_FDC_STA,SD_GDDL_XTTA_FDC_STA,SD_GDDL_BH1_FDC_STA,SD_GDDL_BH2_FDC_STA,SD_GDDL_CG_FDC_STA,SD_GDDL_FJ_FDC_STA,SD_GDDL_YS_FDC_STA,SD_GDDL_FXFC_FDC_STA,SD_GDDL_JNSS_FDC_STA,SD_GDDL_WFBH_FDC_STA,SD_GDDL_PLHS_FDC_STA,SD_GDDL_JNCQ_FDC_STA,SD_GDDL_LXLN_FDC_STA,SD_GDDL_LQJS_FDC_STA,SD_GDDL_ZYXD_FDC_STA,SD_GDDL_ZYFS_FDC_STA
 runWindpowerstation: SD_GDDL_RZLX_FDC_STA

+ 34 - 4
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/config/CacheContext.java

@@ -50,6 +50,9 @@ public class CacheContext implements CommandLineRunner {
     @Autowired
     private IProBasicSquareService proBasicSquareService;
 
+    @Autowired
+    private IProBasicWeatherStationService proBasicWeatherStationService;//气象站
+
     //集团
     public static Map<String, ProBasicEnergyGroup> energymap = new HashMap<>();
     public static List<ProBasicEnergyGroup> groups = new ArrayList<>();
@@ -92,10 +95,15 @@ public class CacheContext implements CommandLineRunner {
     public static Map<String, ProBasicSubStation> subStationMap = new HashMap<>();
     public static Map<String, List<ProBasicSubStation>> poSubStationMap = new HashMap<>();//更据场站分组
 
+    public static List<ProBasicWeatherStation> wsStations = new ArrayList<>();
+    public static Map<String, ProBasicWeatherStation> wsStationMap = new HashMap<>();
+    public static Map<String, List<ProBasicWeatherStation>> poWsStationMap = new HashMap<>();//更据场站分组
 
     //方阵
     public static List<ProBasicSquare> squares = new ArrayList<>();
     public static Map<String, ProBasicSquare> squareMap = new HashMap<>();
+    public static Map<String, List<ProBasicSquare>> poSquareMap = new HashMap<>();
+
 
 
 
@@ -128,6 +136,9 @@ public class CacheContext implements CommandLineRunner {
         //方阵
         initSquaresList();
 
+        //气象站
+        initWsStationList();
+
         System.out.println(">>>>>>>>>>>>>>>数据缓存完成<<<<<<<<<<<<<<");
 
     }
@@ -251,7 +262,7 @@ public class CacheContext implements CommandLineRunner {
     }
 
     /**
-     * 初始化线路数据
+     * 初始化变电所数据
      */
     public void initSubStationList(){
         //清理集合数据
@@ -272,15 +283,34 @@ public class CacheContext implements CommandLineRunner {
     /**
      * 初始化方阵数据
      */
-    public void initSquaresList(){
+    public void initSquaresList() {
         squares.clear();
         squareMap.clear();
         squares = proBasicSquareService.list();
-        squares.stream().forEach(i->{
-            squareMap.put(i.getId(),i);
+        squares.stream().forEach(i -> {
+            squareMap.put(i.getId(), i);
         });
+        poSquareMap = squares.stream().collect(Collectors.groupingBy(ProBasicSquare::getWindpowerstationId));
     }
 
 
+    /**
+     * 初始化气象站数据
+     */
+    public void initWsStationList(){
+        //清理集合数据
+        wsStations.clear();
+        wsStationMap.clear();
+        poWsStationMap.clear();
+
+        wsStations = proBasicWeatherStationService.list();
+        wsStations.stream().forEach(s->{
+            wsStationMap.put(s.getId(),s);
+        });
+
+        poWsStationMap =  wsStations.stream().collect(Collectors.groupingBy(ProBasicWeatherStation::getWindpowerstationId));
+
+    }
+
 
 }

+ 1 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicEnergyGroupController.java

@@ -85,6 +85,7 @@ public class ProBasicEnergyGroupController {
         String[] strings = ids.split(",");
         boolean b = proBasicEnergyGroupService.removeByIds(Arrays.asList(strings));
         if (b) {
+            cacheContext.initGroupList();
             return R.ok().data(b);
         } else {
             return R.error().data("删除失败!");

+ 20 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicWeatherStationController.java

@@ -0,0 +1,20 @@
+package com.gyee.backconfig.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 气象站名称 前端控制器
+ * </p>
+ *
+ * @author wang
+ * @since 2022-11-28
+ */
+@RestController
+@RequestMapping("//pro-basic-weather-station")
+public class ProBasicWeatherStationController {
+
+}

+ 3 - 3
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProEconEquipmentmodelController.java

@@ -30,7 +30,7 @@ public class ProEconEquipmentmodelController {
     /**
      * 查询
      * @param id
-     * @param code
+     * @param nem_code
      * @param name
      * @param pageNum
      * @param pageSize
@@ -39,11 +39,11 @@ public class ProEconEquipmentmodelController {
     @GetMapping(value = "/list")
     @ApiOperation(value = "设备型号-列表", notes = "设备型号-列表")
     public R findList(@RequestParam(value = "id", required = false) String id,
-                      @RequestParam(value = "code", required = false) String code,
+                      @RequestParam(value = "nem_code", required = false) String nem_code,
                       @RequestParam(value = "name", required = false) String name,
                       @RequestParam(value = "pageNum", required = true) String pageNum,
                       @RequestParam(value = "pageSize", required = true) String pageSize) {
-        IPage<ProEconEquipmentmodel> list = proEconEquipmentmodelService.list(id, code, name, pageNum, pageSize);
+        IPage<ProEconEquipmentmodel> list = proEconEquipmentmodelService.list(id, nem_code, name, pageNum, pageSize);
         if (null != list) {
             return R.ok().data(list);
         } else {

+ 27 - 2
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProEconTestingPointController.java

@@ -118,8 +118,6 @@ public class ProEconTestingPointController {
 
     @PostMapping(value = "/generateSubStationPoint")
     @ApiOperation(value = "变电所测点生成", notes = "变电所测点生成")
-    @ApiImplicitParams({ @ApiImplicitParam(name = "points", value = "统一编码", required = true, dataType = "string[]", paramType = "query"),
-            @ApiImplicitParam(name = "station", value = "变电所id", required = true, dataType = "string", paramType = "query")})
     public R generateSubStationPoint(@RequestParam(value = "points", required = false) String[] points,
                            @RequestParam(value = "station", required = false) String station) {
         try {
@@ -131,4 +129,31 @@ public class ProEconTestingPointController {
         return R.ok().data(true);
     }
 
+
+    @PostMapping(value = "/generateWsStationPoint")
+    @ApiOperation(value = "气象站测点生成", notes = "气象站测点生成")
+    public R generateWsStationPoint(@RequestParam(value = "points", required = false) String[] points,
+                                     @RequestParam(value = "station", required = false) String station) {
+        try {
+            proEconTestingPointService.generateWsStationPoint(station,points);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.error();
+        }
+        return R.ok().data(true);
+    }
+
+
+    @PostMapping(value = "/generateWsStationPoint")
+    @ApiOperation(value = "光伏阵区测点生成", notes = "光伏阵区测点生成")
+    public R generateSquareStationPoint(@RequestParam(value = "points", required = false) String[] points,
+                                    @RequestParam(value = "station", required = false) String station) {
+        try {
+            proEconTestingPointService.generateSquareStationPoint(station,points);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.error();
+        }
+        return R.ok().data(true);
+    }
 }

+ 16 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/mapper/auto/ProBasicWeatherStationMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.backconfig.mapper.auto;
+
+import com.gyee.backconfig.model.auto.ProBasicWeatherStation;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 气象站名称 Mapper 接口
+ * </p>
+ *
+ * @author wang
+ * @since 2022-11-28
+ */
+public interface ProBasicWeatherStationMapper extends BaseMapper<ProBasicWeatherStation> {
+
+}

+ 61 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/model/auto/ProBasicWeatherStation.java

@@ -0,0 +1,61 @@
+package com.gyee.backconfig.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 气象站名称
+ * </p>
+ *
+ * @author wang
+ * @since 2022-11-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value="ProBasicWeatherStation对象", description="气象站名称")
+public class ProBasicWeatherStation extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "编号")
+    private String id;
+
+    @ApiModelProperty(value = "编码")
+    private String nemCode;
+
+    @ApiModelProperty(value = "名称")
+    private String name;
+
+    @ApiModelProperty(value = "别名")
+    private String aname;
+
+    @ApiModelProperty(value = "风场编号")
+    private String windpowerstationId;
+
+    @ApiModelProperty(value = "顺序")
+    private Integer orderNum;
+
+    @ApiModelProperty(value = "是否可用")
+    private Integer isAble;
+
+    @ApiModelProperty(value = "备用1")
+    private String spare1;
+
+    @ApiModelProperty(value = "备用2")
+    private String spare2;
+
+    @ApiModelProperty(value = "备用3")
+    private String spare3;
+
+    @ApiModelProperty(value = "备用4")
+    private String spare4;
+
+    private BigDecimal capacity;
+
+
+}

+ 6 - 1
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/model/auto/ProEconEquipmentmodel.java

@@ -33,7 +33,7 @@ public class ProEconEquipmentmodel extends Model {
     /**
      * 编码
      */
-    private String code;
+    private String nem_code;
 
     /**
      * 名称
@@ -41,6 +41,11 @@ public class ProEconEquipmentmodel extends Model {
     private String name;
 
     /**
+     * 名称
+     */
+    private String aname;
+
+    /**
      * 描述
      */
     private String description;

+ 16 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicWeatherStationService.java

@@ -0,0 +1,16 @@
+package com.gyee.backconfig.service.auto;
+
+import com.gyee.backconfig.model.auto.ProBasicWeatherStation;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 气象站名称 服务类
+ * </p>
+ *
+ * @author wang
+ * @since 2022-11-28
+ */
+public interface IProBasicWeatherStationService extends IService<ProBasicWeatherStation> {
+
+}

+ 1 - 1
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProEconEquipmentmodelService.java

@@ -13,5 +13,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @since 2022-10-15
  */
 public interface IProEconEquipmentmodelService extends IService<ProEconEquipmentmodel> {
-    IPage<ProEconEquipmentmodel> list (String id, String code, String name,String pageNum, String pageSize);
+    IPage<ProEconEquipmentmodel> list (String id, String nem_code, String name,String pageNum, String pageSize);
 }

+ 4 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProEconTestingPointService.java

@@ -18,6 +18,10 @@ public interface IProEconTestingPointService extends IService<ProEconTestingPoin
 
      void generateSubStationPoint(String station,String[] points);
 
+     void generateWsStationPoint(String station,String[] points);
+
+     void generateSquareStationPoint(String station,String[] points);
+
      IPage<ProEconTestingPoint> list (String id,String nemCode, String name,String model,String uniformCode, String isDisplay,String pageNum, String pageSize);
 
 

+ 20 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicWeatherStationServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.backconfig.service.auto.impl;
+
+import com.gyee.backconfig.model.auto.ProBasicWeatherStation;
+import com.gyee.backconfig.mapper.auto.ProBasicWeatherStationMapper;
+import com.gyee.backconfig.service.auto.IProBasicWeatherStationService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 气象站名称 服务实现类
+ * </p>
+ *
+ * @author wang
+ * @since 2022-11-28
+ */
+@Service
+public class ProBasicWeatherStationServiceImpl extends ServiceImpl<ProBasicWeatherStationMapper, ProBasicWeatherStation> implements IProBasicWeatherStationService {
+
+}

+ 3 - 3
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProEconEquipmentmodelServiceImpl.java

@@ -22,13 +22,13 @@ import org.springframework.stereotype.Service;
 public class ProEconEquipmentmodelServiceImpl extends ServiceImpl<ProEconEquipmentmodelMapper, ProEconEquipmentmodel> implements IProEconEquipmentmodelService {
 
     @Override
-    public IPage<ProEconEquipmentmodel> list(String id, String code, String name, String pageNum, String pageSize) {
+    public IPage<ProEconEquipmentmodel> list(String id, String nem_code, String name, String pageNum, String pageSize) {
         QueryWrapper<ProEconEquipmentmodel> qw = new QueryWrapper<>();
         if (StringUtils.isNotEmpty(id)) {
             qw.eq("id", id);
         }
-        if (StringUtils.isNotEmpty(code)) {
-            qw.like(code, "code");
+        if (StringUtils.isNotEmpty(nem_code)) {
+            qw.like(nem_code, "code");
         }
         if (StringUtils.isNotEmpty(name)) {
             qw.like(name, "name");

+ 237 - 23
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProEconTestingPointServiceImpl.java

@@ -62,7 +62,6 @@ public class ProEconTestingPointServiceImpl extends ServiceImpl<ProEconTestingPo
             proBasicEquipmentPointService.batchAddEquipmentPoint(equipmentPoints);
             proBasicPowerstationPointService.batchAddPowerstationPoints(powerstationPoints);
 
-            generateSubStationPoint(station,setpoints);
 
     }
 
@@ -76,6 +75,21 @@ public class ProEconTestingPointServiceImpl extends ServiceImpl<ProEconTestingPo
     }
 
     @Override
+    public void generateWsStationPoint(String station, String[] points) {
+        List<ProBasicPowerstationPoint>  wsStationPoint = initalWs(station,points);
+
+        proBasicPowerstationPointService.batchAddPowerstationPoints(wsStationPoint);
+    }
+
+    @Override
+    public void generateSquareStationPoint(String station, String[] points) {
+        List<ProBasicPowerstationPoint>  ssStationPoint = initalSs(station,points);
+
+        proBasicPowerstationPointService.batchAddPowerstationPoints(ssStationPoint);
+
+    }
+
+    @Override
     public IPage<ProEconTestingPoint> list(String id, String nemCode, String name, String model, String uniformCode, String isDisplay, String pageNum, String pageSize) {
         QueryWrapper<ProEconTestingPoint> qw = new QueryWrapper<>();
         if (StringUtils.isNotEmpty(id)) {
@@ -105,16 +119,115 @@ public class ProEconTestingPointServiceImpl extends ServiceImpl<ProEconTestingPo
 
 
     /**
-     *
+     * 阵区测点
      * @param station
      * @param setpoints
      * @return
      */
-    public List<ProBasicPowerstationPoint> initalSbs(String station,String[] setpoints) {
+    public List<ProBasicPowerstationPoint> initalSs(String station,String[] setpoints) {
+        List<ProBasicPowerstationPoint> allpoints = new ArrayList<>();
+
+        List<ProEconTestingPoint> ls = proEconTestingPointService.list().stream().filter(i -> i.getTypeId().equals("zq")).collect(Collectors.toList());
+        //获取场站
+        for (ProBasicPowerstation postation : CacheContext.wpls) {
+            if (null != station && !"".equals(station) && !station.equals(postation.getId())) {
+                continue;
+            }
+
+            //获取场站下的阵区
+            List<ProBasicSquare> squaare = CacheContext.poSquareMap.get(postation.getId()).stream().filter(i -> i.getTypes().equals("jz")).collect(Collectors.toList());
+            //循环阵区生成测点code
+            for (ProBasicSquare ss : squaare) {
+                List<ProBasicPowerstationPoint> points = new ArrayList<>();
+
+                for (ProEconTestingPoint p : ls) {
+                    if (null != setpoints && setpoints.length > 0 && StringUtils.join(setpoints, "|").indexOf(p.getUniformCode()) < 0) {
+                        continue;
+                    }
+                    StringBuilder sb = new StringBuilder();
+                    String temp = ss.getId().substring(0, ss.getId().lastIndexOf("_"));
+//                    temp = temp.substring(0, temp.lastIndexOf("_"));
+//                    temp = temp.substring(temp.lastIndexOf("_") + 1);
+                    if (ss.getWindpowerstationId().indexOf("FDC") >= 0) {
+                        sb.append(temp).append("_F_");
+                    } else {
+                        sb.append(temp).append("_G_");
+                    }
+
+                    sb.append("XX_XX_XXXX_");
+                    if (p.getUniformCode().indexOf("AI") >= 0) {
+                        sb.append("AI");
+
+                    } else if (p.getUniformCode().indexOf("DI") >= 0) {
+                        sb.append("DI");
+
+                    } else {
+                        sb.append("CI");
+                    }
+                    sb.append(p.getNemCode());
+
+
+                    StringBuilder sba = new StringBuilder();
+
+                    String temp2 = postation.getCompanyId().substring(0, postation.getCompanyId().lastIndexOf("_"));
+                    temp2 = temp2.substring(temp2.indexOf("_") + 1);
+
+                    String temp3 = postation.getId().substring(0, postation.getId().lastIndexOf("_"));
+                    temp3 = temp3.substring(0, temp3.lastIndexOf("_"));
+                    temp3 = temp3.substring(temp3.lastIndexOf("_") + 1);
+                    if (postation.getId().indexOf("FDC") >= 0) {
+                        sba.append(temp2).append(temp3).append("FC");
+                    } else if (postation.getId().indexOf("GDC") >= 0) {
+                        sba.append(temp2).append(temp3).append("GC");
+                    }
+
+                    StringBuilder sbtable = new StringBuilder();
+
+
+                    if (p.getTypeId().endsWith("jsfw")) {
+                        sbtable.append(sba).append("JSFW.");
+                        sbtable.append(sb);
+                    } else {
+                        sbtable.append(sba).append(".");
+                        sbtable.append(sb);
+                    }
+                    ProBasicPowerstationPoint po = new ProBasicPowerstationPoint();
+                    po.setId(StringUtils.getUUID());
+                    if (p.getTypeId().endsWith("jsfw")) {
+                        po.setNemCode(String.valueOf(sbtable));
+                    } else {
+                    po.setNemCode("INITIAL");
+                    }
+                    sb = new StringBuilder();
+                    sb.append(ss.getName()).append(p.getName());
+                    po.setName(String.valueOf(sb));
+                    po.setWindpowerstationId(ss.getId());
+                    po.setUniformCode(p.getUniformCode());
+                    po.setTypeId(p.getTypeId());
+                    sb = new StringBuilder();
+                    sb.append(sbtable.toString().substring(0, sbtable.toString().lastIndexOf(".")));
+                    po.setRealtimeId(String.valueOf(sb));
+                    points.add(po);
+                }
+                allpoints.addAll(points);
+            }
+        }
+
+        return allpoints;
+    }
+
+
+    /**
+     * 气象站测点
+     * @param station
+     * @param setpoints
+     * @return
+     */
+    public List<ProBasicPowerstationPoint> initalWs(String station,String[] setpoints) {
         List<ProBasicPowerstationPoint> allpoints = new ArrayList<>();
 
-        List<ProEconTestingPoint> fcs = proEconTestingPointService.list().stream().filter(i -> i.getTypeId().equals("agc") || i.getTypeId().equals("agcjsfw") || i.getTypeId().equals("fggl") || i.getTypeId().equals("cft")).collect(Collectors.toList());
-        List<ProEconTestingPoint> gcs = proEconTestingPointService.list().stream().filter(i -> i.getTypeId().equals("agc") || i.getTypeId().equals("agcjsfw") || i.getTypeId().equals("fggl") || i.getTypeId().equals("qxz")).collect(Collectors.toList());
+        List<ProEconTestingPoint> fcs = proEconTestingPointService.list().stream().filter(i -> i.getTypeId().equals("fggl") || i.getTypeId().equals("cft")).collect(Collectors.toList());
+        List<ProEconTestingPoint> gcs = proEconTestingPointService.list().stream().filter(i -> i.getTypeId().equals("fggl") || i.getTypeId().equals("qxz")).collect(Collectors.toList());
         //获取场站
         for (ProBasicPowerstation postation : CacheContext.wpls) {
             if (null != station && !"".equals(station) && !station.equals(postation.getId())) {
@@ -128,6 +241,107 @@ public class ProEconTestingPointServiceImpl extends ServiceImpl<ProEconTestingPo
                 ls = gcs;
             }
 
+            //获取场站下的气象站
+            List<ProBasicWeatherStation> subStations = CacheContext.poWsStationMap.get(postation.getId());
+            //循环气象站生成测点code
+            for (ProBasicWeatherStation ws : subStations) {
+                List<ProBasicPowerstationPoint> points = new ArrayList<>();
+
+                for (ProEconTestingPoint p : ls) {
+                    if (null != setpoints && setpoints.length > 0 && StringUtils.join(setpoints, "|").indexOf(p.getUniformCode()) < 0) {
+                        continue;
+                    }
+                    StringBuilder sb = new StringBuilder();
+                    String temp = ws.getId().substring(0, ws.getId().lastIndexOf("_"));
+//                    temp = temp.substring(0, temp.lastIndexOf("_"));
+//                    temp = temp.substring(temp.lastIndexOf("_") + 1);
+                    if (ws.getWindpowerstationId().indexOf("FDC") >= 0) {
+                        sb.append(temp).append("_F_");
+                    } else {
+                        sb.append(temp).append("_G_");
+                    }
+
+                    sb.append("XX_XX_XXXX_");
+                    if (p.getUniformCode().indexOf("AI") >= 0) {
+                        sb.append("AI");
+
+                    } else if (p.getUniformCode().indexOf("DI") >= 0) {
+                        sb.append("DI");
+
+                    } else {
+                        sb.append("CI");
+                    }
+                    sb.append(p.getNemCode());
+
+
+                    StringBuilder sba = new StringBuilder();
+
+                    String temp2 = postation.getCompanyId().substring(0, postation.getCompanyId().lastIndexOf("_"));
+                    temp2 = temp2.substring(temp2.indexOf("_") + 1);
+
+                    String temp3 = postation.getId().substring(0, postation.getId().lastIndexOf("_"));
+                    temp3 = temp3.substring(0, temp3.lastIndexOf("_"));
+                    temp3 = temp3.substring(temp3.lastIndexOf("_") + 1);
+                    if (postation.getId().indexOf("FDC") >= 0) {
+                        sba.append(temp2).append(temp3).append("FC");
+                    } else if (postation.getId().indexOf("GDC") >= 0) {
+                        sba.append(temp2).append(temp3).append("GC");
+                    }
+
+                    StringBuilder sbtable = new StringBuilder();
+
+
+                    if (p.getTypeId().endsWith("jsfw")) {
+                        sbtable.append(sba).append("JSFW.");
+                        sbtable.append(sb);
+                    } else {
+                        sbtable.append(sba).append(".");
+                        sbtable.append(sb);
+                    }
+                    ProBasicPowerstationPoint po = new ProBasicPowerstationPoint();
+                    po.setId(StringUtils.getUUID());
+//                    if (p.getTypeId().indexOf("agcjsfw") >= 0 ) {
+//                        po.setNemCode(String.valueOf(sbtable));
+//                    } else {
+                    po.setNemCode("INITIAL");
+//                    }
+                    sb = new StringBuilder();
+                    sb.append(ws.getName()).append(p.getName());
+                    po.setName(String.valueOf(sb));
+                    po.setWindpowerstationId(ws.getId());
+                    po.setUniformCode(p.getUniformCode());
+                    po.setTypeId(p.getTypeId());
+                    sb = new StringBuilder();
+                    sb.append(sbtable.toString().substring(0, sbtable.toString().lastIndexOf(".")));
+                    po.setRealtimeId(String.valueOf(sb));
+                    points.add(po);
+                }
+                allpoints.addAll(points);
+            }
+        }
+
+        return allpoints;
+    }
+
+
+
+
+    /**
+     * 变电所测点
+     * @param station
+     * @param setpoints
+     * @return
+     */
+    public List<ProBasicPowerstationPoint> initalSbs(String station,String[] setpoints) {
+        List<ProBasicPowerstationPoint> allpoints = new ArrayList<>();
+
+        List<ProEconTestingPoint> ls = proEconTestingPointService.list().stream().filter(i -> i.getTypeId().equals("agc") || i.getTypeId().equals("agcjsfw") ).collect(Collectors.toList());
+        //获取场站
+        for (ProBasicPowerstation postation : CacheContext.wpls) {
+            if (null != station && !"".equals(station) && !station.equals(postation.getId())) {
+                continue;
+            }
+
             //获取场站下的变电所
             List<ProBasicSubStation> subStations = CacheContext.poSubStationMap.get(postation.getId());
             //循环变电所生成测点code
@@ -409,15 +623,15 @@ public class ProEconTestingPointServiceImpl extends ServiceImpl<ProEconTestingPo
                 List<ProBasicPowerstationPoint> points = new ArrayList<>();
                 for (int i = 0; i < pointls.size(); i++) {
                     ProEconTestingPoint stp = pointls.get(i);
-                    List<ProBasicPowerstation> groupFCRegion = CacheContext.wpmapGroupFCRegion.get(re.getId());
-                    if((null == groupFCRegion || groupFCRegion.size()<=0) && stp.getTypeId().equals(FCJSFW) ){
-                        continue;
-                    }
-
-                    List<ProBasicPowerstation> groupGCRegion = CacheContext.wpmapGroupGCRegion.get(re.getId());
-                    if((null == groupGCRegion || groupGCRegion.size()<=0) && stp.getTypeId().equals(GCJSFW) ){
-                        continue;
-                    }
+//                    List<ProBasicPowerstation> groupFCRegion = CacheContext.wpmapGroupFCRegion.get(re.getId());
+//                    if((null == groupFCRegion || groupFCRegion.size()<=0) && stp.getTypeId().equals(FCJSFW) ){
+//                        continue;
+//                    }
+//
+//                    List<ProBasicPowerstation> groupGCRegion = CacheContext.wpmapGroupGCRegion.get(re.getId());
+//                    if((null == groupGCRegion || groupGCRegion.size()<=0) && stp.getTypeId().equals(GCJSFW) ){
+//                        continue;
+//                    }
 
                     StringBuilder sb = new StringBuilder();
                     StringBuilder sbtable = new StringBuilder();
@@ -579,15 +793,15 @@ public class ProEconTestingPointServiceImpl extends ServiceImpl<ProEconTestingPo
                         points = new ArrayList<>();
                         for (int i = 0; i < pointls.size(); i++) {
                             ProEconTestingPoint stp = pointls.get(i);
-                            List<ProBasicPowerstation> groupFCCompany = CacheContext.wpmapGroupFCCompany.get(cs.getId());
-                            if((null == groupFCCompany || groupFCCompany.size()<=0) && stp.getTypeId().equals(FCJSFW) ){
-                                continue;
-                            }
-
-                            List<ProBasicPowerstation> groupGCCompany  = CacheContext.wpmapGroupGCCompany.get(cs.getId());
-                            if((null == groupGCCompany || groupGCCompany.size()<=0) && stp.getTypeId().equals(GCJSFW) ){
-                                continue;
-                            }
+//                            List<ProBasicPowerstation> groupFCCompany = CacheContext.wpmapGroupFCCompany.get(cs.getId());
+//                            if((null == groupFCCompany || groupFCCompany.size()<=0) && stp.getTypeId().equals(FCJSFW) ){
+//                                continue;
+//                            }
+//
+//                            List<ProBasicPowerstation> groupGCCompany  = CacheContext.wpmapGroupGCCompany.get(cs.getId());
+//                            if((null == groupGCCompany || groupGCCompany.size()<=0) && stp.getTypeId().equals(GCJSFW) ){
+//                                continue;
+//                            }
 
                             StringBuilder sb = new StringBuilder();
                             StringBuilder sbtable = new StringBuilder();

+ 1 - 8
web/runeconomy-xk/pom.xml

@@ -111,6 +111,7 @@
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.7.1</version>
                 <executions>
                     <execution>
                         <goals>
@@ -119,14 +120,6 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <version>2.4.2</version>
-                <configuration>
-                    <skipTests>true</skipTests>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
 </project>

+ 42 - 2
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/ProBasicEquipmentController.java

@@ -1,9 +1,15 @@
 package com.gyee.runeconomy.controller;
 
 
-import org.springframework.web.bind.annotation.RequestMapping;
+import com.gyee.runeconomy.dto.R;
+import com.gyee.runeconomy.dto.ResultMsg;
+import com.gyee.runeconomy.model.auto.ProBasicEquipment;
+import com.gyee.runeconomy.service.auto.IProBasicEquipmentService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RestController;
+import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -17,4 +23,38 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("//pro-basic-equipment")
 public class ProBasicEquipmentController {
 
+
+    @Autowired
+    private IProBasicEquipmentService proBasicEquipmentService;
+
+
+    /**
+     * 多条件获取设备列表
+     *
+     * @param companyId
+     * @param windpowerstationIds
+     * @param projectIds
+     * @param lineIds
+     * @param type
+     * @return
+     */
+    @GetMapping("equipment-list")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R getWtPowerCurveFittingList(
+            @RequestParam(value = "companyId", required = true) String companyId,
+            @RequestParam(value = "windpowerstationIds", required = false) String windpowerstationIds,
+            @RequestParam(value = "projectIds", required = false) String projectIds,
+            @RequestParam(value = "lineIds", required = false) String lineIds,
+            @RequestParam(value = "type", required = false) String type) {
+
+        List<ProBasicEquipment> list = proBasicEquipmentService.getProBasicEquipmentList(companyId, windpowerstationIds, projectIds, lineIds, type);
+
+        if (null != list) {
+            return R.data(ResultMsg.ok(list));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
 }

+ 110 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/ProEconEquipmentInfoDayTopController.java

@@ -0,0 +1,110 @@
+package com.gyee.runeconomy.controller;
+
+
+import com.gyee.runeconomy.dto.R;
+import com.gyee.runeconomy.dto.ResultMsg;
+import com.gyee.runeconomy.model.auto.ProEconEquipmentInfoDayTop;
+import com.gyee.runeconomy.service.auto.IProEconEquipmentInfoDayTopService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 风机日信息表排行 前端控制器
+ * </p>
+ *
+ * @author wang
+ * @since 2022-11-25
+ */
+@RestController
+@RequestMapping("//pro-econ-equipment-info-day-top")
+@Api(value = "风机信息表排行", tags = "风机信息表排行")
+public class ProEconEquipmentInfoDayTopController {
+
+
+    @Autowired
+    private IProEconEquipmentInfoDayTopService proEconEquipmentInfoDayTopService;
+
+
+    /**
+     * 风机信息量化评级管理
+     *
+     * @param companyId
+     * @param types
+     * @param staType
+     * @return
+     */
+    @GetMapping(value = "/equipmentinfo-day-list")
+    @ApiOperation(value = "风机信息量化评级管理列表", notes = "风机信息量化评级管理列表")
+    public R getEquipmentInfoDayTopList(
+            @RequestParam(value = "companyId", required = false) String companyId,
+            @RequestParam(value = "windpowerstationId", required = false) String windpowerstationId,
+            @RequestParam(value = "types", required = true) Integer types,
+            @RequestParam(value = "staType", required = true) String staType,
+            @RequestParam(value = "date", required = true) String date) {
+
+        List<ProEconEquipmentInfoDayTop> list = proEconEquipmentInfoDayTopService.getEquipmentInfoDayTopList(companyId, windpowerstationId, types, staType, date);
+        if (null != list) {
+            return R.data(ResultMsg.ok(list));
+        } else {
+            return R.data(ResultMsg.error());
+        }
+    }
+
+    /**
+     * 风机信息量化评级管理单机历史记录
+     *
+     * @param windturbineId
+     * @param types
+     * @param beginDate
+     * @param endDate
+     * @return
+     */
+    @GetMapping(value = "/equipmentinfo-day-history-list")
+    @ApiOperation(value = "风机信息量化评级管理历史记录", notes = "风机信息量化评级管理历史记录")
+    public R getEquipmentInfoDayTopHistoryList(
+            @RequestParam(value = "windturbineId", required = false) String windturbineId,
+            @RequestParam(value = "types", required = true) Integer types,
+            @RequestParam(value = "beginDate", required = true) String beginDate,
+            @RequestParam(value = "endDate", required = true) String endDate) {
+
+        List<ProEconEquipmentInfoDayTop> list = proEconEquipmentInfoDayTopService.getEquipmentInfoDayTopHistoryList(windturbineId, types, beginDate, endDate);
+        if (null != list) {
+            return R.data(ResultMsg.ok(list));
+        } else {
+            return R.data(ResultMsg.error());
+        }
+    }
+
+
+    /**
+     * 风机信息量化评级比较
+     *
+     * @param ids
+     * @return
+     */
+    @GetMapping(value = "/equipmentinfo-day-compare-list")
+    @ApiOperation(value = "风机信息量化评级比较", notes = "风机信息量化评级比较")
+    public R getEquipmentInfoDayTopCompareList(
+            @RequestParam(value = "ids", required = true) List<Long> ids,
+            @RequestParam(value = "types", required = true) Integer types) {
+
+        Map<String, Object> map = proEconEquipmentInfoDayTopService.getEquipmentInfoDayTopCompareList(ids,types);
+        if (null != map) {
+            return R.data(ResultMsg.ok(map));
+        } else {
+            return R.data(ResultMsg.error());
+        }
+    }
+
+
+}

+ 26 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/ProEconPointCodeController.java

@@ -1,10 +1,19 @@
 package com.gyee.runeconomy.controller;
 
 
+import com.gyee.runeconomy.dto.R;
+import com.gyee.runeconomy.dto.ResultMsg;
+import com.gyee.runeconomy.model.auto.ProEconPointCode;
+import com.gyee.runeconomy.service.auto.IProEconPointCodeService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.List;
+
 /**
  * <p>
  * 指标查询表 前端控制器
@@ -17,4 +26,21 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("//pro-econ-point-code")
 public class ProEconPointCodeController {
 
+
+    @Autowired
+    private IProEconPointCodeService proEconPointCodeService;
+
+
+    @GetMapping(value = "/point_code_list")
+    @ApiOperation(value = "指标点", notes = "指标点")
+    public R getEconPointCodeList(){
+
+        List<ProEconPointCode> list = proEconPointCodeService.getEconPointCodeList();
+        if (null != list) {
+            return R.data(ResultMsg.ok(list));
+        } else {
+            return R.data(ResultMsg.error());
+        }
+    }
+
 }

+ 140 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/bmk/BenchmarkingController.java

@@ -6,6 +6,7 @@ package com.gyee.runeconomy.controller.bmk;/*
 import com.gyee.common.model.StringUtils;
 import com.gyee.common.vo.benchmark.FjjxbVo;
 import com.gyee.common.vo.benchmark.FjjxbmxVo;
+import com.gyee.common.vo.benchmark.WxsslVo;
 import com.gyee.runeconomy.dto.R;
 import com.gyee.runeconomy.dto.ResultMsg;
 import com.gyee.runeconomy.model.auto.ProBasicCompany;
@@ -13,6 +14,7 @@ import com.gyee.runeconomy.model.auto.ProBasicLine;
 import com.gyee.runeconomy.model.auto.ProBasicPowerstation;
 import com.gyee.runeconomy.model.auto.ProBasicProject;
 import com.gyee.runeconomy.service.bmk.BenchmarkingService;
+import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.*;
 
@@ -21,6 +23,7 @@ import java.util.List;
 
 @RestController
 @RequestMapping("//benchmarking")
+@Api(value = "对标管理",tags =  "对标管理")
 public class BenchmarkingController {
 
     @Resource
@@ -108,4 +111,140 @@ public class BenchmarkingController {
             return R.error(ResultMsg.error());
         }
     }
- }
+
+
+    @GetMapping("/wxssl")
+    @ResponseBody
+    @ApiOperation(value = "五项损失率", notes = "五项损失率")
+    public R wxssl(@RequestParam(value = "companys",required = true) String companys,
+                   @RequestParam(value = "type",required = true) String type,
+                    @RequestParam(value = "wpids",required = true) String wpids,
+                   @RequestParam(value = "projectids",required = true) String projectids,
+                   @RequestParam(value = "lineids",required = true) String lineids,
+                   @RequestParam(value = "beginDate",required = true) String beginDate,
+                   @RequestParam(value = "endDate",required = true) String endDate,
+                   @RequestParam(value = "target",required = true) String target,
+                   @RequestParam(value = "sort",required = true) String sort
+    ){
+        List<WxsslVo> resultList = benchmarkingService.wxssl(companys,type,wpids,projectids,lineids,beginDate,endDate,target,sort);
+
+        if (StringUtils.isNotNull(resultList)) {
+            return R.data(ResultMsg.ok(resultList));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
+    @GetMapping("/cndb")
+    @ResponseBody
+    @ApiOperation(value = "场内对标", notes = "场内对标")
+    public R cndb(@RequestParam(value = "companys",required = true) String companys,
+                  @RequestParam(value = "type",required = true) String type,
+                  @RequestParam(value = "wpid",required = true) String wpid,
+                  @RequestParam(value = "beginDate",required = true) String beginDate,
+                  @RequestParam(value = "endDate",required = true) String endDate,
+                  @RequestParam(value = "target",required = true) String target,
+                  @RequestParam(value = "sort",required = true) String sort
+    ){
+        List<WxsslVo> resultList = benchmarkingService.cndb(companys,type,wpid,beginDate,endDate,target,sort);
+
+        if (StringUtils.isNotNull(resultList)) {
+            return R.data(ResultMsg.ok(resultList));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
+
+    @GetMapping("/cjdb")
+    @ResponseBody
+    @ApiOperation(value = "场际对标", notes = "场际对标")
+    public R cjdb(@RequestParam(value = "companys",required = true) String companys,
+                  @RequestParam(value = "type",required = true) String type,
+                  @RequestParam(value = "wpids",required = true) String wpids,
+                  @RequestParam(value = "beginDate",required = true) String beginDate,
+                  @RequestParam(value = "endDate",required = true) String endDate,
+                  @RequestParam(value = "target",required = true) String target,
+                  @RequestParam(value = "sort",required = true) String sort
+    ){
+        List<WxsslVo> resultList = benchmarkingService.cjdb(companys,type,wpids,beginDate,endDate,target,sort);
+
+        if (StringUtils.isNotNull(resultList)) {
+            return R.data(ResultMsg.ok(resultList));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
+
+    @GetMapping("/xmdb")
+    @ResponseBody
+    @ApiOperation(value = "项目对标", notes = "项目对标")
+    public R xmdb(@RequestParam(value = "companys",required = true) String companys,
+                  @RequestParam(value = "type",required = true) String type,
+                  @RequestParam(value = "wpids",required = true) String wpids,
+                  @RequestParam(value = "projectids",required = true) String projectids,
+                  @RequestParam(value = "beginDate",required = true) String beginDate,
+                  @RequestParam(value = "endDate",required = true) String endDate,
+                  @RequestParam(value = "target",required = true) String target,
+                  @RequestParam(value = "sort",required = true) String sort
+    ){
+        List<WxsslVo> resultList = benchmarkingService.xmdb(companys,type,wpids,projectids,beginDate,endDate,target,sort);
+
+        if (StringUtils.isNotNull(resultList)) {
+            return R.data(ResultMsg.ok(resultList));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
+
+    @GetMapping("/xldb")
+    @ResponseBody
+    @ApiOperation(value = "线路对标", notes = "线路对标")
+    public R xldb(@RequestParam(value = "companys",required = true) String companys,
+                  @RequestParam(value = "type",required = true) String type,
+                  @RequestParam(value = "wpids",required = true) String wpids,
+                  @RequestParam(value = "projectids",required = true) String projectids,
+                  @RequestParam(value = "lineids",required = true) String lineids,
+                  @RequestParam(value = "beginDate",required = true) String beginDate,
+                  @RequestParam(value = "endDate",required = true) String endDate,
+                  @RequestParam(value = "target",required = true) String target,
+                  @RequestParam(value = "sort",required = true) String sort
+    ){
+        List<WxsslVo> resultList = benchmarkingService.xldb(companys,type,wpids,projectids,lineids,beginDate,endDate,target,sort);
+
+        if (StringUtils.isNotNull(resultList)) {
+            return R.data(ResultMsg.ok(resultList));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
+
+    /**
+     * 对标页面详情
+     * @param beginDate
+     * @param endDate
+     * @return
+     */
+    @GetMapping("/details")
+    @ResponseBody
+    @ApiOperation(value = "对标详情", notes = "对标详情")
+    public R details(@RequestParam(value = "id",required = true)String id,
+                     @RequestParam(value = "beginDate",required = true)String beginDate,
+                     @RequestParam(value = "endDate",required = true)String endDate,
+                     @RequestParam(value = "target",required = true) String target,
+                     @RequestParam(value = "sort",required = true) String sort
+    ){
+        List<WxsslVo> resultList =  benchmarkingService.details(id,beginDate,endDate,target,sort);
+
+        if (StringUtils.isNotNull(resultList)) {
+            return R.data(ResultMsg.ok(resultList));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
+
+}

+ 2 - 2
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/goodness/WindpowerDetailChartController.java

@@ -23,10 +23,10 @@ import java.util.Map;
 @RequestMapping("/goodness")
 @Api(value = "风场风资源图表", tags = "风场风资源图表")
 public class WindpowerDetailChartController {
-   
+
     @Resource
     private WpwindDayInfoService wpwindDayInfoService;
-    
+
 
     /*
      * 风场日最大风速

文件差异内容过多而无法显示
+ 176 - 875
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/goodness/WindturbineDetailChartController.java


+ 313 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/goodness/WindturbineDetailLineChartController.java

@@ -0,0 +1,313 @@
+package com.gyee.runeconomy.controller.goodness;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.gyee.common.util.DateUtils;
+import com.gyee.common.vo.benchmark.DataVo;
+import com.gyee.runeconomy.dto.EchartDataVo;
+import com.gyee.runeconomy.dto.R;
+import com.gyee.runeconomy.dto.ResultMsg;
+import com.gyee.runeconomy.model.auto.ProEconBrownoutsEvent2;
+import com.gyee.runeconomy.model.auto.ProEconInOrOutSpeedTotal;
+import com.gyee.runeconomy.model.auto.ProEconShutdownEvent2;
+import com.gyee.runeconomy.service.BrownoutsEvent2Service;
+import com.gyee.runeconomy.service.ShutdownEvent2Service;
+import com.gyee.runeconomy.service.auto.IProEconInOrOutSpeedTotalService;
+import com.gyee.runeconomy.service.goodness.WindturbinegoodnessService;
+import com.gyee.runeconomy.util.StringUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * 风机区间图表功能展示
+ */
+@Controller
+@RequestMapping("/goodness")
+@Api(value = "单机信息总览风机区间图表",tags =  "单机信息总览风机区间图表")
+public class WindturbineDetailLineChartController {
+    @Resource
+    private WindturbinegoodnessService windturbinegoodnessService;
+    @Resource
+    private IProEconInOrOutSpeedTotalService proEconInOrOutSpeedTotalService;
+
+    @Resource
+    private ShutdownEvent2Service shutdownEvent2Service;
+    @Resource
+    private BrownoutsEvent2Service brownoutsEvent2Service;
+
+
+    /**
+     * 获得功率曲线数据查询
+     *
+     * @param wtId
+     * @param recorddate
+     * @return
+     * @throws Exception
+     */
+    @GetMapping("/findWtRealPowerChar")
+    @ResponseBody
+    @ApiOperation(value = "查询功率曲线数据信息", notes = "查询功率曲线数据信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+
+    public R findWtRealPowerChar(String wtId, String recorddate) throws Exception {
+        Date date = DateUtils.parseDate(recorddate);
+        List<DataVo> result = windturbinegoodnessService.findWtRealPowerChar(wtId, date);
+
+//
+//        System.out.println( JSONArray.toJSON(result));
+
+        if (null != result) {
+            return R.data(ResultMsg.ok(result));
+        } else {
+            return R.data(ResultMsg.error());
+        }
+    }
+    /**
+     * 获得曲线区间区分功能数据查询
+     *
+     * @param wtId
+     * @param recorddate
+     * @return
+     * @throws Exception
+     */
+    @GetMapping("/getplotBands")
+    @ResponseBody
+    @ApiOperation(value = "获得曲线区间区分功能数据", notes = "获得曲线区间区分功能数据")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+
+    public R getplotBands(String wtId, String recorddate) throws Exception {
+        Date date = DateUtils.parseDate(recorddate);
+        List<List<EchartDataVo>> result = windturbinegoodnessService.getplotBands(wtId, date);
+
+        if (null != result) {
+            return R.data(ResultMsg.ok(result));
+        } else {
+            return R.data(ResultMsg.error());
+        }
+    }
+
+    /**
+     * 获取切入风速
+     *
+     * @param wtId
+     * @param recorddate
+     * @return
+     * @throws Exception
+     */
+    @GetMapping("/getInputSmall")
+    @ResponseBody
+    @ApiOperation(value = "获取切入风速", notes = "获取切入风速")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+
+    public R getInputSmall(String wtId, String recorddate) throws Exception {
+        Date date = DateUtils.parseDate(recorddate);
+        double inputsmall=0.0;
+        List<ProEconInOrOutSpeedTotal> ls = proEconInOrOutSpeedTotalService.list().stream().filter(i->
+                i.getWindturbineId().equals(wtId)
+                && i.getRecordDate().compareTo(DateUtils.truncate(date))==0
+        ).collect(Collectors.toList());
+        if(!ls.isEmpty())
+        {
+            ProEconInOrOutSpeedTotal is=ls.get(0);
+            if(StringUtils.notEmp(is) && StringUtils.notEmp(is.getMonthInputSmall()) )
+            {
+                inputsmall=is.getMonthInputSmall();
+            }else
+            {
+                inputsmall=3.0;
+            }
+
+        }
+        return R.data(ResultMsg.ok(inputsmall));
+    }
+
+    /**
+     * 获取24小时功率曲线
+     *
+     * @param wtId
+     * @param recorddate
+     * @return
+     * @throws Exception
+     */
+    @GetMapping("/findRealPowerCharBy24")
+    @ResponseBody
+    @ApiOperation(value = "获取24小时功率曲线", notes = "获取24小时功率曲线")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+
+    public R findRealPowerCharBy24(String wtId, String recorddate) throws Exception {
+        List<DataVo> resultList = new ArrayList<>();
+        if (StringUtils.notEmp(recorddate) && StringUtils.notEmp(wtId)) {
+
+            resultList = windturbinegoodnessService.findRealPowerCharBy24(wtId, DateUtils.parseDate(recorddate));
+        }
+
+        if (null != resultList) {
+            return R.data(ResultMsg.ok(resultList));
+        } else {
+            return R.data(ResultMsg.error());
+        }
+    }
+
+
+    /*
+     * 单台风机当日报警记录
+     */
+    @PostMapping("/bjjllist")
+    @ResponseBody
+    @ApiOperation(value = "单台风机当日报警记录", notes = "单台风机当日报警记录")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = true, dataType = "Integer", paramType = "query"),
+            @ApiImplicitParam(name = "pageSize", value = "每页数量", required = true, dataType = "Integer", paramType = "query"),
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+
+    public R bjjllist(Integer pageNum, Integer pageSize, String wtId, String recorddate) {
+
+        //
+        Page<ProEconShutdownEvent2> resultList =new Page<>();
+        if(StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+        {
+            Calendar cal = Calendar.getInstance();
+            cal.set(Calendar.HOUR_OF_DAY, 0);
+            cal.set(Calendar.MINUTE, 0);
+            cal.set(Calendar.SECOND, 0);
+
+            cal.setTime(DateUtils.parseDate(recorddate));
+            Date beginDate = cal.getTime();
+            cal.add(Calendar.DAY_OF_MONTH, 1);
+            Date endDate = cal.getTime();
+
+            resultList= shutdownEvent2Service.getShutdownEventList(pageNum, pageSize, wtId, beginDate,endDate);
+        }
+        if (null != resultList) {
+            return R.data(ResultMsg.ok(resultList));
+        } else {
+            return R.data(ResultMsg.error());
+        }
+    }
+
+    /*
+     * 单台风机当日停机记录
+     */
+    @PostMapping("/gzjllist")
+    @ResponseBody
+    @ApiOperation(value = "单台风机当日停机记录", notes = "单台风机当日停机记录")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = true, dataType = "Integer", paramType = "query"),
+            @ApiImplicitParam(name = "pageSize", value = "每页数量", required = true, dataType = "Integer", paramType = "query"),
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+
+    public R gzjllist(Integer pageNum, Integer pageSize,String wtId, String recorddate) {
+
+        Page<ProEconShutdownEvent2> resultList =new Page<>();
+        if(StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+        {
+            Calendar cal = Calendar.getInstance();
+            cal.set(Calendar.HOUR_OF_DAY, 0);
+            cal.set(Calendar.MINUTE, 0);
+            cal.set(Calendar.SECOND, 0);
+
+            cal.setTime(DateUtils.parseDate(recorddate));
+            Date beginDate = cal.getTime();
+            cal.add(Calendar.DAY_OF_MONTH, 1);
+            Date endDate = cal.getTime();
+
+            resultList= shutdownEvent2Service.getShutdownEventList(pageNum, pageSize, wtId, beginDate,endDate);
+        }
+        if (null != resultList) {
+            return R.data(ResultMsg.ok(resultList));
+        } else {
+            return R.data(ResultMsg.error());
+        }
+    }
+
+    /*
+     * 单台风机当日限电记录
+     */
+    @PostMapping("/xdjllist")
+    @ResponseBody
+    @ApiOperation(value = "单台风机当日限电记录", notes = "单台风机当日限电记录")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = true, dataType = "Integer", paramType = "query"),
+            @ApiImplicitParam(name = "pageSize", value = "每页数量", required = true, dataType = "Integer", paramType = "query"),
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+
+    public R xdjllist(Integer pageNum, Integer pageSize, String wtId, String recorddate) {
+
+        Page<ProEconBrownoutsEvent2> resultList =new Page<>();
+        if(StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+        {
+            Calendar cal = Calendar.getInstance();
+            cal.set(Calendar.HOUR_OF_DAY, 0);
+            cal.set(Calendar.MINUTE, 0);
+            cal.set(Calendar.SECOND, 0);
+
+            cal.setTime(DateUtils.parseDate(recorddate));
+            Date beginDate = cal.getTime();
+            cal.add(Calendar.DAY_OF_MONTH, 1);
+            Date endDate = cal.getTime();
+
+            resultList= brownoutsEvent2Service.getBrownoutsEvent2List(pageNum, pageSize, wtId, beginDate,endDate);
+        }
+        if (null != resultList) {
+            return R.data(ResultMsg.ok(resultList));
+        } else {
+            return R.data(ResultMsg.error());
+        }
+    }
+
+    /**
+     * 获取区域弹出列表信息
+     *
+
+     */
+    @GetMapping("/plotBandAjax")
+    @ResponseBody
+    @ApiOperation(value = "获取区域弹出列表信息", notes = "获取区域弹出列表信息")
+    @ApiImplicitParams({
+
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "beginDate", value = "开始时间", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "endDate", value = "结束时间", required = true, dataType = "string", paramType = "query")})
+
+    public R plotBandAjax(String wtId,String beginDate,String endDate) throws Exception {
+
+        Map<String, String> map = new HashMap<>();
+
+
+        if (StringUtils.notEmp(wtId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate) ) {
+
+            map=windturbinegoodnessService.getPlotBand(wtId,beginDate,endDate);
+
+
+        }
+
+        if (null != map) {
+            return R.data(ResultMsg.ok(map));
+        } else {
+            return R.data(ResultMsg.error());
+        }
+    }
+
+
+}

+ 279 - 275
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/goodness/WindturbineDetailPieChartAController.java

@@ -1,275 +1,279 @@
-//package com.gyee.runeconomy.controller.goodness;
-//
-//import com.gyee.frame.common.conf.AjaxStatus;
-//import com.gyee.frame.common.domain.AjaxResult;
-//import com.gyee.frame.model.auto.Inputoroutputspeedtotal2;
-//import com.gyee.frame.model.custom.DataVo;
-//import com.gyee.frame.service.Inputoroutputspeedtotal2Service;
-//import com.gyee.frame.util.DateUtils;
-//import com.gyee.frame.util.StringUtils;
-//import io.swagger.annotations.Api;
-//import io.swagger.annotations.ApiImplicitParam;
-//import io.swagger.annotations.ApiImplicitParams;
-//import io.swagger.annotations.ApiOperation;
-//import org.springframework.stereotype.Controller;
-//import org.springframework.web.bind.annotation.GetMapping;
-//import org.springframework.web.bind.annotation.RequestMapping;
-//import org.springframework.web.bind.annotation.ResponseBody;
-//
-//import javax.annotation.Resource;
-//import java.util.ArrayList;
-//import java.util.Date;
-//import java.util.List;
-//
-///**
-// * 单机性能分析列表
-// */
-//@Controller
-//@RequestMapping("/goodness")
-//@Api(value = "单机信息总览饼图",tags =  "单机信息总览饼图")
-//public class WindturbineDetailPieChartAController {
-//    @Resource
-//    private Inputoroutputspeedtotal2Service inputoroutputspeedtotal2Service;
-//
-//    /**
-//     * 饼图图表
-//     *
-//     * @param wtId
-//     * @param recorddate
-//     * @return
-//     */
-//    @GetMapping("/pieChart")
-//    @ResponseBody
-//    @ApiOperation(value = "查询等级评估日所有信息", notes = "查询等级评估日所有信息")
-//    @ApiImplicitParams({
-//            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
-//            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query"),
-//            @ApiImplicitParam(name = "type", value = "类型 1:日小风切入,2:月小风切入,3:月小风切入,4:日小风停机,5:月小风停机,6:年小风停机", required = true, dataType = "string", paramType = "query")})
-//
-//    public AjaxResult pieChart( String wtId, String recorddate,String type) {
-//
-//        List<DataVo> vos=new ArrayList<>();
-//
-//        if (StringUtils.notEmp(recorddate) && StringUtils.notEmp(wtId) && StringUtils.notEmp(type)) {
-//
-//            Date date=DateUtils.parseDate(recorddate);
-//            List<Inputoroutputspeedtotal2> ls = inputoroutputspeedtotal2Service.getInputoroutputspeedtotal2(wtId,date);
-//
-//            if (!ls.isEmpty()) {
-//
-//                vos=new ArrayList<DataVo>();
-//                Inputoroutputspeedtotal2 io = ls.get(0);
-//
-//                DataVo vo1 = new DataVo();
-//                DataVo vo2 = new DataVo();
-//                DataVo vo3 = new DataVo();
-//                DataVo vo4 = new DataVo();
-//                DataVo vo5 = new DataVo();
-//                DataVo vo6 = new DataVo();
-//                DataVo vo7 = new DataVo();
-//                switch (Integer.valueOf(type)) {
-//                    case 1:// 日小风切入
-//                        vo1.setName("日小于2风");
-//                        vo1.setValue1(io.getDaya1());
-//                        vo1.setValue2(io.getDaya8());
-//
-//                        vo2.setName("日2-2.5风");
-//                        vo2.setValue1(io.getDaya2());
-//                        vo2.setValue2(io.getDaya9());
-//
-//                        vo3.setName("日2.5-3风");
-//                        vo3.setValue1(io.getDaya3());
-//                        vo3.setValue2(io.getDaya10());
-//
-//                        vo4.setName("日3-3.5风");
-//                        vo4.setValue1(io.getDaya4());
-//                        vo4.setValue2(io.getDaya11());
-//
-//                        vo5.setName("日3.5-4风");
-//                        vo5.setValue1(io.getDaya5());
-//                        vo5.setValue2(io.getDaya12());
-//
-//                        vo6.setName("日4-5风");
-//                        vo6.setValue1(io.getDaya6());
-//                        vo6.setValue2(io.getDaya13());
-//
-//                        vo7.setName("日大于5风");
-//                        vo7.setValue1(io.getDaya7());
-//                        vo7.setValue2(io.getDaya14());
-//
-//                        break;
-//                    case 2:// 月小风切入
-//                        vo1.setName("月小于2风");
-//                        vo1.setValue1(io.getMontha1());
-//                        vo1.setValue2(io.getMontha8());
-//
-//                        vo2.setName("月2-2.5风");
-//                        vo2.setValue1(io.getMontha2());
-//                        vo2.setValue2(io.getMontha9());
-//
-//                        vo3.setName("月2.5-3风");
-//                        vo3.setValue1(io.getMontha3());
-//                        vo3.setValue2(io.getMontha10());
-//
-//                        vo4.setName("月3-3.5风");
-//                        vo4.setValue1(io.getMontha4());
-//                        vo4.setValue2(io.getMontha11());
-//
-//                        vo5.setName("月3.5-4风");
-//                        vo5.setValue1(io.getMontha5());
-//                        vo5.setValue2(io.getMontha12());
-//
-//                        vo6.setName("月4-5风");
-//                        vo6.setValue1(io.getMontha6());
-//                        vo6.setValue2(io.getMontha13());
-//
-//                        vo7.setName("月大于5风");
-//                        vo7.setValue1(io.getMontha7());
-//                        vo7.setValue2(io.getMontha14());
-//
-//                        break;
-//                    case 3: // 年小风切入
-//                        vo1.setName("年小于2风");
-//                        vo1.setValue1(io.getYeara1());
-//                        vo1.setValue2(io.getYeara8());
-//
-//                        vo2.setName("年2-2.5风");
-//                        vo2.setValue1(io.getYeara2());
-//                        vo2.setValue2(io.getYeara9());
-//
-//                        vo3.setName("年2.5-3风");
-//                        vo3.setValue1(io.getYeara3());
-//                        vo3.setValue2(io.getYeara10());
-//
-//                        vo4.setName("年3-3.5风");
-//                        vo4.setValue1(io.getYeara4());
-//                        vo4.setValue2(io.getYeara11());
-//
-//                        vo5.setName("年3.5-4风");
-//                        vo5.setValue1(io.getYeara5());
-//                        vo5.setValue2(io.getYeara12());
-//
-//                        vo6.setName("年4-5风");
-//                        vo6.setValue1(io.getYeara6());
-//                        vo6.setValue2(io.getYeara13());
-//
-//                        vo7.setName("年大于5风");
-//                        vo7.setValue1(io.getYeara7());
-//                        vo7.setValue2(io.getYeara14());
-//
-//                        break;
-//                    case 4:// 日小风停机
-//                        vo1.setName("日小于2风");
-//                        vo1.setValue1(io.getDayb1());
-//                        vo1.setValue2(io.getDayb8());
-//
-//                        vo2.setName("日2-2.5风");
-//                        vo2.setValue1(io.getDayb2());
-//                        vo2.setValue2(io.getDayb9());
-//
-//                        vo3.setName("日2.5-3风");
-//                        vo3.setValue1(io.getDayb3());
-//                        vo3.setValue2(io.getDayb10());
-//
-//                        vo4.setName("日3-3.5风");
-//                        vo4.setValue1(io.getDayb4());
-//                        vo4.setValue2(io.getDayb11());
-//
-//                        vo5.setName("日3.5-4风");
-//                        vo5.setValue1(io.getDayb5());
-//                        vo5.setValue2(io.getDayb12());
-//
-//                        vo6.setName("日4-5风");
-//                        vo6.setValue1(io.getDayb6());
-//                        vo6.setValue2(io.getDayb13());
-//
-//                        vo7.setName("日大于5风");
-//                        vo7.setValue1(io.getDayb7());
-//                        vo7.setValue2(io.getDayb14());
-//
-//                        break;
-//                    case 5:// 月小风停机
-//                        vo1.setName("月小于2风");
-//                        vo1.setValue1(io.getMonthb1());
-//                        vo1.setValue2(io.getMonthb8());
-//
-//                        vo2.setName("月2-2.5风");
-//                        vo2.setValue1(io.getMonthb2());
-//                        vo2.setValue2(io.getMonthb9());
-//
-//                        vo3.setName("月2.5-3风");
-//                        vo3.setValue1(io.getMonthb3());
-//                        vo3.setValue2(io.getMonthb10());
-//
-//                        vo4.setName("月3-3.5风");
-//                        vo4.setValue1(io.getMonthb4());
-//                        vo4.setValue2(io.getMonthb11());
-//
-//                        vo5.setName("月3.5-4风");
-//                        vo5.setValue1(io.getMonthb5());
-//                        vo5.setValue2(io.getMonthb12());
-//
-//                        vo6.setName("月4-5风");
-//                        vo6.setValue1(io.getMonthb6());
-//                        vo6.setValue2(io.getMonthb13());
-//
-//                        vo7.setName("月大于5风");
-//                        vo7.setValue1(io.getMonthb7());
-//                        vo7.setValue2(io.getMonthb14());
-//
-//                        break;
-//                    case 6: // 年小风停机
-//                        vo1.setName("年小于2风");
-//                        vo1.setValue1(io.getYearb1());
-//                        vo1.setValue2(io.getYearb8());
-//
-//                        vo2.setName("年2-2.5风");
-//                        vo2.setValue1(io.getYearb2());
-//                        vo2.setValue2(io.getYearb9());
-//
-//                        vo3.setName("年2.5-3风");
-//                        vo3.setValue1(io.getYearb3());
-//                        vo3.setValue2(io.getYearb10());
-//
-//                        vo4.setName("年3-3.5风");
-//                        vo4.setValue1(io.getYearb4());
-//                        vo4.setValue2(io.getYearb11());
-//
-//                        vo5.setName("年3.5-4风");
-//                        vo5.setValue1(io.getYearb5());
-//                        vo5.setValue2(io.getYearb12());
-//
-//                        vo6.setName("年4-5风");
-//                        vo6.setValue1(io.getYearb6());
-//                        vo6.setValue2(io.getYearb13());
-//
-//                        vo7.setName("年大于5风");
-//                        vo7.setValue1(io.getYearb7());
-//                        vo7.setValue2(io.getYearb14());
-//
-//                        break;
-//                    default:
-//                        break;
-//                }
-//
-//                vos.add(vo1);
-//                vos.add(vo2);
-//                vos.add(vo3);
-//                vos.add(vo4);
-//                vos.add(vo5);
-//                vos.add(vo6);
-//                vos.add(vo7);
-//            }
-//
-//        }
-//
-//        if (vos != null) {
-//            return AjaxResult.successData(AjaxStatus.success.code, vos);
-//        } else {
-//            return AjaxResult.successData(AjaxStatus.success.code, vos);
-//        }
-//    }
-//
-//
-//
-//}
+package com.gyee.runeconomy.controller.goodness;
+
+import com.gyee.common.util.DateUtils;
+import com.gyee.runeconomy.dto.DataVo;
+import com.gyee.runeconomy.dto.R;
+import com.gyee.runeconomy.dto.ResultMsg;
+import com.gyee.runeconomy.model.auto.ProEconInOrOutSpeedTotal2;
+import com.gyee.runeconomy.service.auto.IProEconInOrOutSpeedTotal2Service;
+import com.gyee.runeconomy.util.StringUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 单机性能分析列表
+ */
+@Controller
+@RequestMapping("/goodness")
+@Api(value = "单机信息总览饼图",tags =  "单机信息总览饼图")
+public class WindturbineDetailPieChartAController {
+    @Resource
+    private IProEconInOrOutSpeedTotal2Service proEconInOrOutSpeedTotal2Service;
+
+    /**
+     * 饼图图表
+     *
+     * @param wtId
+     * @param recorddate
+     * @return
+     */
+    @GetMapping("/pieChart")
+    @ResponseBody
+    @ApiOperation(value = "查询等级评估日所有信息", notes = "查询等级评估日所有信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "type", value = "类型 1:日小风切入,2:月小风切入,3:月小风切入,4:日小风停机,5:月小风停机,6:年小风停机", required = true, dataType = "string", paramType = "query")})
+
+    public R pieChart(String wtId, String recorddate, String type) {
+
+        List<DataVo> vos=new ArrayList<>();
+
+        if (StringUtils.notEmp(recorddate) && StringUtils.notEmp(wtId) && StringUtils.notEmp(type)) {
+
+            Date date= DateUtils.parseDate(recorddate);
+            List<ProEconInOrOutSpeedTotal2> ls = proEconInOrOutSpeedTotal2Service.list().stream().filter(i->
+                    i.getWindturbineId().equals(wtId)
+            && i.getRecordDate().compareTo(DateUtils.truncate(date)) ==0
+            ).collect(Collectors.toList());
+
+            if (!ls.isEmpty()) {
+
+                vos=new ArrayList<DataVo>();
+                ProEconInOrOutSpeedTotal2 io = ls.get(0);
+
+                DataVo vo1 = new DataVo();
+                DataVo vo2 = new DataVo();
+                DataVo vo3 = new DataVo();
+                DataVo vo4 = new DataVo();
+                DataVo vo5 = new DataVo();
+                DataVo vo6 = new DataVo();
+                DataVo vo7 = new DataVo();
+                switch (Integer.valueOf(type)) {
+                    case 1:// 日小风切入
+                        vo1.setName("日小于2风");
+                        vo1.setValue1(io.getDaya1());
+                        vo1.setValue2(io.getDaya8());
+
+                        vo2.setName("日2-2.5风");
+                        vo2.setValue1(io.getDaya2());
+                        vo2.setValue2(io.getDaya9());
+
+                        vo3.setName("日2.5-3风");
+                        vo3.setValue1(io.getDaya3());
+                        vo3.setValue2(io.getDaya10());
+
+                        vo4.setName("日3-3.5风");
+                        vo4.setValue1(io.getDaya4());
+                        vo4.setValue2(io.getDaya11());
+
+                        vo5.setName("日3.5-4风");
+                        vo5.setValue1(io.getDaya5());
+                        vo5.setValue2(io.getDaya12());
+
+                        vo6.setName("日4-5风");
+                        vo6.setValue1(io.getDaya6());
+                        vo6.setValue2(io.getDaya13());
+
+                        vo7.setName("日大于5风");
+                        vo7.setValue1(io.getDaya7());
+                        vo7.setValue2(io.getDaya14());
+
+                        break;
+                    case 2:// 月小风切入
+                        vo1.setName("月小于2风");
+                        vo1.setValue1(io.getMontha1());
+                        vo1.setValue2(io.getMontha8());
+
+                        vo2.setName("月2-2.5风");
+                        vo2.setValue1(io.getMontha2());
+                        vo2.setValue2(io.getMontha9());
+
+                        vo3.setName("月2.5-3风");
+                        vo3.setValue1(io.getMontha3());
+                        vo3.setValue2(io.getMontha10());
+
+                        vo4.setName("月3-3.5风");
+                        vo4.setValue1(io.getMontha4());
+                        vo4.setValue2(io.getMontha11());
+
+                        vo5.setName("月3.5-4风");
+                        vo5.setValue1(io.getMontha5());
+                        vo5.setValue2(io.getMontha12());
+
+                        vo6.setName("月4-5风");
+                        vo6.setValue1(io.getMontha6());
+                        vo6.setValue2(io.getMontha13());
+
+                        vo7.setName("月大于5风");
+                        vo7.setValue1(io.getMontha7());
+                        vo7.setValue2(io.getMontha14());
+
+                        break;
+                    case 3: // 年小风切入
+                        vo1.setName("年小于2风");
+                        vo1.setValue1(io.getYeara1());
+                        vo1.setValue2(io.getYeara8());
+
+                        vo2.setName("年2-2.5风");
+                        vo2.setValue1(io.getYeara2());
+                        vo2.setValue2(io.getYeara9());
+
+                        vo3.setName("年2.5-3风");
+                        vo3.setValue1(io.getYeara3());
+                        vo3.setValue2(io.getYeara10());
+
+                        vo4.setName("年3-3.5风");
+                        vo4.setValue1(io.getYeara4());
+                        vo4.setValue2(io.getYeara11());
+
+                        vo5.setName("年3.5-4风");
+                        vo5.setValue1(io.getYeara5());
+                        vo5.setValue2(io.getYeara12());
+
+                        vo6.setName("年4-5风");
+                        vo6.setValue1(io.getYeara6());
+                        vo6.setValue2(io.getYeara13());
+
+                        vo7.setName("年大于5风");
+                        vo7.setValue1(io.getYeara7());
+                        vo7.setValue2(io.getYeara14());
+
+                        break;
+                    case 4:// 日小风停机
+                        vo1.setName("日小于2风");
+                        vo1.setValue1(io.getDayb1());
+                        vo1.setValue2(io.getDayb8());
+
+                        vo2.setName("日2-2.5风");
+                        vo2.setValue1(io.getDayb2());
+                        vo2.setValue2(io.getDayb9());
+
+                        vo3.setName("日2.5-3风");
+                        vo3.setValue1(io.getDayb3());
+                        vo3.setValue2(io.getDayb10());
+
+                        vo4.setName("日3-3.5风");
+                        vo4.setValue1(io.getDayb4());
+                        vo4.setValue2(io.getDayb11());
+
+                        vo5.setName("日3.5-4风");
+                        vo5.setValue1(io.getDayb5());
+                        vo5.setValue2(io.getDayb12());
+
+                        vo6.setName("日4-5风");
+                        vo6.setValue1(io.getDayb6());
+                        vo6.setValue2(io.getDayb13());
+
+                        vo7.setName("日大于5风");
+                        vo7.setValue1(io.getDayb7());
+                        vo7.setValue2(io.getDayb14());
+
+                        break;
+                    case 5:// 月小风停机
+                        vo1.setName("月小于2风");
+                        vo1.setValue1(io.getMonthb1());
+                        vo1.setValue2(io.getMonthb8());
+
+                        vo2.setName("月2-2.5风");
+                        vo2.setValue1(io.getMonthb2());
+                        vo2.setValue2(io.getMonthb9());
+
+                        vo3.setName("月2.5-3风");
+                        vo3.setValue1(io.getMonthb3());
+                        vo3.setValue2(io.getMonthb10());
+
+                        vo4.setName("月3-3.5风");
+                        vo4.setValue1(io.getMonthb4());
+                        vo4.setValue2(io.getMonthb11());
+
+                        vo5.setName("月3.5-4风");
+                        vo5.setValue1(io.getMonthb5());
+                        vo5.setValue2(io.getMonthb12());
+
+                        vo6.setName("月4-5风");
+                        vo6.setValue1(io.getMonthb6());
+                        vo6.setValue2(io.getMonthb13());
+
+                        vo7.setName("月大于5风");
+                        vo7.setValue1(io.getMonthb7());
+                        vo7.setValue2(io.getMonthb14());
+
+                        break;
+                    case 6: // 年小风停机
+                        vo1.setName("年小于2风");
+                        vo1.setValue1(io.getYearb1());
+                        vo1.setValue2(io.getYearb8());
+
+                        vo2.setName("年2-2.5风");
+                        vo2.setValue1(io.getYearb2());
+                        vo2.setValue2(io.getYearb9());
+
+                        vo3.setName("年2.5-3风");
+                        vo3.setValue1(io.getYearb3());
+                        vo3.setValue2(io.getYearb10());
+
+                        vo4.setName("年3-3.5风");
+                        vo4.setValue1(io.getYearb4());
+                        vo4.setValue2(io.getYearb11());
+
+                        vo5.setName("年3.5-4风");
+                        vo5.setValue1(io.getYearb5());
+                        vo5.setValue2(io.getYearb12());
+
+                        vo6.setName("年4-5风");
+                        vo6.setValue1(io.getYearb6());
+                        vo6.setValue2(io.getYearb13());
+
+                        vo7.setName("年大于5风");
+                        vo7.setValue1(io.getYearb7());
+                        vo7.setValue2(io.getYearb14());
+
+                        break;
+                    default:
+                        break;
+                }
+
+                vos.add(vo1);
+                vos.add(vo2);
+                vos.add(vo3);
+                vos.add(vo4);
+                vos.add(vo5);
+                vos.add(vo6);
+                vos.add(vo7);
+            }
+
+        }
+
+        if (null != vos) {
+            return R.data(ResultMsg.ok(vos));
+        } else {
+            return R.data(ResultMsg.error());
+        }
+    }
+
+
+
+}

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

@@ -95,7 +95,6 @@ public class WindturbineGoodnessDetailController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "pageNum", value = "页码", required = true, dataType = "Integer", paramType = "query"),
             @ApiImplicitParam(name = "pageSize", value = "每页数量", required = true, dataType = "Integer", paramType = "query"),
-            @ApiImplicitParam(name = "tablepar", value = "分页排序对象", required = true, dataType = "string", paramType = "query"),
             @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
             @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
 

+ 81 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/performacompare/EquipmentPerformaCompareController.java

@@ -0,0 +1,81 @@
+package com.gyee.runeconomy.controller.performacompare;
+
+
+import com.gyee.runeconomy.dto.R;
+import com.gyee.runeconomy.dto.ResultMsg;
+import com.gyee.runeconomy.model.auto.ProEconWtPowerCurveFitting;
+import com.gyee.runeconomy.service.performacompare.EquipmentPerformaCompareService;
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 单机新能比较 前端控制器
+ * </p>
+ *
+ * @author wang
+ * @since 2022-11-22
+ */
+@RestController
+@RequestMapping("//performa-compare")
+@Api(value = "单机新能比较", tags = "单机新能比较")
+public class EquipmentPerformaCompareController {
+
+
+    @Autowired
+    private EquipmentPerformaCompareService equipmentPerformaCompareService;
+
+
+    /**
+     * 单机横向对比列表
+     *
+     * @param windturbineIds
+     * @param date
+     * @return
+     */
+    @GetMapping("/equipment-performa-compare")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R daydjhxdbtop(
+            @RequestParam(value = "type", required = true) String type,
+            @RequestParam(value = "windturbineIds", required = true) String windturbineIds,
+            @RequestParam(value = "date", required = true) String date) {
+
+        List<Object> objects =  equipmentPerformaCompareService.getEquipmentPerformaCompareList(type, windturbineIds, date);
+
+
+        if (null != objects) {
+            return R.data(ResultMsg.ok(objects));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
+
+    /**
+     * 实际拟合曲线
+     * @param windturbineIds
+     * @return
+     */
+    @GetMapping("curve-fitting")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R getWtPowerCurveFittingList(
+            @RequestParam(value = "windturbineIds", required = true) String windturbineIds ){
+
+        Map<String, List<ProEconWtPowerCurveFitting>> map =  equipmentPerformaCompareService.getgroupProEconWtPowerCurveFittingList(windturbineIds);
+
+
+        if (null != map) {
+            return R.data(ResultMsg.ok(map));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
+
+}

+ 61 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/specific/SpecificController.java

@@ -4,29 +4,78 @@ package com.gyee.runeconomy.controller.specific;/*
 */
 
 import com.gyee.common.model.StringUtils;
+import com.gyee.common.vo.specific.SpecificCenterVo;
 import com.gyee.common.vo.specific.SpecificTargetVo;
+import com.gyee.common.vo.specific.SpecificTopVo;
 import com.gyee.runeconomy.dto.R;
 import com.gyee.runeconomy.dto.ResultMsg;
 import com.gyee.runeconomy.service.specific.SpecificService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import java.text.ParseException;
 import java.util.List;
+import java.util.Map;
 
 @RestController
 @RequestMapping("//specific")
+@Api(value = "专题分析",tags =  "专题分析")
 public class SpecificController {
 
     @Resource
     private SpecificService specificService;
 
+
+    /**
+     * 查询专题分析列表上
+     * @return
+     */
+    @GetMapping("/maintoplist")
+    @ResponseBody
+    @ApiOperation(value = "综合分析1", notes = "综合分析1")
+    public R maintoplist(@RequestParam(value = "companys",required = true) String companys,
+                         @RequestParam(value = "type",required = true) String type,
+                         @RequestParam(value = "month",required = true) String month) throws ParseException {
+
+        List<SpecificTopVo> resultList = specificService.maintoplist(companys,type,month);
+        if (StringUtils.isNotNull(resultList)) {
+            return R.data(ResultMsg.ok(resultList));
+        }else{
+            return R.error(ResultMsg.error());
+        }
+
+    }
+
+    /**
+     * 查询专题分析列表下
+     * @return
+     */
+    @GetMapping("/maincenterlist")
+    @ResponseBody
+    @ApiOperation(value = "综合分析2", notes = "综合分析2")
+    public R maincenterlist(@RequestParam(value = "companys",required = true) String companys,
+                            @RequestParam(value = "type",required = true) String type,
+                            @RequestParam(value = "month",required = true) String month) throws ParseException {
+
+        Map<String,List<SpecificCenterVo>> resultMap = specificService.maincenterlist(companys,type,month);
+        if (StringUtils.isNotNull(resultMap)) {
+            return R.data(ResultMsg.ok(resultMap));
+        }else{
+            return R.error(ResultMsg.error());
+        }
+    }
+
+
+
     /**
      * 查询风能利用率功能
      * @return
      */
     @GetMapping("/fnlylList")
     @ResponseBody
+    @ApiOperation(value = "专题分析-风能利用率", notes = "专题分析-风能利用率")
     public R fnlylList(@RequestParam(value = "companys",required = true) String companys,
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
@@ -45,6 +94,7 @@ public class SpecificController {
      */
     @GetMapping("/fdlList")
     @ResponseBody
+    @ApiOperation(value = "专题分析-发电量", notes = "专题分析-发电量")
     public R fdlList(@RequestParam(value = "companys",required = true) String companys,
                      @RequestParam(value = "type",required = true) String type,
                      @RequestParam(value = "year",required = true) String year) throws ParseException {
@@ -63,6 +113,7 @@ public class SpecificController {
      */
     @GetMapping("/zhcydlList")
     @ResponseBody
+    @ApiOperation(value = "专题分析-综合厂用电量", notes = "专题分析-综合厂用电量")
     public R zhcydlList(@RequestParam(value = "companys",required = true) String companys,
                         @RequestParam(value = "type",required = true) String type,
                         @RequestParam(value = "year",required = true) String year) throws ParseException {
@@ -81,6 +132,7 @@ public class SpecificController {
      */
     @GetMapping("/gzsslList")
     @ResponseBody
+    @ApiOperation(value = "专题分析-故障损失率", notes = "专题分析-故障损失率")
     public R gzsslList(@RequestParam(value = "companys",required = true) String companys,
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
@@ -99,6 +151,7 @@ public class SpecificController {
      */
     @GetMapping("/whsslList")
     @ResponseBody
+    @ApiOperation(value = "专题分析-维护损失率", notes = "专题分析-维护损失率")
     public R whsslList(@RequestParam(value = "companys",required = true) String companys,
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
@@ -117,6 +170,7 @@ public class SpecificController {
      */
     @GetMapping("/xdsslList")
     @ResponseBody
+    @ApiOperation(value = "专题分析-限电损失率", notes = "专题分析-限电损失率")
     public R xdsslList(@RequestParam(value = "companys",required = true) String companys,
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
@@ -135,6 +189,7 @@ public class SpecificController {
      */
     @GetMapping("/xnsslList")
     @ResponseBody
+    @ApiOperation(value = "专题分析-性能损失率", notes = "专题分析-性能损失率")
     public R xnsslList(@RequestParam(value = "companys",required = true) String companys,
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
@@ -153,6 +208,7 @@ public class SpecificController {
      */
     @GetMapping("/slsslList")
     @ResponseBody
+    @ApiOperation(value = "专题分析-受累损失率", notes = "专题分析-受累损失率")
     public R slsslList(@RequestParam(value = "companys",required = true) String companys,
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
@@ -171,6 +227,7 @@ public class SpecificController {
      */
     @GetMapping("/fwjslList")
     @ResponseBody
+    @ApiOperation(value = "专题分析-复位及时率", notes = "专题分析-复位及时率")
     public R fwjslList(@RequestParam(value = "companys",required = true) String companys,
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
@@ -189,6 +246,7 @@ public class SpecificController {
      */
     @GetMapping("/ztzhlList")
     @ResponseBody
+    @ApiOperation(value = "专题分析-状态转换率", notes = "专题分析-状态转换率")
     public R ztzhlList(@RequestParam(value = "companys",required = true) String companys,
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
@@ -207,6 +265,7 @@ public class SpecificController {
      */
     @GetMapping("/xqjslList")
     @ResponseBody
+    @ApiOperation(value = "专题分析-消缺及时率", notes = "专题分析-消缺及时率")
     public R xqjslList(@RequestParam(value = "companys",required = true) String companys,
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
@@ -225,6 +284,7 @@ public class SpecificController {
      */
     @GetMapping("/mtbfList")
     @ResponseBody
+    @ApiOperation(value = "专题分析-MTBF分析", notes = "专题分析-MTBF分析")
     public R mtbfList(@RequestParam(value = "companys",required = true) String companys,
                       @RequestParam(value = "type",required = true) String type,
                       @RequestParam(value = "year",required = true) String year) throws ParseException {
@@ -243,6 +303,7 @@ public class SpecificController {
      */
     @GetMapping("/mttrList")
     @ResponseBody
+    @ApiOperation(value = "专题分析-MTTR分析", notes = "专题分析-MTTR分析")
     public R mttrList(@RequestParam(value = "companys",required = true) String companys,
                       @RequestParam(value = "type",required = true) String type,
                       @RequestParam(value = "year",required = true) String year) throws ParseException {

+ 181 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/dto/EquipmentInfoDayTopDTO.java

@@ -0,0 +1,181 @@
+package com.gyee.runeconomy.dto;
+
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import java.util.Date;
+
+@Data
+public class EquipmentInfoDayTopDTO {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编号
+     */
+    private Long id;
+
+    /**
+     * 风场编号
+     */
+    private String windpowerstationId;
+
+    /**
+     * 风场名称
+     */
+    private String windpowerstationName;
+
+    /**
+     * 风机编号
+     */
+    private String windturbineId;
+
+    /**
+     * 风机名称
+     */
+    private String windturbineName;
+
+    /**
+     * 日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    private Date recordDate;
+
+    /**
+     * 发电量
+     */
+    private Double fdl;
+
+    /**
+     * 理论发电量
+     */
+    private Double llfdl;
+
+    /**
+     * 平均风速
+     */
+    private Double fs;
+
+    /**
+     * 平均功率
+     */
+    private Double gl;
+
+    /**
+     * 故障损失电量
+     */
+    private Double gzssdl;
+
+    /**
+     * 电损失电量
+     */
+    private Double xdssdl;
+
+
+    /**
+     * 护损失电量
+     */
+    private Double whssdl;
+
+
+    /**
+     * 性能损失电量
+     */
+    private Double xnssdl;
+
+
+    /**
+     * 故障时间
+     */
+    private Double gzsj;
+
+    /**
+     * 维护时间
+     */
+    private Double whsj;
+
+    /**
+     * 运行时间
+     */
+    private Double yxsj;
+
+    /**
+     * 停机时间
+     */
+    private Double tjsj;
+
+
+    /**
+     * 利用小时数
+     */
+    private Double lyxs;
+
+    /**
+     * 拟合优度
+     */
+    private Double nhyd;
+
+    /**
+     * 设备可利用率
+     */
+    private Double sbklyl;
+
+
+    /**
+     * 等效可用系数
+     */
+    private Double dxkyxs;
+
+    /**
+     * 有效风时数
+     */
+    private Double yxfss;
+
+    /**
+     * 小风切入
+     */
+    private Double xfqr;
+
+    /**
+     * 静风频率
+     */
+    private Double jfpl;
+
+
+    /**
+     * 功率一致性系数
+     */
+    private Double glyzxxs;
+
+
+    /**
+     * 类型
+     */
+    private Integer types;
+
+    /**
+     * 综合排名
+     */
+    private Integer rank;
+
+    /**
+     * 年
+     */
+    private Integer year;
+
+    /**
+     * 月
+     */
+    private Integer month;
+
+    /**
+     * 分数
+     */
+    private Double score;
+
+    /**
+     * 等级
+     */
+    private String level;
+
+}

+ 10 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/dto/response/ProEconPointCodeDTO.java

@@ -2,12 +2,21 @@ package com.gyee.runeconomy.dto.response;
 
 import lombok.Data;
 
+import java.math.BigDecimal;
+
 @Data
 public class ProEconPointCodeDTO {
 
     private String stationname;
     private String stationcode;
     private String description;
-    private double value;
+    private BigDecimal value;
+
 
+    public BigDecimal getValue() {
+        if(null ==value){
+            return new BigDecimal(0);
+        }
+        return value;
+    }
 }

+ 5 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/init/CacheContext.java

@@ -132,7 +132,7 @@ public class CacheContext implements CommandLineRunner {
         List<String> runWpids = Arrays.asList(runWindpowerstation.split(","));
         logger.info(runWpids.get(0)+"------------------"+runWpids.size());
 
-        theoreticalPowerList= proBasicModelPowerRdService.list();
+
         equipmentmodels = proEconEquipmentmodelService.list();
         equipmentmodels.stream().forEach(e->{
             modelMap.put(e.getId(),e);
@@ -423,6 +423,10 @@ public class CacheContext implements CommandLineRunner {
         theoreticalPowerMap = JSONObject.parseObject(llglString, new TypeReference<Map<String, Map<Double,ProBasicModelPowerRd>>>() {
         });
 
+        llglString = redisService.get("ZLLGLLS");
+        theoreticalPowerList=  JSONObject.parseObject(llglString, new TypeReference<List<ProBasicModelPowerRd>>() {
+        });
+
         String sszzt = redisService.get("SSZZT");
         statusMap = JSONObject.parseObject(sszzt, new TypeReference<Map<String,List<ProBasicStatusPoint>>>() {
         });

+ 1 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProBasicEquipment.java

@@ -142,7 +142,7 @@ public class ProBasicEquipment extends Model {
     /**
      * 排序
      */
-    private String orderNum;
+    private Integer orderNum;
 
     private String substationId;
 }

+ 49 - 22
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconEquipmentInfoDayTop.java

@@ -1,21 +1,24 @@
 package com.gyee.runeconomy.model.auto;
 
+import java.util.Date;
 
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
-import java.util.Date;
-
 /**
  * <p>
  * 风机日信息表排行
  * </p>
  *
- * @author shilin
- * @since 2022-11-09
+ * @author wang
+ * @since 2022-11-25
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
@@ -35,6 +38,13 @@ public class ProEconEquipmentInfoDayTop extends Model {
     private String windpowerstationId;
 
     /**
+     * 风场名称
+     */
+    @TableField(exist = false)
+    @JsonInclude(JsonInclude.Include.NON_DEFAULT )
+    private String windpowerstationName;
+
+    /**
      * 项目编号
      */
     private String projectId;
@@ -50,8 +60,16 @@ public class ProEconEquipmentInfoDayTop extends Model {
     private String windturbineId;
 
     /**
+     * 风机名称
+     */
+    @TableField(exist = false)
+    @JsonInclude(JsonInclude.Include.NON_DEFAULT )
+    private String windturbineName;
+
+    /**
      * 日期
      */
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
     private Date recordDate;
 
     /**
@@ -359,41 +377,50 @@ public class ProEconEquipmentInfoDayTop extends Model {
      */
     private Integer types;
 
+    /**
+     * 综合排名
+     */
+    private Integer dayRank;
 
     /**
-     *年
+     * 综合排名
      */
-    private Integer year;
+    private Integer monthRank;
+
     /**
-     *
+     * 综合排名
      */
-    private Integer month;
+    private Integer yearRank;
 
+    /**
+     * 年
+     */
+    private Integer year;
 
     /**
-     * 综合排名
+     * 
      */
-    private Integer dayRank;
+    private Integer month;
 
     /**
-     * 等级
+     * 分数
      */
-    private String dayLevel;
+    private Double dayScore;
 
     /**
-     * 综合排名
+     * 分数
      */
-    private Integer monthRank;
+    private Double monthScore;
 
     /**
-     * 等级
+     * 分数
      */
-    private String monthLevel;
+    private Double yearScore;
 
     /**
-     * 综合排名
+     * 等级
      */
-    private Integer yearRank;
+    private String dayLevel;
 
     /**
      * 等级
@@ -401,9 +428,9 @@ public class ProEconEquipmentInfoDayTop extends Model {
     private String yearLevel;
 
     /**
-     * 分数
+     * 等级
      */
-    private Double dayScore;
-    private Double monthScore;
-    private Double yearScore;
+    private String monthLevel;
+
+
 }

+ 50 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/BrownoutsEvent2Service.java

@@ -0,0 +1,50 @@
+package com.gyee.runeconomy.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.gyee.runeconomy.model.auto.ProEconBrownoutsEvent2;
+import com.gyee.runeconomy.service.auto.IProEconBrownoutsEvent2Service;
+import com.gyee.runeconomy.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+
+@Service
+public class BrownoutsEvent2Service {
+
+    @Resource
+    private IProEconBrownoutsEvent2Service proEconBrownoutsEvent2Service;
+
+    public Page<ProEconBrownoutsEvent2> getBrownoutsEvent2List(Integer pageNum, Integer pageSize, String wtId, Date beginDate, Date endDate)  {
+
+        if(StringUtils.empty(pageNum))
+        {
+            pageNum=1;
+        }
+        if(StringUtils.empty(pageSize))
+        {
+            pageSize=10;
+        }
+        //构造分页构造器
+        Page<ProEconBrownoutsEvent2> pageInfo = new Page<>(pageNum, pageSize);
+        if (StringUtils.notEmp(wtId) && StringUtils.notEmp(beginDate)  && StringUtils.notEmp(endDate) )
+        {
+
+            //构造条件构造器
+            LambdaQueryWrapper<ProEconBrownoutsEvent2> queryWrapper = new LambdaQueryWrapper<>();
+            //添加过滤条件
+
+
+            queryWrapper.eq(ProEconBrownoutsEvent2::getWindturbineId, wtId).
+                    ge(ProEconBrownoutsEvent2::getStopTime, beginDate).
+                    le(ProEconBrownoutsEvent2::getStopTime, endDate);
+
+            //执行查询
+            proEconBrownoutsEvent2Service.page(pageInfo, queryWrapper);
+        }
+
+        return pageInfo;
+
+    }
+}

+ 50 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/ShutdownEvent2Service.java

@@ -0,0 +1,50 @@
+package com.gyee.runeconomy.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.gyee.runeconomy.model.auto.ProEconShutdownEvent2;
+import com.gyee.runeconomy.service.auto.IProEconShutdownEvent2Service;
+import com.gyee.runeconomy.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+
+@Service
+public class ShutdownEvent2Service {
+
+    @Resource
+    private IProEconShutdownEvent2Service proEconShutdownEvent2Service;
+
+    public Page<ProEconShutdownEvent2> getShutdownEventList(Integer pageNum, Integer pageSize, String wtId, Date beginDate, Date endDate)  {
+
+        if(StringUtils.empty(pageNum))
+        {
+            pageNum=1;
+        }
+        if(StringUtils.empty(pageSize))
+        {
+            pageSize=10;
+        }
+        //构造分页构造器
+        Page<ProEconShutdownEvent2> pageInfo = new Page<>(pageNum, pageSize);
+        if (StringUtils.notEmp(wtId) && StringUtils.notEmp(beginDate)  && StringUtils.notEmp(endDate) )
+        {
+
+            //构造条件构造器
+            LambdaQueryWrapper<ProEconShutdownEvent2> queryWrapper = new LambdaQueryWrapper<>();
+            //添加过滤条件
+
+
+            queryWrapper.eq(ProEconShutdownEvent2::getWindturbineId, wtId).
+                    ge(ProEconShutdownEvent2::getStopTime, beginDate).
+                    le(ProEconShutdownEvent2::getStopTime, endDate);
+
+            //执行查询
+            proEconShutdownEvent2Service.page(pageInfo, queryWrapper);
+        }
+
+        return pageInfo;
+
+    }
+}

+ 713 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/WtwindDayInfoService.java

@@ -458,4 +458,717 @@ public class WtwindDayInfoService {
 
         }
     }
+
+    public void nzdfs(String wtId, String recorddate, Map<String, Object> map, List<ValueVo> vos) {
+        if (StringUtils.notEmp(recorddate) && StringUtils.notEmp(wtId)) {
+
+            Date date = DateUtils.parseDate(recorddate);
+
+            List<ProEconWtwindDayInfo> wtdls = fzy(wtId, date);
+
+            if (!wtdls.isEmpty()) {
+
+                ProEconWtwindDayInfo winfo = wtdls.get(0);
+                int cb = (int) wtdls.get(0).getCb().intValue();
+                int cd = (int) wtdls.get(0).getCd().intValue();
+                int cg = (int) wtdls.get(0).getCg().intValue();
+
+                jfplday = "静风频率为" + cb;
+                jfplmonth = "静风频率为" + cd;
+                jfplyear = "静风频率为" + cg;
+                for (int i = 0; i < 16; i++) {
+                    ValueVo vo = new ValueVo();
+
+                    double temp1=0.0;
+                    double temp2=0.0;
+                    double temp3=0.0;
+                    switch (i) {
+                        case 0:
+                            temp1=null !=winfo.getN16()?winfo.getN16():0.0;
+                            temp2=null !=winfo.getN13()?winfo.getN13():0.0;
+                            temp3=null !=winfo.getN14()?winfo.getN14():0.0;
+
+                            vo.setName("N" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 1:
+                            temp1=null !=winfo.getNne16()?winfo.getNne16():0.0;
+                            temp2=null !=winfo.getNne13()?winfo.getNne13():0.0;
+                            temp3=null !=winfo.getNne14()?winfo.getNne14():0.0;
+
+                            vo.setName("NNE" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 2:
+                            temp1=null !=winfo.getNe16()?winfo.getNe16():0.0;
+                            temp2=null !=winfo.getNe13()?winfo.getNe13():0.0;
+                            temp3=null !=winfo.getNe14()?winfo.getNe14():0.0;
+
+                            vo.setName("NE" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 3:
+                            temp1=null !=winfo.getEne16()?winfo.getEne16():0.0;
+                            temp2=null !=winfo.getEne13()?winfo.getEne13():0.0;
+                            temp3=null !=winfo.getEne14()?winfo.getEne14():0.0;
+
+                            vo.setName("ENE" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+
+                            break;
+                        case 4:
+                            temp1=null !=winfo.getE16()?winfo.getE16():0.0;
+                            temp2=null !=winfo.getE13()?winfo.getE13():0.0;
+                            temp3=null !=winfo.getE14()?winfo.getE14():0.0;
+
+                            vo.setName("E(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 5:
+                            temp1=null !=winfo.getEse16()?winfo.getEse16():0.0;
+                            temp2=null !=winfo.getEse13()?winfo.getEse13():0.0;
+                            temp3=null !=winfo.getEse14()?winfo.getEse14():0.0;
+                            vo.setName("ESE(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 6:
+                            temp1=null !=winfo.getSe16()?winfo.getSe16():0.0;
+                            temp2=null !=winfo.getSe13()?winfo.getSe13():0.0;
+                            temp3=null !=winfo.getSe14()?winfo.getSe14():0.0;
+
+                            vo.setName("SE(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 7:
+                            temp1=null !=winfo.getSse16()?winfo.getSse16():0.0;
+                            temp2=null !=winfo.getSse13()?winfo.getSse13():0.0;
+                            temp3=null !=winfo.getSse14()?winfo.getSse14():0.0;
+                            vo.setName("SSE(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 8:
+                            temp1=null !=winfo.getS16()?winfo.getS16():0.0;
+                            temp2=null !=winfo.getS13()?winfo.getS13():0.0;
+                            temp3=null !=winfo.getS14()?winfo.getS14():0.0;
+                            vo.setName("S(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 9:
+                            temp1=null !=winfo.getSsw16()?winfo.getSsw16():0.0;
+                            temp2=null !=winfo.getSsw13()?winfo.getSsw13():0.0;
+                            temp3=null !=winfo.getSsw14()?winfo.getSsw14():0.0;
+
+                            vo.setName("SSW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 10:
+                            temp1=null !=winfo.getSw16()?winfo.getSw16():0.0;
+                            temp2=null !=winfo.getSw13()?winfo.getSw13():0.0;
+                            temp3=null !=winfo.getSw14()?winfo.getSw14():0.0;
+
+                            vo.setName("SW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 11:
+                            temp1=null !=winfo.getWsw16()?winfo.getWsw16():0.0;
+                            temp2=null !=winfo.getWsw13()?winfo.getWsw13():0.0;
+                            temp3=null !=winfo.getWsw14()?winfo.getWsw14():0.0;
+
+                            vo.setName("WSW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 12:
+                            temp1=null !=winfo.getW16()?winfo.getW16():0.0;
+                            temp2=null !=winfo.getW13()?winfo.getW13():0.0;
+                            temp3=null !=winfo.getW14()?winfo.getW14():0.0;
+
+                            vo.setName("W(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 13:
+                            temp1=null !=winfo.getWnw16()?winfo.getWnw16():0.0;
+                            temp2=null !=winfo.getWnw13()?winfo.getWnw13():0.0;
+                            temp3=null !=winfo.getWnw14()?winfo.getWnw14():0.0;
+
+                            vo.setName("WNW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 14:
+                            temp1=null !=winfo.getNw16()?winfo.getNw16():0.0;
+                            temp2=null !=winfo.getNw13()?winfo.getNw13():0.0;
+                            temp3=null !=winfo.getNw14()?winfo.getNw14():0.0;
+
+                            vo.setName("NW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 15:
+                            temp1=null !=winfo.getNnw16()?winfo.getNnw16():0.0;
+                            temp2=null !=winfo.getNnw13()?winfo.getNnw13():0.0;
+                            temp3=null !=winfo.getNnw14()?winfo.getNnw14():0.0;
+
+                            vo.setName("NNW" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+
+
+                        default:
+                            break;
+                    }
+
+                    vos.add(vo);
+
+                }
+
+            }
+
+            map.put("jfpl", jfplyear);
+            map.put("data", vos);
+
+        }
+    }
+
+    public void rfxpl(String wtId, String recorddate, Map<String, Object> map, List<ValueVo> vos) {
+        if (StringUtils.notEmp(recorddate) && StringUtils.notEmp(wtId)) {
+
+            Date date = DateUtils.parseDate(recorddate);
+
+            List<ProEconWtwindDayInfo> wtdls = fzy(wtId, date);
+
+            if (!wtdls.isEmpty()) {
+
+                ProEconWtwindDayInfo winfo = wtdls.get(0);
+                int cb = (int) wtdls.get(0).getCb().intValue();
+                int cd = (int) wtdls.get(0).getCd().intValue();
+                int cg = (int) wtdls.get(0).getCg().intValue();
+
+                jfplday = "静风频率为" + cb;
+                jfplmonth = "静风频率为" + cd;
+                jfplyear = "静风频率为" + cg;
+                for (int i = 0; i < 16; i++) {
+                    ValueVo vo = new ValueVo();
+
+                    double temp1=0.0;
+                    double temp2=0.0;
+                    double temp3=0.0;
+                    switch (i) {
+                        case 0:
+                            temp1=null !=winfo.getN4()?winfo.getN4():0.0;
+                            temp2=null !=winfo.getN()?winfo.getN():0.0;
+                            temp3=null !=winfo.getN4()?winfo.getN4():0.0;
+
+                            vo.setName("N" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 1:
+                            temp1=null !=winfo.getNne4()?winfo.getNne4():0.0;
+                            temp2=null !=winfo.getNne()?winfo.getNne():0.0;
+                            temp3=null !=winfo.getNne4()?winfo.getNne4():0.0;
+
+                            vo.setName("NNE" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 2:
+                            temp1=null !=winfo.getNe4()?winfo.getNe4():0.0;
+                            temp2=null !=winfo.getNe()?winfo.getNe():0.0;
+                            temp3=null !=winfo.getNe4()?winfo.getNe4():0.0;
+
+                            vo.setName("NE" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 3:
+                            temp1=null !=winfo.getEne4()?winfo.getEne4():0.0;
+                            temp2=null !=winfo.getEne()?winfo.getEne():0.0;
+                            temp3=null !=winfo.getEne4()?winfo.getEne4():0.0;
+
+                            vo.setName("ENE" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+
+                            break;
+
+                        case 4:
+                            temp1=null !=winfo.getE4()?winfo.getE4():0.0;
+                            temp2=null !=winfo.getE()?winfo.getE():0.0;
+                            temp3=null !=winfo.getE4()?winfo.getE4():0.0;
+
+                            vo.setName("E(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 5:
+                            temp1=null !=winfo.getEse4()?winfo.getEse4():0.0;
+                            temp2=null !=winfo.getEse()?winfo.getEse():0.0;
+                            temp3=null !=winfo.getEse4()?winfo.getEse4():0.0;
+                            vo.setName("ESE(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 6:
+                            temp1=null !=winfo.getSe4()?winfo.getSe4():0.0;
+                            temp2=null !=winfo.getSe()?winfo.getSe():0.0;
+                            temp3=null !=winfo.getSe4()?winfo.getSe4():0.0;
+
+                            vo.setName("SE(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 7:
+                            temp1=null !=winfo.getSse4()?winfo.getSse4():0.0;
+                            temp2=null !=winfo.getSse()?winfo.getSse():0.0;
+                            temp3=null !=winfo.getSse4()?winfo.getSse4():0.0;
+                            vo.setName("SSE(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 8:
+                            temp1=null !=winfo.getS4()?winfo.getS4():0.0;
+                            temp2=null !=winfo.getS()?winfo.getS():0.0;
+                            temp3=null !=winfo.getS4()?winfo.getS4():0.0;
+                            vo.setName("S(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 9:
+                            temp1=null !=winfo.getSsw4()?winfo.getSsw4():0.0;
+                            temp2=null !=winfo.getSsw()?winfo.getSsw():0.0;
+                            temp3=null !=winfo.getSsw4()?winfo.getSsw4():0.0;
+
+                            vo.setName("SSW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 10:
+                            temp1=null !=winfo.getSw4()?winfo.getSw4():0.0;
+                            temp2=null !=winfo.getSw()?winfo.getSw():0.0;
+                            temp3=null !=winfo.getSw4()?winfo.getSw4():0.0;
+
+                            vo.setName("SW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 11:
+                            temp1=null !=winfo.getWsw4()?winfo.getWsw4():0.0;
+                            temp2=null !=winfo.getWsw()?winfo.getWsw():0.0;
+                            temp3=null !=winfo.getWsw4()?winfo.getWsw4():0.0;
+
+                            vo.setName("WSW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 12:
+                            temp1=null !=winfo.getW4()?winfo.getW4():0.0;
+                            temp2=null !=winfo.getW()?winfo.getW():0.0;
+                            temp3=null !=winfo.getW4()?winfo.getW4():0.0;
+
+                            vo.setName("W(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 13:
+                            temp1=null !=winfo.getWnw4()?winfo.getWnw4():0.0;
+                            temp2=null !=winfo.getWnw()?winfo.getWnw():0.0;
+                            temp3=null !=winfo.getWnw4()?winfo.getWnw4():0.0;
+
+                            vo.setName("WNW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 14:
+                            temp1=null !=winfo.getNw4()?winfo.getNw4():0.0;
+                            temp2=null !=winfo.getNw()?winfo.getNw():0.0;
+                            temp3=null !=winfo.getNw4()?winfo.getNw4():0.0;
+
+                            vo.setName("NW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 15:
+                            temp1=null !=winfo.getNnw4()?winfo.getNnw4():0.0;
+                            temp2=null !=winfo.getNnw()?winfo.getNnw():0.0;
+                            temp3=null !=winfo.getNnw4()?winfo.getNnw4():0.0;
+
+                            vo.setName("NNW" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+
+                        default:
+                            break;
+                    }
+
+                    vos.add(vo);
+
+                }
+
+            }
+
+            map.put("jfpl", jfplday);
+            map.put("data", vos);
+
+        }
+    }
+    public void yfxpl(String wtId, String recorddate, Map<String, Object> map, List<ValueVo> vos) {
+        if (StringUtils.notEmp(recorddate) && StringUtils.notEmp(wtId)) {
+
+            Date date = DateUtils.parseDate(recorddate);
+
+            List<ProEconWtwindDayInfo> wtdls = fzy(wtId, date);
+
+            if (!wtdls.isEmpty()) {
+
+                ProEconWtwindDayInfo winfo = wtdls.get(0);
+                int cb = (int) wtdls.get(0).getCb().intValue();
+                int cd = (int) wtdls.get(0).getCd().intValue();
+                int cg = (int) wtdls.get(0).getCg().intValue();
+
+                jfplday = "静风频率为" + cb;
+                jfplmonth = "静风频率为" + cd;
+                jfplyear = "静风频率为" + cg;
+                for (int i = 0; i < 16; i++) {
+                    ValueVo vo = new ValueVo();
+                    double temp1=0.0;
+                    double temp2=0.0;
+                    double temp3=0.0;
+                    switch (i) {
+                        case 0:
+                            temp1=null !=winfo.getN10()?winfo.getN10():0.0;
+                            temp2=null !=winfo.getN7()?winfo.getN7():0.0;
+                            temp3=null !=winfo.getN10()?winfo.getN10():0.0;
+
+                            vo.setName("N" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 1:
+                            temp1=null !=winfo.getNne10()?winfo.getNne10():0.0;
+                            temp2=null !=winfo.getNne7()?winfo.getNne7():0.0;
+                            temp3=null !=winfo.getNne10()?winfo.getNne10():0.0;
+
+                            vo.setName("NNE" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 2:
+                            temp1=null !=winfo.getNe10()?winfo.getNe10():0.0;
+                            temp2=null !=winfo.getNe7()?winfo.getNe7():0.0;
+                            temp3=null !=winfo.getNe10()?winfo.getNe10():0.0;
+
+                            vo.setName("NE" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 3:
+                            temp1=null !=winfo.getEne10()?winfo.getEne10():0.0;
+                            temp2=null !=winfo.getEne7()?winfo.getEne7():0.0;
+                            temp3=null !=winfo.getEne10()?winfo.getEne10():0.0;
+
+                            vo.setName("ENE" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+
+                            break;
+                        case 4:
+                            temp1=null !=winfo.getE10()?winfo.getE10():0.0;
+                            temp2=null !=winfo.getE7()?winfo.getE7():0.0;
+                            temp3=null !=winfo.getE10()?winfo.getE10():0.0;
+
+                            vo.setName("E(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 5:
+                            temp1=null !=winfo.getEse10()?winfo.getEse10():0.0;
+                            temp2=null !=winfo.getEse7()?winfo.getEse7():0.0;
+                            temp3=null !=winfo.getEse10()?winfo.getEse10():0.0;
+                            vo.setName("ESE(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 6:
+                            temp1=null !=winfo.getSe10()?winfo.getSe10():0.0;
+                            temp2=null !=winfo.getSe7()?winfo.getSe7():0.0;
+                            temp3=null !=winfo.getSe10()?winfo.getSe10():0.0;
+
+                            vo.setName("SE(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 7:
+                            temp1=null !=winfo.getSse10()?winfo.getSse10():0.0;
+                            temp2=null !=winfo.getSse7()?winfo.getSse7():0.0;
+                            temp3=null !=winfo.getSse10()?winfo.getSse10():0.0;
+                            vo.setName("SSE(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 8:
+                            temp1=null !=winfo.getS10()?winfo.getS10():0.0;
+                            temp2=null !=winfo.getS7()?winfo.getS7():0.0;
+                            temp3=null !=winfo.getS10()?winfo.getS10():0.0;
+                            vo.setName("S(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 9:
+                            temp1=null !=winfo.getSsw10()?winfo.getSsw10():0.0;
+                            temp2=null !=winfo.getSsw7()?winfo.getSsw7():0.0;
+                            temp3=null !=winfo.getSsw10()?winfo.getSsw10():0.0;
+
+                            vo.setName("SSW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 10:
+                            temp1=null !=winfo.getSw10()?winfo.getSw10():0.0;
+                            temp2=null !=winfo.getSw7()?winfo.getSw7():0.0;
+                            temp3=null !=winfo.getSw10()?winfo.getSw10():0.0;
+
+                            vo.setName("SW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 11:
+                            temp1=null !=winfo.getWsw10()?winfo.getWsw10():0.0;
+                            temp2=null !=winfo.getWsw7()?winfo.getWsw7():0.0;
+                            temp3=null !=winfo.getWsw10()?winfo.getWsw10():0.0;
+
+                            vo.setName("WSW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 12:
+                            temp1=null !=winfo.getW10()?winfo.getW10():0.0;
+                            temp2=null !=winfo.getW7()?winfo.getW7():0.0;
+                            temp3=null !=winfo.getW10()?winfo.getW10():0.0;
+
+                            vo.setName("W(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 13:
+                            temp1=null !=winfo.getWnw10()?winfo.getWnw10():0.0;
+                            temp2=null !=winfo.getWnw7()?winfo.getWnw7():0.0;
+                            temp3=null !=winfo.getWnw10()?winfo.getWnw10():0.0;
+
+                            vo.setName("WNW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 14:
+                            temp1=null !=winfo.getNw10()?winfo.getNw10():0.0;
+                            temp2=null !=winfo.getNw7()?winfo.getNw7():0.0;
+                            temp3=null !=winfo.getNw10()?winfo.getNw10():0.0;
+
+                            vo.setName("NW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 15:
+                            temp1=null !=winfo.getNnw10()?winfo.getNnw10():0.0;
+                            temp2=null !=winfo.getNnw7()?winfo.getNnw7():0.0;
+                            temp3=null !=winfo.getNnw10()?winfo.getNnw10():0.0;
+
+                            vo.setName("NNW" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+
+
+                        default:
+                            break;
+                    }
+
+                    vos.add(vo);
+
+                }
+
+            }
+
+            map.put("jfpl", jfplmonth);
+            map.put("data", vos);
+
+        }
+    }
+
+    public void nfxpl(String wtId, String recorddate, Map<String, Object> map, List<ValueVo> vos) {
+        if (StringUtils.notEmp(recorddate) && StringUtils.notEmp(wtId)) {
+
+            Date date = DateUtils.parseDate(recorddate);
+
+            List<ProEconWtwindDayInfo> wtdls = fzy(wtId, date);
+
+            if (!wtdls.isEmpty()) {
+
+                ProEconWtwindDayInfo winfo = wtdls.get(0);
+                int cb = (int) wtdls.get(0).getCb().intValue();
+                int cd = (int) wtdls.get(0).getCd().intValue();
+                int cg = (int) wtdls.get(0).getCg().intValue();
+
+                jfplday = "静风频率为" + cb;
+                jfplmonth = "静风频率为" + cd;
+                jfplyear = "静风频率为" + cg;
+                for (int i = 0; i < 16; i++) {
+                    ValueVo vo = new ValueVo();
+                    double temp1=0.0;
+                    double temp2=0.0;
+                    double temp3=0.0;
+                    switch (i) {
+                        case 0:
+                            temp1=null !=winfo.getN16()?winfo.getN16():0.0;
+                            temp2=null !=winfo.getN13()?winfo.getN13():0.0;
+                            temp3=null !=winfo.getN16()?winfo.getN16():0.0;
+
+                            vo.setName("N" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 1:
+                            temp1=null !=winfo.getNne16()?winfo.getNne16():0.0;
+                            temp2=null !=winfo.getNne13()?winfo.getNne13():0.0;
+                            temp3=null !=winfo.getNne16()?winfo.getNne16():0.0;
+
+                            vo.setName("NNE" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 2:
+                            temp1=null !=winfo.getNe16()?winfo.getNe16():0.0;
+                            temp2=null !=winfo.getNe13()?winfo.getNe13():0.0;
+                            temp3=null !=winfo.getNe16()?winfo.getNe16():0.0;
+
+                            vo.setName("NE" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 3:
+                            temp1=null !=winfo.getEne16()?winfo.getEne16():0.0;
+                            temp2=null !=winfo.getEne13()?winfo.getEne13():0.0;
+                            temp3=null !=winfo.getEne16()?winfo.getEne16():0.0;
+
+                            vo.setName("ENE" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+
+                            break;
+                        case 4:
+                            temp1=null !=winfo.getE16()?winfo.getE16():0.0;
+                            temp2=null !=winfo.getE13()?winfo.getE13():0.0;
+                            temp3=null !=winfo.getE16()?winfo.getE16():0.0;
+
+                            vo.setName("E(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 5:
+                            temp1=null !=winfo.getEse16()?winfo.getEse16():0.0;
+                            temp2=null !=winfo.getEse13()?winfo.getEse13():0.0;
+                            temp3=null !=winfo.getEse16()?winfo.getEse16():0.0;
+                            vo.setName("ESE(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 6:
+                            temp1=null !=winfo.getSe16()?winfo.getSe16():0.0;
+                            temp2=null !=winfo.getSe13()?winfo.getSe13():0.0;
+                            temp3=null !=winfo.getSe16()?winfo.getSe16():0.0;
+
+                            vo.setName("SE(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 7:
+                            temp1=null !=winfo.getSse16()?winfo.getSse16():0.0;
+                            temp2=null !=winfo.getSse13()?winfo.getSse13():0.0;
+                            temp3=null !=winfo.getSse16()?winfo.getSse16():0.0;
+                            vo.setName("SSE(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 8:
+                            temp1=null !=winfo.getS16()?winfo.getS16():0.0;
+                            temp2=null !=winfo.getS13()?winfo.getS13():0.0;
+                            temp3=null !=winfo.getS16()?winfo.getS16():0.0;
+                            vo.setName("S(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 9:
+                            temp1=null !=winfo.getSsw16()?winfo.getSsw16():0.0;
+                            temp2=null !=winfo.getSsw13()?winfo.getSsw13():0.0;
+                            temp3=null !=winfo.getSsw16()?winfo.getSsw16():0.0;
+
+                            vo.setName("SSW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+                            break;
+                        case 10:
+                            temp1=null !=winfo.getSw16()?winfo.getSw16():0.0;
+                            temp2=null !=winfo.getSw13()?winfo.getSw13():0.0;
+                            temp3=null !=winfo.getSw16()?winfo.getSw16():0.0;
+
+                            vo.setName("SW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 11:
+                            temp1=null !=winfo.getWsw16()?winfo.getWsw16():0.0;
+                            temp2=null !=winfo.getWsw13()?winfo.getWsw13():0.0;
+                            temp3=null !=winfo.getWsw16()?winfo.getWsw16():0.0;
+
+                            vo.setName("WSW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 12:
+                            temp1=null !=winfo.getW16()?winfo.getW16():0.0;
+                            temp2=null !=winfo.getW13()?winfo.getW13():0.0;
+                            temp3=null !=winfo.getW16()?winfo.getW16():0.0;
+
+                            vo.setName("W(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 13:
+                            temp1=null !=winfo.getWnw16()?winfo.getWnw16():0.0;
+                            temp2=null !=winfo.getWnw13()?winfo.getWnw13():0.0;
+                            temp3=null !=winfo.getWnw16()?winfo.getWnw16():0.0;
+
+                            vo.setName("WNW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 14:
+                            temp1=null !=winfo.getNw16()?winfo.getNw16():0.0;
+                            temp2=null !=winfo.getNw13()?winfo.getNw13():0.0;
+                            temp3=null !=winfo.getNw16()?winfo.getNw16():0.0;
+
+                            vo.setName("NW(" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+                        case 15:
+                            temp1=null !=winfo.getNnw16()?winfo.getNnw16():0.0;
+                            temp2=null !=winfo.getNnw13()?winfo.getNnw13():0.0;
+                            temp3=null !=winfo.getNnw16()?winfo.getNnw16():0.0;
+
+                            vo.setName("NNW" + temp1 + "/" + temp2 + ")");
+                            vo.setData1(temp3);
+
+                            break;
+
+
+                        default:
+                            break;
+                    }
+
+                    vos.add(vo);
+
+                }
+
+            }
+
+            map.put("jfpl", jfplyear);
+            map.put("data", vos);
+
+        }
+    }
 }

+ 14 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProBasicEquipmentService.java

@@ -3,6 +3,8 @@ package com.gyee.runeconomy.service.auto;
 import com.gyee.runeconomy.model.auto.ProBasicEquipment;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  * 风机&光伏 服务类
@@ -13,4 +15,16 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProBasicEquipmentService extends IService<ProBasicEquipment> {
 
+    /**
+     * 多场站 多期次线路获取设备列表
+     * @param companyIds
+     * @param windpowerstationIds
+     * @param projectIds
+     * @param lineIds
+     * @return
+     */
+    List<ProBasicEquipment> getProBasicEquipmentList(String companyIds, String windpowerstationIds, String projectIds, String lineIds,String  type);
+
+
+
 }

+ 16 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconEquipmentInfoDayTopService.java

@@ -3,6 +3,9 @@ package com.gyee.runeconomy.service.auto;
 import com.gyee.runeconomy.model.auto.ProEconEquipmentInfoDayTop;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * <p>
  * 风机日信息表排行 服务类
@@ -13,4 +16,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProEconEquipmentInfoDayTopService extends IService<ProEconEquipmentInfoDayTop> {
 
+
+    /** 管理列表*/
+    List<ProEconEquipmentInfoDayTop> getEquipmentInfoDayTopList(String companyId, String windpowerstationId, Integer types, String staType, String date);
+
+
+    /** 历史数据 */
+    List<ProEconEquipmentInfoDayTop> getEquipmentInfoDayTopHistoryList(String windturbineId, Integer types, String beginDate, String endDate);
+
+
+    /** 对比数据 */
+    Map<String, Object> getEquipmentInfoDayTopCompareList(List<Long> ids, Integer types);
+
+
 }

+ 2 - 2
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPointCodeService.java

@@ -19,10 +19,10 @@ import java.util.Map;
 public interface IProEconPointCodeService extends IService<ProEconPointCode> {
 
 
-    List<ProEconPointCode> getEconPointCodeList(String equipmentType);
+    List<ProEconPointCode> getEconPointCodeList();
 
     ProEconPointCode getProEconPointCode(String nemCode);
 
-    List<ProEconPointCodeDTO>  getEconPointRanking(String regionId, String companyId, String pointCode);
+    List<ProEconPointCodeDTO>  getEconPointRanking(String regionId, String companyId, String pointCode,Date date,String dateType);
 
 }

+ 2 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPowerstationInfoDay1Service.java

@@ -33,4 +33,6 @@ public interface IProEconPowerstationInfoDay1Service extends IService<ProEconPow
     List<ProEconPowerstationInfoDay1> getEconFiveLosslist(String foreignKeyId, String staType, String dateType, Date date);
 
 
+    List<ProEconPowerstationInfoDay1> getEconFiveLosslist(List<String> foreignKeyIds, Date date);
+
 }

+ 3 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPowerstationInfoDay4Service.java

@@ -40,4 +40,7 @@ public interface IProEconPowerstationInfoDay4Service extends IService<ProEconPow
 
    List<ProEconPowerstationInfoDay4> getEconThreeRateCurve(String foreignKeyId, String staType, String dateType, Date  date);
 
+
+    List<ProEconPowerstationInfoDay4> getEconThreeRateCurvelist(List<String> foreignKeyIds, Date date);
+
 }

+ 4 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconWtAlysisDayService.java

@@ -3,6 +3,8 @@ package com.gyee.runeconomy.service.auto;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.gyee.runeconomy.model.auto.ProEconWtAlysisDay;
 
+import java.util.List;
+
 /**
  * <p>
  * 风机日性能分析表 服务类
@@ -13,4 +15,6 @@ import com.gyee.runeconomy.model.auto.ProEconWtAlysisDay;
  */
 public interface IProEconWtAlysisDayService extends IService<ProEconWtAlysisDay> {
 
+    List<ProEconWtAlysisDay> getProEconWtAlysisDayList(String windturbineIds, String date);
+
 }

+ 5 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconWtPowerCurveFittingService.java

@@ -3,6 +3,9 @@ package com.gyee.runeconomy.service.auto;
 import com.gyee.runeconomy.model.auto.ProEconWtPowerCurveFitting;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * <p>
  * 风电机功率拟合曲线 服务类
@@ -14,4 +17,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
 public interface IProEconWtPowerCurveFittingService extends IService<ProEconWtPowerCurveFitting> {
 
     public int deleteProEconWtPowerCurveFitting();
+
+    Map<String, List<ProEconWtPowerCurveFitting>>   getgroupProEconWtPowerCurveFittingList(String windturbineIds);
 }

+ 4 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconWtwindDayInfoService.java

@@ -3,6 +3,8 @@ package com.gyee.runeconomy.service.auto;
 import com.gyee.runeconomy.model.auto.ProEconWtwindDayInfo;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  * 1、日风向平均风速
@@ -30,4 +32,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProEconWtwindDayInfoService extends IService<ProEconWtwindDayInfo> {
 
+    List<ProEconWtwindDayInfo> getProEconWtwindDayInfoList(String windturbineIds, String date);
+
 }

+ 42 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProBasicEquipmentServiceImpl.java

@@ -1,11 +1,17 @@
 package com.gyee.runeconomy.service.auto.impl;
 
+import com.gyee.common.model.StringUtils;
+import com.gyee.common.util.SortUtils;
+import com.gyee.runeconomy.init.CacheContext;
 import com.gyee.runeconomy.model.auto.ProBasicEquipment;
 import com.gyee.runeconomy.mapper.auto.ProBasicEquipmentMapper;
 import com.gyee.runeconomy.service.auto.IProBasicEquipmentService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+import java.util.stream.Collectors;
+
 /**
  * <p>
  * 风机&光伏 服务实现类
@@ -17,4 +23,40 @@ import org.springframework.stereotype.Service;
 @Service
 public class ProBasicEquipmentServiceImpl extends ServiceImpl<ProBasicEquipmentMapper, ProBasicEquipment> implements IProBasicEquipmentService {
 
+
+    @Override
+    public List<ProBasicEquipment> getProBasicEquipmentList(String companyId, String windpowerstationIds, String projectIds, String lineIds,String  type) {
+
+
+        List<ProBasicEquipment> list = CacheContext.wtls;
+
+        if (StringUtils.isNotEmpty(type) && !type.equals("0")){
+            String finalType  =  type.equals("-1") ? "_FDC" : "_GDC";
+            list = list.stream().filter(eq-> eq.getWindpowerstationId().indexOf(finalType) >= 0).collect(Collectors.toList());
+        }
+
+        //判断后缀是区域还是公司
+        if (StringUtils.isNotEmpty(companyId) && companyId.endsWith("_ZGS")) {
+            list = list.stream().filter(eq->companyId.equals(eq.getCompanyId())).collect(Collectors.toList());
+        }
+        if (StringUtils.isNotEmpty(companyId) && companyId.endsWith("_RGN")) {
+            list = list.stream().filter(eq->companyId.equals(eq.getRegionId())).collect(Collectors.toList());
+        }
+
+
+        if (StringUtils.isNotEmpty(windpowerstationIds)) {
+            list = list.stream().filter(eq->windpowerstationIds.contains(eq.getWindpowerstationId())).collect(Collectors.toList());
+        }
+
+        if (StringUtils.isNotEmpty(projectIds)) {
+            list = list.stream().filter(eq->projectIds.contains(eq.getProjectId())).collect(Collectors.toList());
+        }
+
+        if (StringUtils.isNotEmpty(lineIds)) {
+            list = list.stream().filter(eq->lineIds.contains(eq.getLineId())).collect(Collectors.toList());
+        }
+
+        SortUtils.sort(list,"nemCode",SortUtils.ASC);
+        return list;
+    }
 }

+ 146 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconEquipmentInfoDayTopServiceImpl.java

@@ -1,11 +1,23 @@
 package com.gyee.runeconomy.service.auto.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.gyee.common.model.StringUtils;
+import com.gyee.common.util.DateUtils;
+import com.gyee.common.vo.healthmanager.CompareVo;
+import com.gyee.runeconomy.init.CacheContext;
+import com.gyee.runeconomy.model.auto.ProBasicPowerstation;
 import com.gyee.runeconomy.model.auto.ProEconEquipmentInfoDayTop;
 import com.gyee.runeconomy.mapper.auto.ProEconEquipmentInfoDayTopMapper;
 import com.gyee.runeconomy.service.auto.IProEconEquipmentInfoDayTopService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
 /**
  * <p>
  * 风机日信息表排行 服务实现类
@@ -17,4 +29,138 @@ import org.springframework.stereotype.Service;
 @Service
 public class ProEconEquipmentInfoDayTopServiceImpl extends ServiceImpl<ProEconEquipmentInfoDayTopMapper, ProEconEquipmentInfoDayTop> implements IProEconEquipmentInfoDayTopService {
 
+    @Override
+    public List<ProEconEquipmentInfoDayTop> getEquipmentInfoDayTopList(String companyId, String windpowerstationId, Integer types, String staType, String date) {
+
+        QueryWrapper<ProEconEquipmentInfoDayTop> qw = new QueryWrapper<>();
+
+
+        List<String> wpids = new ArrayList<>();
+        List<ProBasicPowerstation> wplist = CacheContext.wpls;
+        //场站模糊查询
+        if (StringUtils.isNotEmpty(companyId)) {
+            wplist = CacheContext.wpls.stream().filter(wp -> wp.getRegionId().equals(companyId) || wp.getCompanyId().equals(companyId)).collect(Collectors.toList());
+        }
+
+        if (StringUtils.isNotEmpty(staType) && !staType.equals("0")) {
+            String finalType = staType.equals("-1") ? "_FDC" : "_GDC";
+            wplist = wplist.stream().filter(wp -> wp.getId().indexOf(finalType) >= 0).collect(Collectors.toList());
+        }
+        wpids = wplist.stream().map(ProBasicPowerstation::getId).collect(Collectors.toList());
+        if (StringUtils.isNotEmpty(windpowerstationId)) {
+            wpids.add(windpowerstationId);
+        }
+
+        //匹配场站条件
+        if (wpids.size() > 0) {
+            qw.lambda().in(ProEconEquipmentInfoDayTop::getWindpowerstationId, wpids);
+        }
+        if (StringUtils.isNotEmpty(date)) {
+            qw.lambda().eq(ProEconEquipmentInfoDayTop::getRecordDate, DateUtils.parseDate(date));
+        }
+        if (null != types) {
+            qw.lambda().eq(ProEconEquipmentInfoDayTop::getTypes, types);
+        }
+
+        qw.lambda().orderByAsc(ProEconEquipmentInfoDayTop::getWindturbineId);
+        List<ProEconEquipmentInfoDayTop> list = baseMapper.selectList(qw);
+        return list;
+    }
+
+    @Override
+    public List<ProEconEquipmentInfoDayTop> getEquipmentInfoDayTopHistoryList(String windturbineId, Integer types, String beginDate, String endDate) {
+
+        QueryWrapper<ProEconEquipmentInfoDayTop> qw = new QueryWrapper<>();
+
+
+        if (StringUtils.isNotEmpty(windturbineId)) {
+            qw.lambda().eq(ProEconEquipmentInfoDayTop::getWindturbineId, windturbineId);
+        }
+        if (null != types) {
+            qw.lambda().eq(ProEconEquipmentInfoDayTop::getTypes, types);
+        }
+
+        if (StringUtils.isNotEmpty(beginDate) && StringUtils.isNotEmpty(endDate))
+            qw.lambda().ge(ProEconEquipmentInfoDayTop::getRecordDate, DateUtils.parseDate(beginDate)).
+                    le(ProEconEquipmentInfoDayTop::getRecordDate, DateUtils.parseDate(endDate));
+
+
+        List<ProEconEquipmentInfoDayTop> list = baseMapper.selectList(qw);
+
+        return list;
+    }
+
+    @Override
+    public Map<String, Object> getEquipmentInfoDayTopCompareList(List<Long> ids, Integer types) {
+        Map<String, Object> resultMap = new HashMap<>();
+        Map<String, Object> chartsMap = new HashMap<>();
+        QueryWrapper<ProEconEquipmentInfoDayTop> qw = new QueryWrapper<>();
+
+
+        if (null != ids && ids.size() > 0) {
+            qw.lambda().in(ProEconEquipmentInfoDayTop::getId, ids);
+        }
+        List<ProEconEquipmentInfoDayTop> list = baseMapper.selectList(qw);
+        resultMap.put("data", list);
+
+        List<CompareVo> compareList = new ArrayList<>();
+        list.stream().forEach(wtd -> {
+
+            for (int i = 0; i < 10; i++) {
+                CompareVo vo = new CompareVo();
+
+                switch (i) {
+                    case 0:
+                        vo.setTarget("平均切入风速");
+                        vo.setData(wtd.getYearxfqr());
+                        break;
+                    case 1:
+                        vo.setTarget("性能损失电量");
+                        vo.setData(wtd.getYearxnssdl());
+                        break;
+                    case 2:
+                        vo.setTarget("拟合优度");
+                        vo.setData(wtd.getYearnhyd());
+                        break;
+                    case 3:
+                        vo.setTarget("功率一致性系数");
+                        vo.setData(wtd.getYearglyzxxs());
+                        break;
+                    case 4:
+                        vo.setTarget("利用小时");
+                        vo.setData(wtd.getYearlyxs());
+                        break;
+                    case 5:
+                        vo.setTarget("设备可利用率");
+                        vo.setData(wtd.getYearsbklyl());
+                        break;
+                    case 6:
+                        vo.setTarget("等效可利用系数");
+                        vo.setData(wtd.getYeardxkyxs());
+                        break;
+                    case 7:
+                        vo.setTarget("有效风时数");
+                        vo.setData(wtd.getYearyxfss());
+                        break;
+                    case 8:
+                        vo.setTarget("平均风速");
+                        vo.setData(wtd.getYearfs());
+                        break;
+                    case 9:
+                        vo.setTarget("静风频率");
+                        vo.setData(wtd.getYearjfpl());
+                        break;
+                    default:
+                        break;
+                }
+                compareList.add(vo);
+            }
+            chartsMap.put(wtd.getWindturbineId(), compareList);
+
+        });
+        resultMap.put("charts", compareList);
+        return resultMap;
+    }
+
+
 }

+ 573 - 38
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPointCodeServiceImpl.java

@@ -1,20 +1,19 @@
 package com.gyee.runeconomy.service.auto.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.gyee.common.model.PointData;
 import com.gyee.common.model.StringUtils;
 import com.gyee.runeconomy.dto.response.ProEconPointCodeDTO;
-import com.gyee.runeconomy.model.auto.ProBasicPowerstation;
-import com.gyee.runeconomy.model.auto.ProBasicPowerstationPoint;
-import com.gyee.runeconomy.model.auto.ProEconPointCode;
+import com.gyee.runeconomy.init.CacheContext;
+import com.gyee.runeconomy.model.auto.*;
 import com.gyee.runeconomy.mapper.auto.ProEconPointCodeMapper;
-import com.gyee.runeconomy.service.auto.IProBasicPowerstationPointService;
 import com.gyee.runeconomy.service.auto.IProEconPointCodeService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.gyee.runeconomy.util.realtimesource.EdosUtil;
+import com.gyee.runeconomy.service.auto.IProEconPowerstationInfoDay1Service;
+import com.gyee.runeconomy.service.auto.IProEconPowerstationInfoDay4Service;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -31,28 +30,20 @@ public class ProEconPointCodeServiceImpl extends ServiceImpl<ProEconPointCodeMap
 
 
     @Autowired
-    private ProBasicPowerstationServiceImpl proBasicPowerstationService;
+    private IProEconPowerstationInfoDay1Service proEconPowerstationInfoDay1Service;
 
     @Autowired
-    private IProBasicPowerstationPointService proBasicPowerstationPointService;
+    private ProBasicPowerstationServiceImpl proBasicPowerstationService;
 
     @Autowired
-    private EdosUtil edosUtil;
+    private IProEconPowerstationInfoDay4Service proEconPowerstationInfoDay4Service;
+
 
 
     @Override
-    public List<ProEconPointCode> getEconPointCodeList(String equipmentType) {
+    public List<ProEconPointCode> getEconPointCodeList() {
         QueryWrapper<ProEconPointCode> qw = new QueryWrapper<>();
         List<ProEconPointCode> list = baseMapper.selectList(qw);
-        if (StringUtils.isNotEmpty(equipmentType) && equipmentType.equals("-1")) {
-
-          list = list.stream().filter(i ->i.getEquipmentType().equals("fj")).collect(Collectors.toList());
-        }
-        if (StringUtils.isNotEmpty(equipmentType) && equipmentType.equals("-2")) {
-
-            list = list.stream().filter(i -> i.getId().indexOf("gf") >= 0).collect(Collectors.toList());
-        }
-
         return list;
     }
 
@@ -60,39 +51,583 @@ public class ProEconPointCodeServiceImpl extends ServiceImpl<ProEconPointCodeMap
     public ProEconPointCode getProEconPointCode(String nemCode) {
         QueryWrapper<ProEconPointCode> qw = new QueryWrapper<>();
 
-        if (StringUtils.isNotEmpty(nemCode) ) {
-            qw.lambda().eq(ProEconPointCode::getNemCode,nemCode);
+        if (StringUtils.isNotEmpty(nemCode)) {
+            qw.lambda().eq(ProEconPointCode::getNemCode, nemCode);
         }
-        ProEconPointCode one  = baseMapper.selectOne(qw);
+        ProEconPointCode one = baseMapper.selectOne(qw);
         return one;
     }
 
     @Override
-    public List<ProEconPointCodeDTO>  getEconPointRanking(String regionId, String companyId,  String pointCode) {
-        List<ProBasicPowerstation> powerstationList = proBasicPowerstationService.getProBasicPowerstationlist(regionId,companyId,"");
-        ProEconPointCode pointCode1 =  getProEconPointCode(pointCode);
+    public List<ProEconPointCodeDTO> getEconPointRanking(String regionId, String companyId, String pointCode, Date date, String dateType) {
+        List<ProBasicPowerstation> powerstationList = proBasicPowerstationService.getProBasicPowerstationlist(regionId, companyId, "");
+        ProEconPointCode proEconPointCode = getProEconPointCode(pointCode);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+
+        switch (pointCode) {
+            case "fdl":
+                dtos = fdl(powerstationList, date, dateType, proEconPointCode);
+                break;
+            case "qfdl":
+                dtos = qfdl(powerstationList, date, dateType, proEconPointCode);
+                break;
+            case "fnlyl":
+                dtos = fnlyl(powerstationList, date, dateType, proEconPointCode);
+                break;
+            case "slssdl":
+                dtos = slssdl(powerstationList, date, dateType, proEconPointCode);
+                break;
+            case "jxssdl":
+                dtos = jxssdl(powerstationList, date, dateType, proEconPointCode);
+                break;
+            case "xdjclssdl":
+                dtos = xdjclssdl(powerstationList, date, dateType, proEconPointCode);
+                break;
+            case "gzssdl":
+                dtos = gzssdl(powerstationList, date, dateType, proEconPointCode);
+                break;
+            case "xnssdl":
+                dtos = xnssdl(powerstationList, date, dateType, proEconPointCode);
+                break;
+            case "fwjsl":
+                dtos = fwjsl(powerstationList, date, dateType, proEconPointCode);
+                break;
+            case "ztzhjsl":
+                dtos = ztzhjsl(powerstationList, date, dateType, proEconPointCode);
+                break;
+            case "gzxqjsl":
+                dtos = gzxqjsl(powerstationList, date, dateType, proEconPointCode);
+                break;
+            case "slssl":
+                dtos = slssl(powerstationList, date, dateType, proEconPointCode);
+                break;
+            case "jxssl":
+                dtos = jxssl(powerstationList, date, dateType, proEconPointCode);
+                break;
+            case "xdjclssl":
+                dtos = xdjclssl(powerstationList, date, dateType, proEconPointCode);
+                break;
+            case "gzssl":
+                dtos = gzssl(powerstationList, date, dateType, proEconPointCode);
+                break;
+            case "xnssl":
+                dtos = xnssl(powerstationList, date, dateType, proEconPointCode);
+                break;
+        }
+
+        List<ProEconPointCodeDTO> dtoss = dtos.stream().sorted(Comparator.comparing(ProEconPointCodeDTO::getValue)).limit(10).collect(Collectors.toList());
+
+        return dtoss;
+    }
+
+
+    /**
+     * 发电量
+     */
+    private List<ProEconPointCodeDTO> fdl(List<ProBasicPowerstation> powerstationList, Date date, String dateType, ProEconPointCode pointCode) {
+        List<String> stationlist = powerstationList.stream().map(ProBasicPowerstation::getNemCode).collect(Collectors.toList());
+
+        List<ProEconPowerstationInfoDay1> list = proEconPowerstationInfoDay1Service.getEconFiveLosslist(stationlist, date);
         List<ProEconPointCodeDTO> dtos = new ArrayList<>();
-        powerstationList.stream().forEach(i->{
+
+        list.stream().forEach(i -> {
+
             ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+            dto.setDescription(pointCode.getDescription() + "(" + pointCode.getUnit() + ")");
+            dto.setStationcode(i.getForeignKeyId());
+            dto.setStationname(CacheContext.wpmap.get(i.getForeignKeyId()).getName());
+            switch (dateType) {
+                case "r":
+                    dto.setValue(i.getRfdl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "y":
+                    dto.setValue(i.getYfdl());
+                    break;
+                case "n":
+                    dto.setValue(i.getNfdl());
+                    break;
+            }
+            dtos.add(dto);
+        });
 
-            dto.setDescription(pointCode1.getDescription()+"("+pointCode1.getUnit()+")");
-            dto.setStationcode(i.getNemCode());
-            dto.setStationname(i.getName());
+        return dtos;
+    }
+
+
+    /**
+     * 欠发电量
+     */
+    private List<ProEconPointCodeDTO> qfdl(List<ProBasicPowerstation> powerstationList, Date date, String dateType, ProEconPointCode pointCode) {
+        List<String> stationlist = powerstationList.stream().map(ProBasicPowerstation::getNemCode).collect(Collectors.toList());
+
+        List<ProEconPowerstationInfoDay1> list = proEconPowerstationInfoDay1Service.getEconFiveLosslist(stationlist, date);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+        list.stream().forEach(i -> {
+
+            ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+            dto.setDescription(pointCode.getDescription() + "(" + pointCode.getUnit() + ")");
+            dto.setStationcode(i.getForeignKeyId());
+            dto.setStationname(CacheContext.wpmap.get(i.getForeignKeyId()).getName());
+            switch (dateType) {
+                case "r":
+                    dto.setValue(i.getRqfdl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "y":
+                    dto.setValue(i.getYqfdl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "n":
+                    dto.setValue(i.getNqfdl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+            }
+            dtos.add(dto);
+        });
+
+        return dtos;
+    }
 
-            List<ProBasicPowerstationPoint>  oripoint = proBasicPowerstationPointService.getProBasicPowerstationPointList(i.getId(),pointCode);
-            if (null != oripoint && oripoint.size()>0){
-                try {
-                    PointData p = edosUtil.getRealData(oripoint.get(0));
-                    dto.setValue(p.getPointValueInDouble()*pointCode1.getRatio());
-                } catch (Exception e) {
 
+    // 风能利用率
+    private List<ProEconPointCodeDTO> fnlyl(List<ProBasicPowerstation> powerstationList, Date date, String dateType, ProEconPointCode pointCode) {
+        List<String> stationlist = powerstationList.stream().map(ProBasicPowerstation::getNemCode).collect(Collectors.toList());
+
+        List<ProEconPowerstationInfoDay1> list = proEconPowerstationInfoDay1Service.getEconFiveLosslist(stationlist, date);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+        list.stream().forEach(i -> {
+
+            ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+            dto.setDescription(pointCode.getDescription() + "(" + pointCode.getUnit() + ")");
+            dto.setStationcode(i.getForeignKeyId());
+            dto.setStationname(CacheContext.wpmap.get(i.getForeignKeyId()).getName());
+            if(compare0(i.getRllfdl())){
+                switch (dateType) {
+                    case "r":
+                        //发电量/理论发电量*100
+                        //divide(fdinfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))
+                        dto.setValue(i.getRqfdl().divide(i.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP));
+                        break;
+                    case "y":
+                        dto.setValue(i.getRqfdl().divide(i.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP));
+                        break;
+                    case "n":
+                        dto.setValue(i.getRqfdl().divide(i.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP));
+                        break;
                 }
+                dto.setValue(compare100(dto.getValue()));
             }
+
+
             dtos.add(dto);
         });
-//        SortUtils.sort(dtos,"value",SortUtils.DESC);
-        List<ProEconPointCodeDTO> dtoss = dtos.stream().sorted(Comparator.comparing(ProEconPointCodeDTO::getValue)).limit(10).collect(Collectors.toList());
 
-        return dtoss;
+        return dtos;
+    }
+
+    /**
+     * 受累损失电量
+     */
+    private List<ProEconPointCodeDTO> slssdl(List<ProBasicPowerstation> powerstationList, Date date, String dateType, ProEconPointCode pointCode) {
+        List<String> stationlist = powerstationList.stream().map(ProBasicPowerstation::getNemCode).collect(Collectors.toList());
+
+        List<ProEconPowerstationInfoDay1> list = proEconPowerstationInfoDay1Service.getEconFiveLosslist(stationlist, date);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+        list.stream().forEach(i -> {
+
+            ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+            dto.setDescription(pointCode.getDescription() + "(" + pointCode.getUnit() + ")");
+            dto.setStationcode(i.getForeignKeyId());
+            dto.setStationname(CacheContext.wpmap.get(i.getForeignKeyId()).getName());
+            switch (dateType) {
+                case "r":
+                    dto.setValue((i.getRcwsltqssdl().add(i.getRcwsldwssdl())).divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "y":
+                    dto.setValue((i.getYcwsltqssdl().add(i.getYcwsldwssdl())).divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "n":
+                    dto.setValue((i.getNcwsltqssdl().add(i.getNcwsldwssdl())).divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+            }
+            dtos.add(dto);
+        });
+
+        return dtos;
+    }
+
+
+    /** 检修损失电量 */
+    private List<ProEconPointCodeDTO> jxssdl(List<ProBasicPowerstation> powerstationList, Date date, String dateType, ProEconPointCode pointCode) {
+        List<String> stationlist = powerstationList.stream().map(ProBasicPowerstation::getNemCode).collect(Collectors.toList());
+
+        List<ProEconPowerstationInfoDay1> list = proEconPowerstationInfoDay1Service.getEconFiveLosslist(stationlist, date);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+        list.stream().forEach(i -> {
+
+            ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+            dto.setDescription(pointCode.getDescription() + "(" + pointCode.getUnit() + ")");
+            dto.setStationcode(i.getForeignKeyId());
+            dto.setStationname(CacheContext.wpmap.get(i.getForeignKeyId()).getName());
+            switch (dateType) {
+                case "r":
+                    dto.setValue(i.getRjxssdl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "y":
+                    dto.setValue(i.getYjxssdl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "n":
+                    dto.setValue(i.getNjxssdl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+            }
+            dtos.add(dto);
+        });
+
+        return dtos;
+    }
+
+    /** 限电损失电量*/
+    private List<ProEconPointCodeDTO> xdjclssdl(List<ProBasicPowerstation> powerstationList, Date date, String dateType, ProEconPointCode pointCode) {
+        List<String> stationlist = powerstationList.stream().map(ProBasicPowerstation::getNemCode).collect(Collectors.toList());
+
+        List<ProEconPowerstationInfoDay1> list = proEconPowerstationInfoDay1Service.getEconFiveLosslist(stationlist, date);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+        list.stream().forEach(i -> {
+
+            ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+            dto.setDescription(pointCode.getDescription() + "(" + pointCode.getUnit() + ")");
+            dto.setStationcode(i.getForeignKeyId());
+            dto.setStationname(CacheContext.wpmap.get(i.getForeignKeyId()).getName());
+            switch (dateType) {
+                case "r":
+                    dto.setValue((i.getRxdtjssdl().add(i.getRxdjclssdl())).divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "y":
+                    dto.setValue((i.getYxdtjssdl().add(i.getYxdjclssdl())).divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "n":
+                    dto.setValue((i.getNxdtjssdl().add(i.getNxdjclssdl())).divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+            }
+            dtos.add(dto);
+        });
+
+        return dtos;
+    }
+
+   /** 故障损失电量*/
+    private List<ProEconPointCodeDTO> gzssdl(List<ProBasicPowerstation> powerstationList, Date date, String dateType, ProEconPointCode pointCode) {
+        List<String> stationlist = powerstationList.stream().map(ProBasicPowerstation::getNemCode).collect(Collectors.toList());
+
+        List<ProEconPowerstationInfoDay1> list = proEconPowerstationInfoDay1Service.getEconFiveLosslist(stationlist, date);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+        list.stream().forEach(i -> {
+
+            ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+            dto.setDescription(pointCode.getDescription() + "(" + pointCode.getUnit() + ")");
+            dto.setStationcode(i.getForeignKeyId());
+            dto.setStationname(CacheContext.wpmap.get(i.getForeignKeyId()).getName());
+            switch (dateType) {
+                case "r":
+                    dto.setValue(i.getRgzssdl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "y":
+                    dto.setValue(i.getYgzssdl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "n":
+                    dto.setValue(i.getNgzssdl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+            }
+            dtos.add(dto);
+        });
+
+        return dtos;
+    }
+
+    /** 性能损失电量*/
+    private List<ProEconPointCodeDTO> xnssdl(List<ProBasicPowerstation> powerstationList, Date date, String dateType, ProEconPointCode pointCode) {
+        List<String> stationlist = powerstationList.stream().map(ProBasicPowerstation::getNemCode).collect(Collectors.toList());
+
+        List<ProEconPowerstationInfoDay1> list = proEconPowerstationInfoDay1Service.getEconFiveLosslist(stationlist, date);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+        list.stream().forEach(i -> {
+
+            ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+            dto.setDescription(pointCode.getDescription() + "(" + pointCode.getUnit() + ")");
+            dto.setStationcode(i.getForeignKeyId());
+            dto.setStationname(CacheContext.wpmap.get(i.getForeignKeyId()).getName());
+            switch (dateType) {
+                case "r":
+                    dto.setValue(i.getRxnssdl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "y":
+                    dto.setValue(i.getYxnssdl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "n":
+                    dto.setValue(i.getNxnssdl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+            }
+            dtos.add(dto);
+        });
+
+        return dtos;
+    }
+
+   /** 复位及时率 */
+    private List<ProEconPointCodeDTO> fwjsl(List<ProBasicPowerstation> powerstationList, Date date, String dateType, ProEconPointCode pointCode) {
+        List<String> stationlist = powerstationList.stream().map(ProBasicPowerstation::getNemCode).collect(Collectors.toList());
+
+        List<ProEconPowerstationInfoDay4> list = proEconPowerstationInfoDay4Service.getEconThreeRateCurvelist(stationlist, date);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+        list.stream().forEach(i -> {
+
+            ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+            dto.setDescription(pointCode.getDescription() + "(" + pointCode.getUnit() + ")");
+            dto.setStationcode(i.getForeignKeyId());
+            dto.setStationname(CacheContext.wpmap.get(i.getForeignKeyId()).getName());
+            switch (dateType) {
+                case "r":
+                    dto.setValue(i.getRfwjsl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "y":
+                    dto.setValue(i.getYfwjsl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "n":
+                    dto.setValue(i.getNfwjsl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+            }
+            dtos.add(dto);
+        });
+
+        return dtos;
+    }
+
+    /** 状态转换及时率 */
+    private List<ProEconPointCodeDTO> ztzhjsl(List<ProBasicPowerstation> powerstationList, Date date, String dateType, ProEconPointCode pointCode) {
+        List<String> stationlist = powerstationList.stream().map(ProBasicPowerstation::getNemCode).collect(Collectors.toList());
+
+        List<ProEconPowerstationInfoDay4> list = proEconPowerstationInfoDay4Service.getEconThreeRateCurvelist(stationlist, date);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+        list.stream().forEach(i -> {
+
+            ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+            dto.setDescription(pointCode.getDescription() + "(" + pointCode.getUnit() + ")");
+            dto.setStationcode(i.getForeignKeyId());
+            dto.setStationname(CacheContext.wpmap.get(i.getForeignKeyId()).getName());
+            switch (dateType) {
+                case "r":
+                    dto.setValue(i.getRztzhjsl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "y":
+                    dto.setValue(i.getYztzhjsl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "n":
+                    dto.setValue(i.getNztzhjsl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+            }
+            dtos.add(dto);
+        });
+
+        return dtos;
+    }
+
+    /** 故障消缺及时率 */
+    private List<ProEconPointCodeDTO> gzxqjsl(List<ProBasicPowerstation> powerstationList, Date date, String dateType, ProEconPointCode pointCode) {
+        List<String> stationlist = powerstationList.stream().map(ProBasicPowerstation::getNemCode).collect(Collectors.toList());
+
+        List<ProEconPowerstationInfoDay4> list = proEconPowerstationInfoDay4Service.getEconThreeRateCurvelist(stationlist, date);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+        list.stream().forEach(i -> {
+
+            ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+            dto.setDescription(pointCode.getDescription() + "(" + pointCode.getUnit() + ")");
+            dto.setStationcode(i.getForeignKeyId());
+            dto.setStationname(CacheContext.wpmap.get(i.getForeignKeyId()).getName());
+            switch (dateType) {
+                case "r":
+                    dto.setValue(i.getRgzxqjsl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "y":
+                    dto.setValue(i.getYgzxqjsl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+                case "n":
+                    dto.setValue(i.getNgzxqjsl().divide(new BigDecimal(pointCode.getRatio())));
+                    break;
+            }
+            dtos.add(dto);
+        });
+
+        return dtos;
+    }
+
+    /** 受累损失率 */
+    private List<ProEconPointCodeDTO> slssl(List<ProBasicPowerstation> powerstationList, Date date, String dateType, ProEconPointCode pointCode) {
+        List<String> stationlist = powerstationList.stream().map(ProBasicPowerstation::getNemCode).collect(Collectors.toList());
+
+        List<ProEconPowerstationInfoDay1> list = proEconPowerstationInfoDay1Service.getEconFiveLosslist(stationlist, date);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+        list.stream().forEach(i -> {
+
+            ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+            dto.setDescription(pointCode.getDescription() + "(" + pointCode.getUnit() + ")");
+            dto.setStationcode(i.getForeignKeyId());
+            dto.setStationname(CacheContext.wpmap.get(i.getForeignKeyId()).getName());
+
+                switch (dateType) {
+                    case "r":
+                        dto.setValue(compare0(i.getRllfdl())?(i.getRcwsltqssdl().add(i.getRcwsldwssdl())).divide(i.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(pointCode.getRatio())): new BigDecimal(0));
+                        break;
+                    case "y":
+                        dto.setValue(compare0(i.getYllfdl())?(i.getYcwsltqssdl().add(i.getYcwsldwssdl())).divide(i.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(pointCode.getRatio())):new BigDecimal(0));
+                        break;
+                    case "n":
+                        dto.setValue(compare0(i.getNllfdl())?(i.getNcwsltqssdl().add(i.getNcwsldwssdl())).divide(i.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(pointCode.getRatio())):new BigDecimal(0));
+                        break;
+                }
+                dto.setValue(compare100(dto.getValue()));
+
+            dtos.add(dto);
+        });
+
+        return dtos;
+    }
+
+    /** 检修损失率 */
+    private List<ProEconPointCodeDTO> jxssl(List<ProBasicPowerstation> powerstationList, Date date, String dateType, ProEconPointCode pointCode) {
+        List<String> stationlist = powerstationList.stream().map(ProBasicPowerstation::getNemCode).collect(Collectors.toList());
+
+        List<ProEconPowerstationInfoDay1> list = proEconPowerstationInfoDay1Service.getEconFiveLosslist(stationlist, date);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+        list.stream().forEach(i -> {
+
+            ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+            dto.setDescription(pointCode.getDescription() + "(" + pointCode.getUnit() + ")");
+            dto.setStationcode(i.getForeignKeyId());
+            dto.setStationname(CacheContext.wpmap.get(i.getForeignKeyId()).getName());
+
+
+            switch (dateType) {
+                case "r":
+                    dto.setValue(compare0(i.getRllfdl())?i.getRjxssdl().divide(i.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(pointCode.getRatio())): new BigDecimal(0));
+                    break;
+                case "y":
+                    dto.setValue(compare0(i.getYllfdl())?i.getYjxssdl().divide(i.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(pointCode.getRatio())):new BigDecimal(0));
+                    break;
+                case "n":
+                    dto.setValue(compare0(i.getNllfdl())?i.getNjxssdl().divide(i.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(pointCode.getRatio())):new BigDecimal(0));
+                    break;
+            }
+            dto.setValue(compare100(dto.getValue()));
+            dtos.add(dto);
+        });
+
+        return dtos;
+    }
+
+    /** 限电损失率 */
+    private List<ProEconPointCodeDTO> xdjclssl(List<ProBasicPowerstation> powerstationList, Date date, String dateType, ProEconPointCode pointCode) {
+        List<String> stationlist = powerstationList.stream().map(ProBasicPowerstation::getNemCode).collect(Collectors.toList());
+
+        List<ProEconPowerstationInfoDay1> list = proEconPowerstationInfoDay1Service.getEconFiveLosslist(stationlist, date);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+        list.stream().forEach(i -> {
+
+            ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+            dto.setDescription(pointCode.getDescription() + "(" + pointCode.getUnit() + ")");
+            dto.setStationcode(i.getForeignKeyId());
+            dto.setStationname(CacheContext.wpmap.get(i.getForeignKeyId()).getName());
+            switch (dateType) {
+                case "r":
+                    dto.setValue(compare0(i.getRllfdl())?i.getRxdtjssdl().divide(i.getRxdjclssdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(pointCode.getRatio())): new BigDecimal(0));
+                    break;
+                case "y":
+                    dto.setValue(compare0(i.getYllfdl())?i.getYxdtjssdl().divide(i.getYxdjclssdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(pointCode.getRatio())):new BigDecimal(0));
+                    break;
+                case "n":
+                    dto.setValue(compare0(i.getNllfdl())?i.getNxdtjssdl().divide(i.getNxdjclssdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(pointCode.getRatio())):new BigDecimal(0));
+                    break;
+            }
+            dto.setValue(compare100(dto.getValue()));
+            dtos.add(dto);
+        });
+
+        return dtos;
     }
+
+   /** 故障损失率*/
+    private List<ProEconPointCodeDTO> gzssl(List<ProBasicPowerstation> powerstationList, Date date, String dateType, ProEconPointCode pointCode) {
+        List<String> stationlist = powerstationList.stream().map(ProBasicPowerstation::getNemCode).collect(Collectors.toList());
+
+        List<ProEconPowerstationInfoDay1> list = proEconPowerstationInfoDay1Service.getEconFiveLosslist(stationlist, date);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+        list.stream().forEach(i -> {
+
+            ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+            dto.setDescription(pointCode.getDescription() + "(" + pointCode.getUnit() + ")");
+            dto.setStationcode(i.getForeignKeyId());
+            dto.setStationname(CacheContext.wpmap.get(i.getForeignKeyId()).getName());
+            switch (dateType) {
+                case "r":
+                    dto.setValue(compare0(i.getRllfdl())?i.getRgzssdl().divide(i.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(pointCode.getRatio())): new BigDecimal(0));
+                    break;
+                case "y":
+                    dto.setValue(compare0(i.getYllfdl())?i.getYgzssdl().divide(i.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(pointCode.getRatio())):new BigDecimal(0));
+                    break;
+                case "n":
+                    dto.setValue(compare0(i.getNllfdl())?i.getNgzssdl().divide(i.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(pointCode.getRatio())):new BigDecimal(0));
+                    break;
+            }
+            dto.setValue(compare100(dto.getValue()));
+            dtos.add(dto);
+        });
+
+        return dtos;
+    }
+
+    /** 性能损失率 */
+    private List<ProEconPointCodeDTO> xnssl(List<ProBasicPowerstation> powerstationList, Date date, String dateType, ProEconPointCode pointCode) {
+        List<String> stationlist = powerstationList.stream().map(ProBasicPowerstation::getNemCode).collect(Collectors.toList());
+
+        List<ProEconPowerstationInfoDay1> list = proEconPowerstationInfoDay1Service.getEconFiveLosslist(stationlist, date);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+        list.stream().forEach(i -> {
+
+            ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+            dto.setDescription(pointCode.getDescription() + "(" + pointCode.getUnit() + ")");
+            dto.setStationcode(i.getForeignKeyId());
+            dto.setStationname(CacheContext.wpmap.get(i.getForeignKeyId()).getName());
+            switch (dateType) {
+                case "r":
+                    dto.setValue(compare0(i.getRllfdl())?i.getRxnssdl().divide(i.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(pointCode.getRatio())): new BigDecimal(0));
+                    break;
+                case "y":
+                    dto.setValue(compare0(i.getYllfdl())?i.getYxnssdl().divide(i.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(pointCode.getRatio())):new BigDecimal(0));
+                    break;
+                case "n":
+                    dto.setValue(compare0(i.getNllfdl())?i.getNxnssdl().divide(i.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(pointCode.getRatio())):new BigDecimal(0));
+                    break;
+            }
+            dto.setValue(compare100(dto.getValue()));
+            dtos.add(dto);
+        });
+
+        return dtos;
+    }
+
+
+    private BigDecimal compare100(BigDecimal a) {
+        BigDecimal b = new BigDecimal(100);
+        if (b.compareTo(a) == -1) {
+            a = new BigDecimal(100);
+            ;
+        }
+        return a;
+
+    }
+
+    private boolean compare0(BigDecimal a) {
+        BigDecimal b = new BigDecimal(0.00);
+        if (b.compareTo(a.setScale(2, BigDecimal.ROUND_HALF_UP)) == 0) {
+            return false;
+        }
+        return true;
+    }
+
 }

+ 18 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay1ServiceImpl.java

@@ -99,5 +99,23 @@ public class ProEconPowerstationInfoDay1ServiceImpl extends ServiceImpl<ProEconP
         return list;
     }
 
+    @Override
+    public List<ProEconPowerstationInfoDay1> getEconFiveLosslist(List<String> foreignKeyIds, Date date) {
+        QueryWrapper<ProEconPowerstationInfoDay1> qw = new QueryWrapper<>();
+
+        if (null != foreignKeyIds && foreignKeyIds.size()>0) {
+            qw.lambda().in(ProEconPowerstationInfoDay1::getForeignKeyId, foreignKeyIds);
+        }
+
+        if (null !=date) {
+            qw.lambda().eq(ProEconPowerstationInfoDay1::getRecordDate, date);
+
+        }
+
+        List<ProEconPowerstationInfoDay1> list = baseMapper.selectList(qw);
+
+        return list;
+    }
+
 
 }

+ 18 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay4ServiceImpl.java

@@ -90,4 +90,22 @@ public class ProEconPowerstationInfoDay4ServiceImpl extends ServiceImpl<ProEconP
 
         return list;
     }
+
+    @Override
+    public List<ProEconPowerstationInfoDay4> getEconThreeRateCurvelist(List<String> foreignKeyIds, Date date) {
+        QueryWrapper<ProEconPowerstationInfoDay4> qw = new QueryWrapper<>();
+
+        if (null != foreignKeyIds && foreignKeyIds.size()>0) {
+            qw.lambda().in(ProEconPowerstationInfoDay4::getForeignKeyId, foreignKeyIds);
+        }
+
+        if (null !=date) {
+            qw.lambda().eq(ProEconPowerstationInfoDay4::getRecordDate, date);
+
+        }
+
+        List<ProEconPowerstationInfoDay4> list = baseMapper.selectList(qw);
+
+        return list;
+    }
 }

+ 25 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconWtAlysisDayServiceImpl.java

@@ -1,11 +1,18 @@
 package com.gyee.runeconomy.service.auto.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.common.model.StringUtils;
+import com.gyee.common.util.DateUtils;
 import com.gyee.runeconomy.mapper.auto.ProEconWtAlysisDayMapper;
 import com.gyee.runeconomy.model.auto.ProEconWtAlysisDay;
 import com.gyee.runeconomy.service.auto.IProEconWtAlysisDayService;
 import org.springframework.stereotype.Service;
 
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+
 /**
  * <p>
  * 风机日性能分析表 服务实现类
@@ -17,4 +24,22 @@ import org.springframework.stereotype.Service;
 @Service
 public class ProEconWtAlysisDayServiceImpl extends ServiceImpl<ProEconWtAlysisDayMapper, ProEconWtAlysisDay> implements IProEconWtAlysisDayService {
 
+    @Override
+    public List<ProEconWtAlysisDay> getProEconWtAlysisDayList(String windturbineIds, String date) {
+
+        QueryWrapper<ProEconWtAlysisDay> qw = new QueryWrapper<>();
+        Date recorddate = DateUtils.parseDate(date);
+
+        if (StringUtils.isNotEmpty(windturbineIds)) {
+            String[] wtidArray = windturbineIds.split(",");
+            List<String> wtidList = Arrays.asList(wtidArray);
+            qw.lambda().in(ProEconWtAlysisDay::getWindturbineId, wtidList);
+        } else {
+            return null;
+        }
+
+        qw.lambda().eq(ProEconWtAlysisDay::getRecordDate, recorddate);
+        List<ProEconWtAlysisDay> list = baseMapper.selectList(qw);
+        return list;
+    }
 }

+ 26 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconWtPowerCurveFittingServiceImpl.java

@@ -1,12 +1,18 @@
 package com.gyee.runeconomy.service.auto.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.common.model.StringUtils;
 import com.gyee.runeconomy.mapper.auto.ProEconWtPowerCurveFittingMapper;
 import com.gyee.runeconomy.model.auto.ProEconWtPowerCurveFitting;
 import com.gyee.runeconomy.service.auto.IProEconWtPowerCurveFittingService;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -26,4 +32,24 @@ public class ProEconWtPowerCurveFittingServiceImpl extends ServiceImpl<ProEconWt
     public int deleteProEconWtPowerCurveFitting() {
         return  proEconWtPowerCurveFittingMapper.deleteProEconWtPowerCurveFitting();
     }
+
+    @Override
+    public Map<String, List<ProEconWtPowerCurveFitting>> getgroupProEconWtPowerCurveFittingList(String windturbineIds) {
+
+        QueryWrapper<ProEconWtPowerCurveFitting> qw = new QueryWrapper<>();
+
+
+        if (StringUtils.isNotEmpty(windturbineIds)) {
+            String[] wtidArray = windturbineIds.split(",");
+            List<String> wtidList = Arrays.asList(wtidArray);
+            qw.lambda().in(ProEconWtPowerCurveFitting::getWindturbineId, wtidList);
+        } else {
+            return null;
+        }
+
+        qw.lambda().orderByAsc(ProEconWtPowerCurveFitting::getSpeed);
+        List<ProEconWtPowerCurveFitting> list = baseMapper.selectList(qw);
+        Map<String, List<ProEconWtPowerCurveFitting>> map =  list.stream().collect(Collectors.groupingBy(ProEconWtPowerCurveFitting::getWindturbineId));
+        return map;
+    }
 }

+ 41 - 17
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconWtwindDayInfoServiceImpl.java

@@ -1,31 +1,38 @@
 package com.gyee.runeconomy.service.auto.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.gyee.common.model.StringUtils;
+import com.gyee.common.util.DateUtils;
 import com.gyee.runeconomy.model.auto.ProEconWtwindDayInfo;
 import com.gyee.runeconomy.mapper.auto.ProEconWtwindDayInfoMapper;
 import com.gyee.runeconomy.service.auto.IProEconWtwindDayInfoService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+
 /**
  * <p>
  * 1、日风向平均风速
-2、日风向最大风速
-3、日风向次数
-4、日风向频率
-5、日风向静风次数
-6、日风向静风频率
-7、月风向平均风速
-8、月风向最大风速
-9、月风向次数
-10、月风向频率
-11、月风向静风次数
-12、月风向静风频率
-13、年风向平均风速
-14、年风向最大风速
-15、年风向次数
-16、年风向频率
-17、年风向静风次数
-18、年风向静风频率 服务实现类
+ * 2、日风向最大风速
+ * 3、日风向次数
+ * 4、日风向频率
+ * 5、日风向静风次数
+ * 6、日风向静风频率
+ * 7、月风向平均风速
+ * 8、月风向最大风速
+ * 9、月风向次数
+ * 10、月风向频率
+ * 11、月风向静风次数
+ * 12、月风向静风频率
+ * 13、年风向平均风速
+ * 14、年风向最大风速
+ * 15、年风向次数
+ * 16、年风向频率
+ * 17、年风向静风次数
+ * 18、年风向静风频率 服务实现类
  * </p>
  *
  * @author shilin
@@ -34,4 +41,21 @@ import org.springframework.stereotype.Service;
 @Service
 public class ProEconWtwindDayInfoServiceImpl extends ServiceImpl<ProEconWtwindDayInfoMapper, ProEconWtwindDayInfo> implements IProEconWtwindDayInfoService {
 
+
+    @Override
+    public List<ProEconWtwindDayInfo> getProEconWtwindDayInfoList(String windturbineIds, String date) {
+
+        QueryWrapper<ProEconWtwindDayInfo> qw = new QueryWrapper<>();
+        Date recorddate = DateUtils.parseDate(date);
+        if (StringUtils.isNotEmpty(windturbineIds)) {
+            String[] wtidArray = windturbineIds.split(",");
+            List<String> wtidList = Arrays.asList(wtidArray);
+            qw.lambda().in(ProEconWtwindDayInfo::getWindturbineId, wtidList);
+        } else {
+            return null;
+        }
+        qw.lambda().eq(ProEconWtwindDayInfo::getRecordDate, recorddate);
+        List<ProEconWtwindDayInfo> list = baseMapper.selectList(qw);
+        return list;
+    }
 }

+ 462 - 13
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/bmk/BenchmarkingService.java

@@ -6,11 +6,10 @@ package com.gyee.runeconomy.service.bmk;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.gyee.common.model.StringUtils;
-import com.gyee.common.util.BigDecimalUtils;
-import com.gyee.common.util.DateUtils;
-import com.gyee.common.util.DoubleUtils;
+import com.gyee.common.util.*;
 import com.gyee.common.vo.benchmark.FjjxbVo;
 import com.gyee.common.vo.benchmark.FjjxbmxVo;
+import com.gyee.common.vo.benchmark.WxsslVo;
 import com.gyee.runeconomy.init.CacheContext;
 import com.gyee.runeconomy.model.auto.*;
 import com.gyee.runeconomy.service.auto.IProEconEquipmentInfoDay1Service;
@@ -26,6 +25,13 @@ import java.util.stream.Collectors;
 public class BenchmarkingService {
 
 
+    private  final String TYPE_DATE = "date";
+    private  final String TYPE_WIND = "wind";
+    private  final String TYPE_PROJECT = "project";
+    private  final String TYPE_LINE = "line";
+    private  final String TYPE_WINDTURBINE = "windturbine";
+
+
     @Resource
     private IProEconEquipmentInfoDay1Service proEconEquipmentInfoDay1Service;
 
@@ -133,16 +139,16 @@ public class BenchmarkingService {
             FjjxbVo vo = new FjjxbVo();
             if (sttype.equals("1")){
                 vo.setId(i.getWindpowerstationId());
-                vo.setName(CacheContext.wpmap.get(i.getWindpowerstationId().trim()).getAname());
+                vo.setName(CacheContext.wpmap.get(i.getWindpowerstationId().trim()).getName());
             }else if(sttype.equals("2")){
                 vo.setId(i.getProjectId());
-                vo.setName(CacheContext.pjmap.get(i.getProjectId().trim()).getAname());
+                vo.setName(CacheContext.pjmap.get(i.getProjectId().trim()).getName());
             }else if(sttype.equals("3")){
                 vo.setId(i.getLineId());
-                vo.setName(CacheContext.lnmap.get(i.getLineId().trim()).getAname());
+                vo.setName(CacheContext.lnmap.get(i.getLineId().trim()).getName());
             }else{
                 vo.setId(i.getWindturbineId());
-                vo.setName(CacheContext.wtmap.get(i.getWindturbineId().trim()).getAname());
+                vo.setName(CacheContext.wtmap.get(i.getWindturbineId().trim()).getName());
             }
             vo.setSjfdl(BigDecimalUtils.divide(new BigDecimal(i.getRfdl()),new BigDecimal(10000),2).doubleValue());
             vo.setLlfdl(BigDecimalUtils.divide(new BigDecimal(i.getRllfdl()),new BigDecimal(10000),2).doubleValue());
@@ -155,7 +161,7 @@ public class BenchmarkingService {
             vo.setXn(BigDecimalUtils.divide(new BigDecimal(i.getRdjssdl()+i.getRqxjclssdl()+i.getRsdtjssdl()+i.getRxnssdl()),new BigDecimal(10000),2).doubleValue());
 //            vo.setLlfdl(DoubleUtils.getRoundingNum(vo.getSjfdl()+vo.getFjhjx()+vo.getJhjx()+vo.getXd()+vo.getXn(),2));
             vo.setFnlly(vo.getLlfdl()!=0? DoubleUtils.keepPrecision(vo.getSjfdl()/vo.getLlfdl()*100,2):0);
-            vo.setPoint(DoubleUtils.keepPrecision(vo.getLlfdl()+10,2));
+            vo.setPoint(DoubleUtils.keepPrecision(vo.getLlfdl()*1.1,2));
 
             llfdl.updateAndGet(v -> new Double((double) (v + vo.getLlfdl())));
             sjfdl.updateAndGet(v -> new Double((double) (v + vo.getSjfdl())));
@@ -179,7 +185,7 @@ public class BenchmarkingService {
         vo.setXn(DoubleUtils.keepPrecision(xn.get().doubleValue(),2));
         vo.setSl(DoubleUtils.keepPrecision(sl.get().doubleValue(),2));
         vo.setFnlly(vo.getLlfdl()!=0?DoubleUtils.keepPrecision(vo.getSjfdl()/vo.getLlfdl()*100,2):0.0);
-        vo.setPoint(DoubleUtils.keepPrecision(vo.getLlfdl()+10,2));
+        vo.setPoint(DoubleUtils.keepPrecision(vo.getLlfdl()*1.1,2));
         resultList.add(vo);
         return resultList;
     }
@@ -253,16 +259,16 @@ public class BenchmarkingService {
             FjjxbmxVo vo = new FjjxbmxVo();
             if (sttype.equals("1")){
                 vo.setId(i.getWindpowerstationId());
-                vo.setName(CacheContext.wpmap.get(i.getWindpowerstationId().trim()).getAname());
+                vo.setName(CacheContext.wpmap.get(i.getWindpowerstationId().trim()).getName());
             }else if(sttype.equals("2")){
                 vo.setId(i.getProjectId());
-                vo.setName(CacheContext.pjmap.get(i.getProjectId().trim()).getAname());
+                vo.setName(CacheContext.pjmap.get(i.getProjectId().trim()).getName());
             }else if(sttype.equals("3")){
                 vo.setId(i.getLineId());
-                vo.setName(CacheContext.lnmap.get(i.getLineId().trim()).getAname());
+                vo.setName(CacheContext.lnmap.get(i.getLineId().trim()).getName());
             }else{
                 vo.setId(i.getWindturbineId());
-                vo.setName(CacheContext.wtmap.get(i.getWindturbineId().trim()).getAname());
+                vo.setName(CacheContext.wtmap.get(i.getWindturbineId().trim()).getName());
             }
             vo.setSjfdl(DoubleUtils.keepPrecision(i.getRfdl()/10000,2));
             vo.setLlfdl(DoubleUtils.keepPrecision(i.getRllfdl()/10000,2));
@@ -321,4 +327,447 @@ public class BenchmarkingService {
         resultList.add(vo);
         return resultList;
     }
+
+    public List<WxsslVo> wxssl(String companys, String type, String wpids, String projectids, String lineids, String beginDate, String endDate, String target, String sort)  {
+        List<WxsslVo> resultList = new ArrayList<>();
+        List<ProBasicPowerstation> wpls = CacheContext.wpls;
+        QueryWrapper<ProEconEquipmentInfoDay1> qw = new QueryWrapper<>();
+        StringBuilder sb = new StringBuilder();
+
+        if (StringUtils.isNotEmpty(wpids) && StringUtils.isEmpty(projectids) && StringUtils.isEmpty(lineids)){
+            sb.append("windpowerstation_id,");
+        }else if (StringUtils.isNotEmpty(wpids) && StringUtils.isNotEmpty(projectids) && StringUtils.isEmpty(lineids)){
+            sb.append("project_id,");
+        } else if (StringUtils.isNotEmpty(wpids) && StringUtils.isNotEmpty(projectids) && StringUtils.isNotEmpty(lineids)){
+            sb.append("line_id,");
+        }else {
+            sb.append("windpowerstation_id,");
+        }
+        sb.append("sum(rfdl) rfdl,sum(rllfdl) rllfdl,avg(rpjfs) rpjfs,sum(rjxssdl) rjxssdl,sum(rcnsljxssdl) rcnsljxssdl,sum(rgzssdl) rgzssdl,sum(rcnslgzssdl) rcnslgzssdl,sum(rxdtjssdl) rxdtjssdl,sum(rxdjclssdl) rxdjclssdl,sum(rdjssdl) rdjssdl,sum(rqxjclssdl) rqxjclssdl,sum(rsdtjssdl) rsdtjssdl,sum(rxnssdl) rxnssdl,sum(rcwsldwssdl) rcwsldwssdl,sum(rcwsltqssdl) rcwsltqssdl");
+        qw.select(String.valueOf(sb));
+        qw.ge("record_date",DateUtils.parseDate(beginDate)).le("record_date",DateUtils.parseDate(endDate));
+
+        if (companys.endsWith("RGN")){
+            qw.eq("region_id",companys);
+        }else {
+            qw.eq("company_id",companys);
+        }
+        if (type.equals("-1")){
+            qw.like("windturbine_id","_WT_");
+        }else {
+            qw.like("windturbine_id","_IN_");
+        }
+        if (StringUtils.isNotEmpty(wpids)){
+            List<String> wpList = Arrays.asList(wpids.split(","));
+            qw.in("windpowerstation_id",wpList);
+        }
+
+        if (StringUtils.isNotEmpty(projectids)){
+            List<String> proList = Arrays.asList(projectids.split(","));
+            qw.in("project_id",proList);
+        }
+        if (StringUtils.isNotEmpty(lineids)){
+            List<String> lineList = Arrays.asList(lineids.split(","));
+            qw.in("line_id",lineList);
+        }
+        if (StringUtils.isNotEmpty(wpids) && StringUtils.isEmpty(projectids) && StringUtils.isEmpty(lineids)){
+            qw.groupBy("windpowerstation_id");
+        }else if (StringUtils.isNotEmpty(wpids) && StringUtils.isNotEmpty(projectids) && StringUtils.isEmpty(lineids)){
+            qw.groupBy("project_id");
+        } else if (StringUtils.isNotEmpty(wpids) && StringUtils.isNotEmpty(projectids) && StringUtils.isNotEmpty(lineids)){
+            qw.groupBy("line_id");
+        }else {
+            qw.groupBy("windpowerstation_id");
+        }
+        List<ProEconEquipmentInfoDay1> list = proEconEquipmentInfoDay1Service.list(qw);
+
+        Map<String,Integer> station =  wpls
+                .stream().collect(Collectors.toMap(ProBasicPowerstation::getId,ProBasicPowerstation::getOrderNum));
+
+        list.stream().forEach(i->{
+            WxsslVo vo = new WxsslVo();
+            station.get(i.getWindpowerstationId());
+            if (StringUtils.isNotEmpty(wpids) && StringUtils.isEmpty(projectids) && StringUtils.isEmpty(lineids)){
+                vo.setId(i.getWindpowerstationId());
+                vo.setName(CacheContext.wpmap.get(i.getWindpowerstationId().trim()).getName());
+                vo.setOrdernum(station.get(i.getWindpowerstationId()).doubleValue());
+            }else if (StringUtils.isNotEmpty(wpids) && StringUtils.isNotEmpty(projectids) && StringUtils.isEmpty(lineids)){
+                vo.setId(i.getProjectId());
+                vo.setName(CacheContext.pjmap.get(i.getProjectId().trim()).getName());
+                vo.setOrdernum(CacheContext.pjmap.get(i.getProjectId().trim()).getOrderNum().doubleValue());
+            } else if (StringUtils.isNotEmpty(wpids) && StringUtils.isNotEmpty(projectids) && StringUtils.isNotEmpty(lineids)){
+                vo.setId(i.getLineId());
+                vo.setName(CacheContext.lnmap.get(i.getLineId().trim()).getName());
+                vo.setOrdernum(CacheContext.lnmap.get(i.getLineId().trim()).getOrderNum().doubleValue());
+            }else {
+                vo.setId(i.getWindpowerstationId());
+                vo.setName(CacheContext.wpmap.get(i.getWindpowerstationId().trim()).getName());
+                vo.setOrdernum(station.get(i.getWindpowerstationId()).doubleValue());
+            }
+
+            vo.setFdl(DoubleUtils.keepPrecision(i.getRfdl()/10000,2));
+            vo.setLlfdl(DoubleUtils.keepPrecision(i.getRllfdl()/10000,2));
+            vo.setJxssdl(DoubleUtils.keepPrecision((i.getRjxssdl()+i.getRcnsljxssdl())/10000,2));
+            vo.setGzssdl(DoubleUtils.keepPrecision((i.getRgzssdl()+i.getRcnslgzssdl())/10000,2));
+            vo.setXdssdl(DoubleUtils.keepPrecision((i.getRxdtjssdl()+i.getRxdjclssdl())/10000,2));
+            vo.setSlssdl(DoubleUtils.keepPrecision((i.getRcwsltqssdl()+i.getRcwsldwssdl())/10000,2));
+            vo.setXnssdl(DoubleUtils.keepPrecision((i.getRdjssdl()+i.getRsdtjssdl()+i.getRqxjclssdl()+i.getRxnssdl())/10000,2));
+            vo.setZssdl(DoubleUtils.keepPrecision(vo.getGzssdl()+vo.getJxssdl()+vo.getXdssdl()+vo.getXnssdl()+vo.getSlssdl(),2));
+            vo.setFnlyl(vo.getLlfdl()!=0?DoubleUtils.keepPrecision(vo.getFdl()/vo.getLlfdl()*100,2):0.0);
+            vo.setGzssl(vo.getLlfdl()!=0?DoubleUtils.keepPrecision(vo.getGzssdl()/vo.getLlfdl()*100,2):0.0);
+            vo.setJxssl(vo.getLlfdl()!=0?DoubleUtils.keepPrecision(vo.getJxssdl()/vo.getLlfdl()*100,2):0.0);
+            vo.setQfl(vo.getLlfdl()!=0?DoubleUtils.keepPrecision(vo.getXdssdl()/vo.getLlfdl()*100,2):0.0);
+            vo.setXnssl(vo.getLlfdl()!=0?DoubleUtils.keepPrecision(vo.getXnssdl()/vo.getLlfdl()*100,2):0.0);
+            vo.setSlssl(vo.getLlfdl()!=0?DoubleUtils.keepPrecision(vo.getSlssdl()/vo.getLlfdl()*100,2):0.0);
+            resultList.add(vo);
+        });
+        SortUtils.sort(resultList,"fdl",SortUtils.DESC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setFdlpm(i+1);
+        }
+
+        SortUtils.sort(resultList,"fnlyl",SortUtils.DESC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setFnlylpm(i+1);
+        }
+        SortUtils.sort(resultList,"zssdl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setZhpm(i+1);
+        }
+        SortUtils.sort(resultList,"gzssdl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setGzssdlpm(i+1);
+        }
+        SortUtils.sort(resultList,"gzssl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setGzsslpm(i+1);
+        }
+        SortUtils.sort(resultList,"jxssdl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setJxssdlpm(i+1);
+        }
+        SortUtils.sort(resultList,"jxssl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setJxsslpm(i+1);
+        }
+        SortUtils.sort(resultList,"xdssdl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setXdssdlpm(i+1);
+        }
+        SortUtils.sort(resultList,"qfl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setQflpm(i+1);
+        }
+        SortUtils.sort(resultList,"xnssdl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setXnssdlpm(i+1);
+        }
+        SortUtils.sort(resultList,"xnssl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setXnsslpm(i+1);
+        }
+        SortUtils.sort(resultList,"slssdl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setSlssdlpm(i+1);
+        }
+        SortUtils.sort(resultList,"slssl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setSlsslpm(i+1);
+        }
+        if (StringUtils.isNotEmpty(target) && StringUtils.isNotEmpty(sort)){
+            if (sort.equals("1")){
+                SortUtils.sort(resultList,target,SortUtils.ASC);
+            }else {
+                SortUtils.sort(resultList,target,SortUtils.DESC);
+            }
+        }else {
+            //SortUtils.sort(resultList,"fdl",SortUtils.DESC);
+            SortUtils.sort(resultList,"ordernum",SortUtils.ASC);
+        }
+        return resultList;
+    }
+
+
+
+    public List<WxsslVo> cndb(String companys, String type, String wpid, String beginDate, String endDate, String target, String sort) {
+        QueryWrapper<ProEconEquipmentInfoDay1> qw = new QueryWrapper<>();
+        List<WxsslVo> resultList = new ArrayList<>();
+        qw.select("record_date,sum(rfdl) rfdl,sum(rllfdl) rllfdl,avg(rpjfs) rpjfs,sum(rjxssdl) rjxssdl,sum(rcnsljxssdl) rcnsljxssdl,sum(rgzssdl) rgzssdl,sum(rcnslgzssdl) rcnslgzssdl,sum(rxdtjssdl) rxdtjssdl,sum(rxdjclssdl) rxdjclssdl,sum(rdjssdl) rdjssdl,sum(rqxjclssdl) rqxjclssdl,sum(rsdtjssdl) rsdtjssdl,sum(rxnssdl) rxnssdl,sum(rcwsldwssdl) rcwsldwssdl,sum(rcwsltqssdl) rcwsltqssdl");
+        qw.ge("record_date",DateUtils.parseDate(beginDate)).le("record_date",DateUtils.parseDate(endDate));
+        if (StringUtils.isNotEmpty(wpid)){
+            qw.eq("windpowerstation_id",wpid);
+        }
+        if (companys.endsWith("RGN")){
+            qw.eq("region_id",companys);
+        }else {
+            qw.eq("company_id",companys);
+        }
+        if (type.equals("-1")){
+            qw.like("windturbine_id","_WT_");
+        }else {
+            qw.like("windturbine_id","_IN_");
+        }
+        qw.groupBy("record_date");
+        List<WxsslVo> wxsslVoList = getWxsslSortVos(qw,resultList,TYPE_DATE);
+        if (StringUtils.isNotEmpty(target) && StringUtils.isNotEmpty(sort)){
+            if (sort.equals("1")){
+                SortUtils.sort(resultList,target,SortUtils.ASC);
+            }else {
+                SortUtils.sort(resultList,target,SortUtils.DESC);
+            }
+        }else {
+            SortUtils.sort(resultList,"date",SortUtils.ASC);
+        }
+        return wxsslVoList;
+    }
+
+    public List<WxsslVo> cjdb(String companys, String type, String wpids, String beginDate, String endDate, String target, String sort) {
+        List<WxsslVo> resultList = new ArrayList<>();
+        QueryWrapper<ProEconEquipmentInfoDay1> qw = new QueryWrapper<>();
+        qw.select("windpowerstation_id,sum(rfdl) rfdl,sum(rllfdl) rllfdl,avg(rpjfs) rpjfs,sum(rjxssdl) rjxssdl,sum(rcnsljxssdl) rcnsljxssdl,sum(rgzssdl) rgzssdl,sum(rcnslgzssdl) rcnslgzssdl,sum(rxdtjssdl) rxdtjssdl,sum(rxdjclssdl) rxdjclssdl,sum(rdjssdl) rdjssdl,sum(rqxjclssdl) rqxjclssdl,sum(rsdtjssdl) rsdtjssdl,sum(rxnssdl) rxnssdl,sum(rcwsldwssdl) rcwsldwssdl,sum(rcwsltqssdl) rcwsltqssdl");
+
+        qw.ge("record_date",DateUtils.parseDate(beginDate)).le("record_date",DateUtils.parseDate(endDate));
+        if (StringUtils.isNotEmpty(wpids)){
+            List<String> wpList = Arrays.asList(wpids.split(","));
+            qw.in("windpowerstation_id",wpList);
+        }
+        if (companys.endsWith("RGN")){
+            qw.eq("region_id",companys);
+        }else {
+            qw.eq("company_id",companys);
+        }
+        if (type.equals("-1")){
+            qw.like("windturbine_id","_WT_");
+        }else {
+            qw.like("windturbine_id","_IN_");
+        }
+        qw.groupBy("windpowerstation_id");
+        List<WxsslVo> wxsslVoList = getWxsslSortVos(qw,resultList,TYPE_WIND);
+        if (StringUtils.isNotEmpty(target) && StringUtils.isNotEmpty(sort)){
+            if (sort.equals("1")){
+                SortUtils.sort(resultList,target,SortUtils.ASC);
+            }else {
+                SortUtils.sort(resultList,target,SortUtils.DESC);
+            }
+        }else {
+            SortUtils.sort(resultList,"ordernum",SortUtils.ASC);
+        }
+        return wxsslVoList;
+    }
+
+
+    public List<WxsslVo> xmdb(String companys, String type, String wpids, String projectids, String beginDate, String endDate, String target, String sort) {
+        List<WxsslVo> resultList = new ArrayList<>();
+        QueryWrapper<ProEconEquipmentInfoDay1> qw = new QueryWrapper<>();
+        qw.select("project_id,sum(rfdl) rfdl,sum(rllfdl) rllfdl,avg(rpjfs) rpjfs,sum(rjxssdl) rjxssdl,sum(rcnsljxssdl) rcnsljxssdl,sum(rgzssdl) rgzssdl,sum(rcnslgzssdl) rcnslgzssdl,sum(rxdtjssdl) rxdtjssdl,sum(rxdjclssdl) rxdjclssdl,sum(rdjssdl) rdjssdl,sum(rqxjclssdl) rqxjclssdl,sum(rsdtjssdl) rsdtjssdl,sum(rxnssdl) rxnssdl,sum(rcwsldwssdl) rcwsldwssdl,sum(rcwsltqssdl) rcwsltqssdl");
+        qw.ge("record_date",DateUtils.parseDate(beginDate)).le("record_date",DateUtils.parseDate(endDate));
+        if (StringUtils.isNotEmpty(wpids)){
+            List<String> wpList = Arrays.asList(wpids.split(","));
+            qw.in("windpowerstation_id",wpList);
+        }
+        if (StringUtils.isNotEmpty(projectids)){
+            List<String> projectList = Arrays.asList(projectids.split(","));
+            qw.in("project_id",projectList);
+        }
+        if (companys.endsWith("RGN")){
+            qw.eq("region_id",companys);
+        }else {
+            qw.eq("company_id",companys);
+        }
+        if (type.equals("-1")){
+            qw.like("windturbine_id","_WT_");
+        }else {
+            qw.like("windturbine_id","_IN_");
+        }
+        qw.groupBy("project_id");
+        List<WxsslVo> wxsslVoList = getWxsslSortVos(qw,resultList,TYPE_PROJECT);
+        if (StringUtils.isNotEmpty(target) && StringUtils.isNotEmpty(sort)){
+            if (sort.equals("1")){
+                SortUtils.sort(resultList,target,SortUtils.ASC);
+            }else {
+                SortUtils.sort(resultList,target,SortUtils.DESC);
+            }
+        }else {
+            SortUtils.sort(resultList,"fdl",SortUtils.ASC);
+        }
+        return wxsslVoList;
+    }
+
+    public List<WxsslVo> xldb(String companys, String type, String wpids, String projectids, String lineids, String beginDate, String endDate, String target, String sort) {
+        List<WxsslVo> resultList = new ArrayList<>();
+        QueryWrapper<ProEconEquipmentInfoDay1> qw = new QueryWrapper<>();
+        qw.select("line_id,sum(rfdl) rfdl,sum(rllfdl) rllfdl,avg(rpjfs) rpjfs,sum(rjxssdl) rjxssdl,sum(rcnsljxssdl) rcnsljxssdl,sum(rgzssdl) rgzssdl,sum(rcnslgzssdl) rcnslgzssdl,sum(rxdtjssdl) rxdtjssdl,sum(rxdjclssdl) rxdjclssdl,sum(rdjssdl) rdjssdl,sum(rqxjclssdl) rqxjclssdl,sum(rsdtjssdl) rsdtjssdl,sum(rxnssdl) rxnssdl,sum(rcwsldwssdl) rcwsldwssdl,sum(rcwsltqssdl) rcwsltqssdl");
+
+        qw.ge("record_date",DateUtils.parseDate(beginDate)).le("record_date",DateUtils.parseDate(endDate));
+
+        if (StringUtils.isNotEmpty(wpids)){
+            List<String> wpList = Arrays.asList(wpids.split(","));
+            qw.in("windpowerstation_id",wpList);
+        }
+        if (StringUtils.isNotEmpty(projectids)){
+            List<String> projectList = Arrays.asList(projectids.split(","));
+            qw.in("project_id",projectList);
+        }
+        if (StringUtils.isNotEmpty(lineids)){
+            List<String> lineList = Arrays.asList(lineids.split(","));
+            qw.in("line_id",lineList);
+
+        }
+        if (companys.endsWith("RGN")){
+            qw.eq("region_id",companys);
+        }else {
+            qw.eq("company_id",companys);
+        }
+        if (type.equals("-1")){
+            qw.like("windturbine_id","_WT_");
+        }else {
+            qw.like("windturbine_id","_IN_");
+        }
+        qw.groupBy("line_id");
+        List<WxsslVo> wxsslVoList = getWxsslSortVos(qw,resultList,TYPE_LINE);
+        if (StringUtils.isNotEmpty(target) && StringUtils.isNotEmpty(sort)){
+            if (sort.equals("1")){
+                SortUtils.sort(resultList,target,SortUtils.ASC);
+            }else {
+                SortUtils.sort(resultList,target,SortUtils.DESC);
+            }
+        }else {
+            SortUtils.sort(resultList,"fdl",SortUtils.ASC);
+        }
+        return wxsslVoList;
+    }
+
+    /**
+     * 根据查询条件和类型,查询处五项损失并封装到结果list
+     * @param qw
+     * @param resultList
+     * @param type
+     * @return
+     */
+    private List<WxsslVo> getWxsslSortVos(QueryWrapper<ProEconEquipmentInfoDay1> qw, List<WxsslVo> resultList, String type) {
+
+        Map<String,Integer> station =  CacheContext.wpls
+                .stream().collect(Collectors.toMap(ProBasicPowerstation::getId,ProBasicPowerstation::getOrderNum));
+
+        List<ProEconEquipmentInfoDay1> list = proEconEquipmentInfoDay1Service.list(qw);
+        list.stream().forEach(i->{
+            WxsslVo vo = new WxsslVo();
+
+            if (type.equals(TYPE_WIND)){
+                vo.setId(i.getWindpowerstationId());
+                vo.setName(CacheContext.wpmap.get(i.getWindpowerstationId().trim()).getName());
+                vo.setOrdernum(station.get(i.getWindpowerstationId()).doubleValue());
+            }else if(type.equals(TYPE_PROJECT)){
+                vo.setId(i.getProjectId());
+                vo.setName(CacheContext.pjmap.get(i.getProjectId().trim()).getName());
+                vo.setOrdernum(CacheContext.pjmap.get(i.getProjectId().trim()).getOrderNum().doubleValue());
+            }else if(type.equals(TYPE_LINE)){
+                vo.setId(i.getLineId());
+                vo.setName(CacheContext.lnmap.get(i.getLineId().trim()).getName());
+                vo.setOrdernum(CacheContext.lnmap.get(i.getLineId().trim()).getOrderNum().doubleValue());
+            }else if(type.equals(TYPE_WINDTURBINE)){
+                vo.setId(i.getWindturbineId());
+                vo.setName(CacheContext.wtmap.get(i.getWindturbineId().trim()).getName());
+                vo.setOrdernum(CacheContext.wtmap.get(i.getWindturbineId().trim()).getOrderNum().doubleValue());
+            }
+            vo.setDate(i.getRecordDate());
+            vo.setFdl(DoubleUtils.keepPrecision(i.getRfdl()/10000,2));
+            vo.setLlfdl(DoubleUtils.keepPrecision(i.getRllfdl()/10000,2));
+            vo.setJxssdl(DoubleUtils.keepPrecision((i.getRjxssdl()+i.getRcnsljxssdl())/10000,2));
+            vo.setGzssdl(DoubleUtils.keepPrecision((i.getRgzssdl()+i.getRcnslgzssdl())/10000,2));
+            vo.setXdssdl(DoubleUtils.keepPrecision((i.getRxdtjssdl()+i.getRxdjclssdl())/10000,2));
+            vo.setSlssdl(DoubleUtils.keepPrecision((i.getRcwsltqssdl()+i.getRcwsldwssdl())/10000,2));
+            vo.setXnssdl(DoubleUtils.keepPrecision((i.getRdjssdl()+i.getRsdtjssdl()+i.getRqxjclssdl()+i.getRxnssdl())/10000,2));
+            vo.setZssdl(DoubleUtils.keepPrecision(vo.getGzssdl()+vo.getJxssdl()+vo.getXdssdl()+vo.getXnssdl()+vo.getSlssdl(),2));
+            vo.setFnlyl(vo.getLlfdl()!=0?DoubleUtils.keepPrecision(vo.getFdl()/vo.getLlfdl()*100,2):0);
+            vo.setGzssl(vo.getLlfdl()!=0?DoubleUtils.keepPrecision(vo.getGzssdl()/vo.getLlfdl()*100,2):0);
+            vo.setJxssl(vo.getLlfdl()!=0?DoubleUtils.keepPrecision(vo.getJxssdl()/vo.getLlfdl()*100,2):0);
+            vo.setQfl(vo.getLlfdl()!=0?DoubleUtils.keepPrecision(vo.getXdssdl()/vo.getLlfdl()*100,2):0);
+            vo.setXnssl(vo.getLlfdl()!=0?DoubleUtils.keepPrecision(vo.getXnssdl()/vo.getLlfdl()*100,2):0);
+            vo.setSlssl(vo.getLlfdl()!=0?DoubleUtils.keepPrecision(vo.getSlssdl()/vo.getLlfdl()*100,2):0);
+            resultList.add(vo);
+        });
+        SortUtils.sort(resultList,"llfdl",SortUtils.DESC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setZhpm(i+1);
+        }
+        SortUtils.sort(resultList,"fdl",SortUtils.DESC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setFdlpm(i+1);
+        }
+        SortUtils.sort(resultList,"fnlyl",SortUtils.DESC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setFnlylpm(i+1);
+        }
+        SortUtils.sort(resultList,"gzssdl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setGzssdlpm(i+1);
+        }
+        SortUtils.sort(resultList,"gzssl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setGzsslpm(i+1);
+        }
+        SortUtils.sort(resultList,"jxssdl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setJxssdlpm(i+1);
+        }
+        SortUtils.sort(resultList,"jxssl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setJxsslpm(i+1);
+        }
+        SortUtils.sort(resultList,"xdssdl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setXdssdlpm(i+1);
+        }
+        SortUtils.sort(resultList,"qfl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setQflpm(i+1);
+        }
+        SortUtils.sort(resultList,"xnssdl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setXnssdlpm(i+1);
+        }
+        SortUtils.sort(resultList,"xnssl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setXnsslpm(i+1);
+        }
+        SortUtils.sort(resultList,"slssdl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setSlssdlpm(i+1);
+        }
+        SortUtils.sort(resultList,"slssl",SortUtils.ASC);
+        for (int i=0;i<resultList.size();i++){
+            resultList.get(i).setSlsslpm(i+1);
+        }
+
+        return resultList;
+    }
+
+
+    public List<WxsslVo> details(String id, String beginDate, String endDate, String target, String sort) {
+        List<WxsslVo> resultList = new ArrayList<>();
+        QueryWrapper<ProEconEquipmentInfoDay1> qw = new QueryWrapper<>();
+        qw.select("windturbine_id,sum(rfdl) rfdl,sum(rllfdl) rllfdl,avg(rpjfs) rpjfs,sum(rjxssdl) rjxssdl,sum(rcnsljxssdl) rcnsljxssdl,sum(rgzssdl) rgzssdl,sum(rcnslgzssdl) rcnslgzssdl,sum(rxdtjssdl) rxdtjssdl,sum(rxdjclssdl) rxdjclssdl,sum(rdjssdl) rdjssdl,sum(rqxjclssdl) rqxjclssdl,sum(rsdtjssdl) rsdtjssdl,sum(rxnssdl) rxnssdl,sum(rcwsldwssdl) rcwsldwssdl,sum(rcwsltqssdl) rcwsltqssdl");
+
+        qw.ge("record_date",DateUtils.parseDate(beginDate)).le("record_date",DateUtils.parseDate(endDate));
+        if (id.endsWith("STA")){
+            qw.eq("windpowerstation_id",id);
+        }else if(id.endsWith("EG")){
+            qw.eq("project_id",id);
+        }else if(id.endsWith("LN")){
+            qw.eq("line_id",id);
+        }
+        qw.groupBy("windturbine_id");
+        List<WxsslVo> wxsslVoList = getWxsslSortVos(qw,resultList,TYPE_WINDTURBINE);
+        if (StringUtils.isNotEmpty(target) && StringUtils.isNotEmpty(sort)){
+            if (sort.equals("1")){
+                SortUtils.sort(resultList,target,SortUtils.ASC);
+            }else {
+                SortUtils.sort(resultList,target,SortUtils.DESC);
+            }
+        }else {
+            SortUtils.sort(resultList,"fdl",SortUtils.ASC);
+        }
+        return wxsslVoList;
+    }
 }

+ 140 - 144
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/goodness/WindturbinegoodnessService.java

@@ -35,36 +35,31 @@ public class WindturbinegoodnessService {
     @Resource
     private IEdosUtil edosUtil;
 
-    public Page<ProEconWindturbineGoodness> windturbinegoodnessList(Integer pageNum, Integer pageSize,  String cmId,String type,String wpId, String recorddate) {
+    public Page<ProEconWindturbineGoodness> windturbinegoodnessList(Integer pageNum, Integer pageSize, String cmId, String type, String wpId, String recorddate) {
 
-        if(StringUtils.empty(pageNum))
-        {
-            pageNum=1;
+        if (StringUtils.empty(pageNum)) {
+            pageNum = 1;
         }
-        if(StringUtils.empty(pageSize))
-        {
-            pageSize=10;
+        if (StringUtils.empty(pageSize)) {
+            pageSize = 10;
         }
         //构造分页构造器
         Page<ProEconWindturbineGoodness> pageInfo = new Page<>(pageNum, pageSize);
-        if (StringUtils.notEmp(cmId) && StringUtils.notEmp(type) && StringUtils.notEmp(recorddate))
-        {
-            Date date= DateUtils.parseDate(recorddate);
+        if (StringUtils.notEmp(cmId) && StringUtils.notEmp(type) && StringUtils.notEmp(recorddate)) {
+            Date date = DateUtils.parseDate(recorddate);
 
             //构造条件构造器
             LambdaQueryWrapper<ProEconWindturbineGoodness> queryWrapper = new LambdaQueryWrapper<>();
             //添加过滤条件
 
-            if(StringUtils.notEmp(wpId))
-            {
+            if (StringUtils.notEmp(wpId)) {
                 queryWrapper.eq(ProEconWindturbineGoodness::getWindtpowerstationId, wpId).
-                        eq(ProEconWindturbineGoodness::getCompanyId,cmId).
-                        eq(ProEconWindturbineGoodness::getTypes,type).
+                        eq(ProEconWindturbineGoodness::getCompanyId, cmId).
+                        eq(ProEconWindturbineGoodness::getTypes, type).
                         eq(ProEconWindturbineGoodness::getRecordDate, date);
-            }else
-            {
-                queryWrapper.eq(ProEconWindturbineGoodness::getCompanyId,cmId).
-                        eq(ProEconWindturbineGoodness::getTypes,type).
+            } else {
+                queryWrapper.eq(ProEconWindturbineGoodness::getCompanyId, cmId).
+                        eq(ProEconWindturbineGoodness::getTypes, type).
                         eq(ProEconWindturbineGoodness::getRecordDate, date);
             }
 
@@ -107,21 +102,20 @@ public class WindturbinegoodnessService {
         ProBasicEquipmentPoint pjfs = wtpointmap.get(ContantXk.CJ_SSFS);
 
 
-       // WindTurbineTestingPointAi2 fs = map.get(ContantXk.TPOINT_WT_PJFS);
+        // WindTurbineTestingPointAi2 fs = map.get(ContantXk.TPOINT_WT_PJFS);
 
         if (null != sjgl) {
             List<PointData> sjglls = edosUtil.getHistoryDatasSnap(sjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
-            if(!sjglls.isEmpty())
-            {
+            if (!sjglls.isEmpty()) {
                 int count = 0;
                 double temp = 0;
                 for (int i = 0; i < vos.size(); i++) {
-                    vos.get(i).setTime(sjglls.get(i ).getPointTime() * 1000);
+                    vos.get(i).setTime(sjglls.get(i).getPointTime() * 1000);
 
-                    if (i < sjglls.size() && StringUtils.notEmp(sjglls.get(i ).getPointTime())) {
+                    if (i < sjglls.size() && StringUtils.notEmp(sjglls.get(i).getPointTime())) {
 
                         if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
-                            temp = sjglls.get(i ).getPointValueInDouble();
+                            temp = sjglls.get(i).getPointValueInDouble();
                             if (Math.abs(temp) < 10000) {
                                 vos.get(i).setValue1(StringUtils.round(temp, 2));// 实际功率
                             }
@@ -140,16 +134,15 @@ public class WindturbinegoodnessService {
 
         if (null != bzgl) {
             List<PointData> bzglls = edosUtil.getHistoryDatasSnap(bzgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
-            if(!bzglls.isEmpty())
-            {
+            if (!bzglls.isEmpty()) {
                 int count = 0;
                 double temp = 0;
                 for (int i = 0; i < vos.size(); i++) {
                     // vos.get(i).setTime(bzglls.get(i).getPointTime() * 1000);
-                    if (i < bzglls.size() && StringUtils.notEmp(bzglls.get(i ).getPointTime())) {
+                    if (i < bzglls.size() && StringUtils.notEmp(bzglls.get(i).getPointTime())) {
 
                         if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
-                            temp = bzglls.get(i ).getPointValueInDouble();
+                            temp = bzglls.get(i).getPointValueInDouble();
                             if (Math.abs(temp) < 10000) {
                                 vos.get(i).setValue2(StringUtils.round(temp, 2));// 保证功率
                             }
@@ -168,16 +161,15 @@ public class WindturbinegoodnessService {
 
         if (null != pjfs) {
             List<PointData> pjfsls = edosUtil.getHistoryDatasSnap(pjfs, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
-            if(!pjfsls.isEmpty())
-            {
+            if (!pjfsls.isEmpty()) {
                 int count = 0;
                 double temp = 0;
                 for (int i = 0; i < vos.size(); i++) {
-                    vos.get(i).setTime(pjfsls.get(i ).getPointTime() * 1000);
-                    if (i < pjfsls.size() && StringUtils.notEmp(pjfsls.get(i ).getPointTime())) {
+                    vos.get(i).setTime(pjfsls.get(i).getPointTime() * 1000);
+                    if (i < pjfsls.size() && StringUtils.notEmp(pjfsls.get(i).getPointTime())) {
 
                         if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
-                            temp = pjfsls.get(i ).getPointValueInDouble();
+                            temp = pjfsls.get(i).getPointValueInDouble();
                             vos.get(i).setValue3(StringUtils.round(temp, 2));// 风速
                             count++;
                         } else {
@@ -194,6 +186,7 @@ public class WindturbinegoodnessService {
 
         return vos;
     }
+
     public List<List<EchartDataVo>> getplotBands(String wtId, Date recorddate) throws Exception {
 
         SimpleDateFormat sdf = new SimpleDateFormat("HH:mm");
@@ -203,7 +196,7 @@ public class WindturbinegoodnessService {
         c.set(Calendar.HOUR_OF_DAY, 0);
         c.set(Calendar.MINUTE, 0);
         c.set(Calendar.SECOND, 0);
-        c.set(Calendar.MILLISECOND,0);
+        c.set(Calendar.MILLISECOND, 0);
 
 
         Date beginDate = c.getTime();
@@ -211,155 +204,158 @@ public class WindturbinegoodnessService {
         Date endDate = c.getTime();
 
 
-
-        List<String> xtime=new ArrayList<>();
-        List<EchartDataVo> vos=new ArrayList<>();
-        List<List<EchartDataVo>> resultvos=new ArrayList<>();
-        Map<String,String> map=new HashMap<>();
+        List<String> xtime = new ArrayList<>();
+        List<EchartDataVo> vos = new ArrayList<>();
+        List<List<EchartDataVo>> resultvos = new ArrayList<>();
+        Map<String, String> map = new HashMap<>();
         int length = 240;
         String plotBands = null;
         StringBuilder sb = new StringBuilder("");
-        
+
         Map<String, ProBasicEquipmentPoint> wtpointmap = CacheContext.wtpAimap.get(wtId);
         ProBasicEquipmentPoint fjzt = wtpointmap.get(ContantXk.SBZT);
 
-        String beginTime=null;
-        String endTime=null;
-        String time=null;
-
-            if (null != fjzt) {
-                List<PointData> fjztls = edosUtil.getHistoryDatasSnap(fjzt, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 360L);
+        String beginTime = null;
+        String endTime = null;
+        String time = null;
+
+        if (null != fjzt) {
+            List<PointData> fjztls = edosUtil.getHistoryDatasSnap(fjzt, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 360L);
+
+
+            int zt = 0;
+            for (int i = 0; i < fjztls.size(); i++) {
+                if (i < fjztls.size()) {
+
+                    PointData pd = fjztls.get(i);
+                    int zttemp = Double.valueOf(pd.getPointValueInDouble()).intValue();
+                    Date resultDate = new Date(pd.getPointTime() * 1000);
+                    beginTime = sdf.format(resultDate);
+                    time = sdf2.format(resultDate);
+                    xtime.add(beginTime);
+                    if (i == 0) {
+                        zt = zttemp;
+                        EchartDataVo vo = new EchartDataVo();
+                        vo.setxAxis(beginTime);
+                        vo.setTime1(time);
+                        vo.setName(judgeSatte(zttemp));
+
+                        EchartDataVo.ItemStyle item = vo.new ItemStyle();
+                        item.setColor(judgeColor(zttemp));
+                        vo.setItemStyle(item);
+
+                        vos.add(vo);
+                    } else {
+                        if (zt != zttemp) {
+                            zt = zttemp;
+                            c = Calendar.getInstance();
+                            c.setTime(resultDate);
+//                                c.add(Calendar.MINUTE, -6);
+                            endTime = sdf.format(c.getTime());
+                            time = sdf2.format(c.getTime());
 
+                            vos.get(0).setTime2(time);
+                            EchartDataVo vo = new EchartDataVo();
+                            vo.setxAxis(endTime);
+                            vos.add(vo);
 
-                int zt = 0;
-                for (int i = 0; i < fjztls.size(); i++) {
-                    if (i < fjztls.size()) {
 
-                        PointData pd=fjztls.get(i);
-                        int zttemp = Double.valueOf(pd.getPointValueInDouble()).intValue();
-                        Date resultDate = new Date(pd.getPointTime() * 1000);
-                        beginTime = sdf.format(resultDate);
-                        time=sdf2.format(resultDate);
-                        xtime.add(beginTime);
-                        if (i == 0) {
+                            if (vos.size() == 2) {
+                                resultvos.add(vos);
+                                vos = new ArrayList<>();
+                                vo = new EchartDataVo();
+                                vo.setxAxis(beginTime);
+                                vo.setTime1(sdf2.format(resultDate));
+                                vo.setName(judgeSatte(zttemp));
+                                EchartDataVo.ItemStyle item = vo.new ItemStyle();
+                                item.setColor(judgeColor(zttemp));
+                                vo.setItemStyle(item);
+                                vos.add(vo);
+                            }
+                        } else if (i == fjztls.size() - 1) {
                             zt = zttemp;
+                            c = Calendar.getInstance();
+                            c.setTime(resultDate);
+//                                c.add(Calendar.MINUTE, -6);
+                            endTime = sdf.format(c.getTime());
+                            time = sdf2.format(c.getTime());
+
+                            vos.get(0).setTime2(time);
                             EchartDataVo vo = new EchartDataVo();
+                            vo.setxAxis(endTime);
                             vo.setxAxis(beginTime);
-                            vo.setTime1(time);
+                            vo.setTime1(sdf2.format(resultDate));
                             vo.setName(judgeSatte(zttemp));
-
-                            EchartDataVo.ItemStyle item= vo.new ItemStyle();
+                            EchartDataVo.ItemStyle item = vo.new ItemStyle();
                             item.setColor(judgeColor(zttemp));
                             vo.setItemStyle(item);
-
                             vos.add(vo);
-                        } else {
-                            if (zt != zttemp) {
-                                zt = zttemp;
-                                c = Calendar.getInstance();
-                                c.setTime(resultDate);
-//                                c.add(Calendar.MINUTE, -6);
-                                endTime = sdf.format(c.getTime());
-                                time=sdf2.format(c.getTime());
-
-                                vos.get(0).setTime2(time);
-                                EchartDataVo vo = new EchartDataVo();
-                                vo.setxAxis(endTime);
-                                vos.add(vo);
-
-
-                                if (vos.size() == 2) {
-                                    resultvos.add(vos);
-                                    vos = new ArrayList<>();
-                                    vo = new EchartDataVo();
-                                    vo.setxAxis(beginTime);
-                                    vo.setTime1(sdf2.format(resultDate));
-                                    vo.setName(judgeSatte(zttemp));
-                                    EchartDataVo.ItemStyle item= vo.new ItemStyle();
-                                    item.setColor(judgeColor(zttemp));
-                                    vo.setItemStyle(item);
-                                    vos.add(vo);
-                                }
-                            }else if(i==fjztls.size()-1)
-                            {
-                                zt = zttemp;
-                                c = Calendar.getInstance();
-                                c.setTime(resultDate);
-//                                c.add(Calendar.MINUTE, -6);
-                                endTime = sdf.format(c.getTime());
-                                time=sdf2.format(c.getTime());
-
-                                vos.get(0).setTime2(time);
-                                EchartDataVo vo = new EchartDataVo();
-                                vo.setxAxis(endTime);
-                                vos.add(vo);
-                                resultvos.add(vos);
-                            }
-
+                            resultvos.add(vos);
                         }
 
                     }
 
                 }
+
             }
+        }
         return resultvos;
     }
 
-    private  String judgeSatte(int zt)
-    {
-        String ztname=null;
-        switch ( zt ) {
+    private String judgeSatte(int zt) {
+        String ztname = null;
+        switch (zt) {
             case 0:
-                ztname= "待机";
+                ztname = "待机";
                 break;
             case 1:
-                ztname= "运行";
+                ztname = "运行";
                 break;
             case 2:
-                ztname= "故障";
+                ztname = "故障";
                 break;
             case 3:
-                ztname= "检修";
+                ztname = "检修";
                 break;
             case 4:
-                ztname= "限电";
+                ztname = "限电";
                 break;
             case 5:
-                ztname= "受累";
+                ztname = "受累";
                 break;
             case 6:
-                ztname= "中断";
+                ztname = "中断";
                 break;
             default:
 
         }
         return ztname;
     }
-//    运行 #08FCF0 待机 #34A90A  维护 #FD7D1C 故障 #FD0100 限电 #D201D8 离线 #A6A6A6
-    private  String judgeColor(int zt)
-    {
-        String ztname=null;
-        switch ( zt ) {
+
+    //    运行 #08FCF0 待机 #34A90A  维护 #FD7D1C 故障 #FD0100 限电 #D201D8 离线 #A6A6A6
+    private String judgeColor(int zt) {
+        String ztname = null;
+        switch (zt) {
             case 0:
-                ztname= "#BFFFDF";
+                ztname = "#BFFFDF";
                 break;
             case 1:
-                ztname= "#E7FFFF";
+                ztname = "#E7FFFF";
                 break;
             case 2:
-                ztname= "#FFBFBF";
+                ztname = "#FFBFBF";
                 break;
             case 3:
-                ztname= "#FFDFBF";
+                ztname = "#FFDFBF";
                 break;
             case 4:
-                ztname= "#FFDFFF";
+                ztname = "#FFDFFF";
                 break;
             case 5:
-                ztname= "#FFDFFF";
+                ztname = "#FFDFFF";
                 break;
             case 6:
-                ztname= "#DDDDDD";
+                ztname = "#DDDDDD";
                 break;
             default:
 
@@ -367,17 +363,17 @@ public class WindturbinegoodnessService {
         return ztname;
     }
 
-    public Map<String, String> getPlotBand(String wtId , String begin, String end) throws Exception {
+    public Map<String, String> getPlotBand(String wtId, String begin, String end) throws Exception {
 
         Map<String, ProBasicEquipmentPoint> wtpointmap = CacheContext.wtpAimap.get(wtId);
-        ProBasicEquipmentPoint fdlAi =wtpointmap.get(ContantXk.RFDL);
+        ProBasicEquipmentPoint fdlAi = wtpointmap.get(ContantXk.RFDL);
         ProBasicEquipmentPoint fsAi = wtpointmap.get(ContantXk.CJ_SSFS);
-        ProBasicEquipmentPoint llfdlAi =wtpointmap.get(ContantXk.RLLFDL);
+        ProBasicEquipmentPoint llfdlAi = wtpointmap.get(ContantXk.RLLFDL);
         ProBasicEquipmentPoint glAi = wtpointmap.get(ContantXk.CJ_SSGL);
-        ProBasicEquipmentPoint fjztAi =wtpointmap.get(ContantXk.SBZT);
+        ProBasicEquipmentPoint fjztAi = wtpointmap.get(ContantXk.SBZT);
 
-        Date begindate=DateUtils.parseDate1(begin);
-        Date enddate=DateUtils.parseDate1(end);
+        Date begindate = DateUtils.parseDate(begin);
+        Date enddate = DateUtils.parseDate(end);
         Map<String, String> tempmap = new HashMap<String, String>();
 
         // 发电量
@@ -433,7 +429,7 @@ public class WindturbinegoodnessService {
                 begindate.getTime() / 1000, enddate.getTime() / 1000, (long) 1,
                 3600L);
         if (!fjztls.isEmpty()) {
-            fjzt =  Double.valueOf(fjztls.get(0).getPointValueInDouble()).intValue();
+            fjzt = Double.valueOf(fjztls.get(0).getPointValueInDouble()).intValue();
 
             tempmap.put("fjzt", judgeSatte(fjzt));
 
@@ -558,12 +554,12 @@ public class WindturbinegoodnessService {
         Map<String, ProBasicEquipmentPoint> wtpointmap = CacheContext.wtpAimap.get(wtId);
 
 
-        ProBasicEquipmentPoint fdl =wtpointmap.get(ContantXk.RFDL);
-        ProBasicEquipmentPoint whss =wtpointmap.get(ContantXk.RJXSSDL);
-        ProBasicEquipmentPoint gzss =wtpointmap.get(ContantXk.RGZSSDL);
-        ProBasicEquipmentPoint xdss =wtpointmap.get(ContantXk.RXDTJSSDL);
-        ProBasicEquipmentPoint qfss =wtpointmap.get(ContantXk.RXNSSDL);
-        ProBasicEquipmentPoint fs =wtpointmap.get(ContantXk.CJ_SSFS);
+        ProBasicEquipmentPoint fdl = wtpointmap.get(ContantXk.RFDL);
+        ProBasicEquipmentPoint whss = wtpointmap.get(ContantXk.RJXSSDL);
+        ProBasicEquipmentPoint gzss = wtpointmap.get(ContantXk.RGZSSDL);
+        ProBasicEquipmentPoint xdss = wtpointmap.get(ContantXk.RXDTJSSDL);
+        ProBasicEquipmentPoint qfss = wtpointmap.get(ContantXk.RXNSSDL);
+        ProBasicEquipmentPoint fs = wtpointmap.get(ContantXk.CJ_SSFS);
 
         try {
             if (null != fdl) {
@@ -574,7 +570,7 @@ public class WindturbinegoodnessService {
                 for (int i = 0; i < length; i++) {
 
                     if (i < fdlls.size() && StringUtils.notEmp(fdlls.get(i + 1).getPointTime())) {
-                        
+
                         vos.get(i).setTime(fdlls.get(i + 1).getPointTime() * 1000);
                         if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
 
@@ -621,7 +617,7 @@ public class WindturbinegoodnessService {
                 for (int i = 0; i < length; i++) {
 
                     if (i < whssls.size() && StringUtils.notEmp(whssls.get(i + 1).getPointTime())) {
-                        
+
                         vos.get(i).setTime(whssls.get(i + 1).getPointTime() * 1000);
                         if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
                             if (i != 0) {
@@ -669,7 +665,7 @@ public class WindturbinegoodnessService {
                 for (int i = 0; i < length; i++) {
 
                     if (i < gzssls.size() && StringUtils.notEmp(gzssls.get(i + 1).getPointTime())) {
-                        
+
                         vos.get(i).setTime(gzssls.get(i + 1).getPointTime() * 1000);
                         if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
                             if (i != 0) {
@@ -718,7 +714,7 @@ public class WindturbinegoodnessService {
                 for (int i = 0; i < length; i++) {
 
                     if (i < xdssls.size() && StringUtils.notEmp(xdssls.get(i + 1).getPointTime())) {
-                        
+
                         vos.get(i).setTime(xdssls.get(i + 1).getPointTime() * 1000);
                         if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
                             if (i != 0) {
@@ -816,7 +812,7 @@ public class WindturbinegoodnessService {
                 for (int i = 0; i < 24; i++) {
 
                     if (i < fsls.size() && StringUtils.notEmp(fsls.get(i + 1).getPointTime())) {
-                        
+
                         vos.get(i).setTime(fsls.get(i + 1).getPointTime() * 1000);
                         if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
 

+ 226 - 175
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/homepage/EconomyPointHomePageService.java

@@ -70,29 +70,29 @@ public class EconomyPointHomePageService {
     private Map<String, ProEconPowerstationInfoDay2> wstimemap = new HashMap<>();
 
 
-    /** 综合场用电率  */
+    /**
+     * 综合场用电率
+     */
     private List<ProEconPowerstationInfoDay5> zhcydllist = new ArrayList<>();
 
-    /** 电量统计分析 */
+    /**
+     * 电量统计分析
+     */
     private List<ProEconPowerstationInfoDay1> dltjfxlist = new ArrayList<>();
 
     private List<ProEconPowerstationInfoDay4> threeRateCurvelist = new ArrayList<>();//三率曲线数据
 
     private BigDecimal capacity = null;
 
-    private Map<String,BigDecimal> wsdlfx = null;//五损电量分析
-
-    private List<Map<String,Object>> zhcydl = null;//综合场用电率
-
-    private List<Map<String,Object>> dltjfxList = null;//电量统计分析
-
-    private List<Map<String,Object>> slqxList = null;//三率曲线
-
-    private Map<String,Object> fdinfomap = null;//发电(风能利用率、发电量、欠发电量)
+    private Map<String, BigDecimal> wsdlfx = null;//五损电量分析
 
+    private List<Map<String, Object>> zhcydl = null;//综合场用电率
 
+    private List<Map<String, Object>> dltjfxList = null;//电量统计分析
 
+    private List<Map<String, Object>> slqxList = null;//三率曲线
 
+    private Map<String, Object> fdinfomap = null;//发电(风能利用率、发电量、欠发电量)
 
 
     /**
@@ -107,15 +107,14 @@ public class EconomyPointHomePageService {
      * @param dateType
      * @return
      */
-    public Map<String,Object> getEconomyPointHomePageInfo(String foreignKeyId, String regionId, String companyId,String staType, String dateType,String pointCode) throws ParseException {
+    public Map<String, Object> getEconomyPointHomePageInfo(String foreignKeyId, String regionId, String companyId, String staType, String dateType, String pointCode) throws ParseException {
 
-        Map<String,Object> allmap = new HashMap<>();
+        Map<String, Object> allmap = new HashMap<>();
         //获取当前时间
         String strdate = DateUtils.toDate1(new Date());
         Date date = DateUtils.parseDate(strdate);
 
 
-
         /** 五损 */
         wsmap = proEconPowerstationInfoDay1Service.getEconFiveLoss(foreignKeyId, staType, dateType, date);
 
@@ -134,7 +133,7 @@ public class EconomyPointHomePageService {
         /** 装机容量 */
         capacity = new BigDecimal(proBasicCompanyService.getProBasicCompanyCapacity(regionId, companyId));
         //综合场用电量
-        zhcydllist =  proEconPowerstationInfoDay5Service.getEconZhcydldb(foreignKeyId, staType, dateType, date);
+        zhcydllist = proEconPowerstationInfoDay5Service.getEconZhcydldb(foreignKeyId, staType, dateType, date);
 
         //电量统计分析
         dltjfxlist = proEconPowerstationInfoDay1Service.getEconFiveLosslist(foreignKeyId, staType, dateType, date);
@@ -142,15 +141,14 @@ public class EconomyPointHomePageService {
         //三率曲线
         threeRateCurvelist = proEconPowerstationInfoDay4Service.getEconThreeRateCurve(foreignKeyId, staType, dateType, date);
 
-        List<ProEconPointCodeDTO> pointCodeDTO =  proEconPointCodeService.getEconPointRanking(regionId, companyId, pointCode);
+        List<ProEconPointCodeDTO> pointCodeDTO = proEconPointCodeService.getEconPointRanking(regionId, companyId, pointCode,date,dateType);
         /**  场站信息 */
-        List<ProBasicPowerstation> powerstationList =  proBasicPowerstationService.getProBasicPowerstationlist(regionId,companyId,staType);
+        List<ProBasicPowerstation> powerstationList = proBasicPowerstationService.getProBasicPowerstationlist(regionId, companyId, staType);
         wsdlfx = new HashMap<>();//五损电量分析
-        zhcydl= new ArrayList<>();//综合场用电率
+        zhcydl = new ArrayList<>();//综合场用电率
         dltjfxList = new ArrayList<>();//电量统计分析
-        fdinfomap =  new HashMap<>();//(风能利用率、发电量、欠发电量)
-        slqxList =  new ArrayList<>();//三率曲线
-
+        fdinfomap = new HashMap<>();//(风能利用率、发电量、欠发电量)
+        slqxList = new ArrayList<>();//三率曲线
 
 
         switch (dateType) {
@@ -190,99 +188,105 @@ public class EconomyPointHomePageService {
                 yearfdinfo();
                 break;
         }
-        allmap.put("zbl",dto);//页面第一行的
-        allmap.put("stationinfo",powerstationList);//场站性息(装机容量)
-        allmap.put("sldlfx",wsdlfx);//损失电量分析
-        allmap.put("zhcydl",zhcydl);//综合场用电率
-        allmap.put("dltjfx",dltjfxList);//电量统计分析
-        allmap.put("fdlinfo",fdinfomap);//发电量 欠发电量  风能利用率
-        allmap.put("slqx",slqxList);//三率曲线
-        allmap.put("zbphl",pointCodeDTO);//排行榜
-
+        allmap.put("zbl", dto);//页面第一行的
+        allmap.put("stationinfo", powerstationList);//场站性息(装机容量)
+        allmap.put("sldlfx", wsdlfx);//损失电量分析
+        allmap.put("zhcydl", zhcydl);//综合场用电率
+        allmap.put("dltjfx", dltjfxList);//电量统计分析
+        allmap.put("fdlinfo", fdinfomap);//发电量 欠发电量  风能利用率
+        allmap.put("slqx", slqxList);//三率曲线
+        allmap.put("zbphl", pointCodeDTO);//排行榜
 
 
         return allmap;
     }
 
 
-
-   /** (风能利用率、发电量、欠发电量) */
+    /**
+     * (风能利用率、发电量、欠发电量)
+     */
     private void currfdinfo() {
         ProEconPowerstationInfoDay1 fdinfo = wsmap.get("currFiveInfo");
-        if(null != fdinfo){
-            fdinfomap.put("fdl",fdinfo.getRfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
-            fdinfomap.put("qfdl",fdinfo.getRqfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
-            if(compare0(fdinfo.getRllfdl())){
-                fdinfomap.put("fnlyl", compare100(fdinfo.getRfdl().divide(fdinfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
-            }else {
-                fdinfomap.put("fnlyl",0);
-            }
-
-
+        if (null != fdinfo) {
+            fdinfomap.put("fdl", fdinfo.getRfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
+            fdinfomap.put("qfdl", fdinfo.getRqfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
+            fdinfomap.put("fnlyl", compare0(fdinfo.getRllfdl()) ? compare100(fdinfo.getRfdl().divide(fdinfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+        }else {
+            fdinfomap.put("fdl", new BigDecimal(0));
+            fdinfomap.put("qfdl", new BigDecimal(0));
+            fdinfomap.put("fnlyl", new BigDecimal(0));
         }
 
     }
+
     private void monthfdinfo() {
         ProEconPowerstationInfoDay1 fdinfo = wsmap.get("currFiveInfo");
-        if(null != fdinfo){
-            fdinfomap.put("fdl",fdinfo.getYfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
-            fdinfomap.put("qfdl",fdinfo.getYqfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
-            fdinfomap.put("fnlyl", compare0(fdinfo.getYllfdl())?compare100(fdinfo.getYfdl().divide(fdinfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))):new BigDecimal(0));
+        if (null != fdinfo) {
+            fdinfomap.put("fdl", fdinfo.getYfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
+            fdinfomap.put("qfdl", fdinfo.getYqfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
+            fdinfomap.put("fnlyl", compare0(fdinfo.getYllfdl()) ? compare0(fdinfo.getYllfdl()) ? compare100(fdinfo.getYfdl().divide(fdinfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0) : new BigDecimal(0));
 
 
+        } else {
+            fdinfomap.put("fdl", new BigDecimal(0));
+            fdinfomap.put("qfdl", new BigDecimal(0));
+            fdinfomap.put("fnlyl", new BigDecimal(0));
         }
     }
+
     private void yearfdinfo() {
         ProEconPowerstationInfoDay1 fdinfo = wsmap.get("currFiveInfo");
-        if(null != fdinfo){
-            fdinfomap.put("fdl",fdinfo.getNfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
-            fdinfomap.put("qfdl",fdinfo.getNqfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
-            fdinfomap.put("fnlyl", compare0(fdinfo.getNllfdl())?compare100(fdinfo.getNfdl().divide(fdinfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))):new BigDecimal(0));
-
+        if (null != fdinfo) {
+            fdinfomap.put("fdl", fdinfo.getNfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
+            fdinfomap.put("qfdl", fdinfo.getNqfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
+            fdinfomap.put("fnlyl", compare0(fdinfo.getNllfdl()) ? compare0(fdinfo.getNllfdl()) ? compare100(fdinfo.getNfdl().divide(fdinfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0) : new BigDecimal(0));
+
+        } else {
+            fdinfomap.put("fdl", new BigDecimal(0));
+            fdinfomap.put("qfdl", new BigDecimal(0));
+            fdinfomap.put("fnlyl", new BigDecimal(0));
         }
     }
 
 
-
     /**
      * 三率曲线
      */
     private void currThreeRateCurve() {
-        threeRateCurvelist.stream().forEach(i->{
+        threeRateCurvelist.stream().forEach(i -> {
             Map<String, Object> m = new HashMap<>();
-            m.put("fwjsl",i.getRfwjsl());
-            m.put("ztzhjsl",i.getRztzhjsl());
-            m.put("gzxqjsl",i.getRgzxqjsl());
-            m.put("date",DateUtils.toDate1(i.getRecordDate()));
+            m.put("fwjsl", i.getRfwjsl());
+            m.put("ztzhjsl", i.getRztzhjsl());
+            m.put("gzxqjsl", i.getRgzxqjsl());
+            m.put("date", DateUtils.toDate1(i.getRecordDate()));
             slqxList.add(m);
         });
 
     }
+
     private void monthThreeRateCurve() {
-        threeRateCurvelist.stream().forEach(i->{
+        threeRateCurvelist.stream().forEach(i -> {
             Map<String, Object> m = new HashMap<>();
-            m.put("fwjsl",i.getYfwjsl());
-            m.put("ztzhjsl",i.getYztzhjsl());
-            m.put("gzxqjsl",i.getYgzxqjsl());
-            m.put("date",DateUtils.toDate1(i.getRecordDate()));
+            m.put("fwjsl", i.getYfwjsl());
+            m.put("ztzhjsl", i.getYztzhjsl());
+            m.put("gzxqjsl", i.getYgzxqjsl());
+            m.put("date", DateUtils.toDate1(i.getRecordDate()));
             slqxList.add(m);
         });
     }
 
     private void yearThreeRateCurve() {
-        threeRateCurvelist.stream().forEach(i->{
+        threeRateCurvelist.stream().forEach(i -> {
             Map<String, Object> m = new HashMap<>();
-            m.put("fwjsl",i.getNfwjsl());
-            m.put("ztzhjsl",i.getNztzhjsl());
-            m.put("gzxqjsl",i.getNgzxqjsl());
-            m.put("date",DateUtils.toDate1(i.getRecordDate()));
+            m.put("fwjsl", i.getNfwjsl());
+            m.put("ztzhjsl", i.getNztzhjsl());
+            m.put("gzxqjsl", i.getNgzxqjsl());
+            m.put("date", DateUtils.toDate1(i.getRecordDate()));
             slqxList.add(m);
         });
     }
 
 
-
-
     /**
      * 电量统计分析
      */
@@ -297,7 +301,7 @@ public class EconomyPointHomePageService {
             m.put("xddl", (i.getRxdtjssdl().add(i.getRxdjclssdl())).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));//限电
             m.put("gzdl", i.getRgzssdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));      //故障
             m.put("xndl", i.getRxnssdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));//性能
-            m.put("date",DateUtils.toDate1(i.getRecordDate()));
+            m.put("date", DateUtils.toDate1(i.getRecordDate()));
             dltjfxList.add(m);
         });
     }
@@ -311,7 +315,7 @@ public class EconomyPointHomePageService {
             m.put("xddl", (i.getYxdtjssdl().add(i.getRxdjclssdl())).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));//限电
             m.put("gzdl", (i.getYgzssdl()).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));      //故障
             m.put("xndl", (i.getYxnssdl()).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));//性能
-            m.put("date",DateUtils.toDate1(i.getRecordDate()));
+            m.put("date", DateUtils.toDate1(i.getRecordDate()));
             dltjfxList.add(m);
         });
     }
@@ -325,112 +329,161 @@ public class EconomyPointHomePageService {
             m.put("xddl", (i.getNxdtjssdl().add(i.getRxdjclssdl())).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));//限电
             m.put("gzdl", (i.getNgzssdl()).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));      //故障
             m.put("xndl", (i.getNxnssdl()).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));//性能
-            m.put("date",DateUtils.toDate1(i.getRecordDate()));
+            m.put("date", DateUtils.toDate1(i.getRecordDate()));
             dltjfxList.add(m);
         });
     }
 
 
-
-
-    /**综合厂用电率 */
-    private void currZhcydl(){
-        zhcydllist.stream().forEach(i->{
-            Map<String,Object> m = new HashMap<>();
-            if(compare0(i.getRfdldb())){
-                m.put("key",DateUtils.toDate1(i.getRecordDate()));
-                m.put("value", compare0(i.getRfdldb())?compare100(i.getRzhcydldb().divide(i.getRfdldb(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))):new BigDecimal(0));
-            }else {
-                m.put("key",DateUtils.toDate1(i.getRecordDate()));
-                m.put("value",0);
+    /**
+     * 综合厂用电率
+     */
+    private void currZhcydl() {
+        zhcydllist.stream().forEach(i -> {
+            Map<String, Object> m = new HashMap<>();
+            if (compare0(i.getRfdldb())) {
+                m.put("key", DateUtils.toDate1(i.getRecordDate()));
+                m.put("value", compare0(i.getRfdldb()) ? compare100(i.getRzhcydldb().divide(i.getRfdldb(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            } else {
+                m.put("key", DateUtils.toDate1(i.getRecordDate()));
+                m.put("value", 0);
             }
             zhcydl.add(m);
         });
     }
 
-    private void monthZhcydl(){
-        zhcydllist.stream().forEach(i->{
-            Map<String,Object> m = new HashMap<>();
-            if(compare0(i.getYfdldb())){
-                m.put("key",DateUtils.toDate1(i.getRecordDate()));
-                m.put("value", compare0(i.getYfdldb())?compare100(i.getYzhcydldb().divide(i.getYfdldb(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-            }else {
-                m.put("key",DateUtils.toDate1(i.getRecordDate()));
-                m.put("value",0);
+    private void monthZhcydl() {
+        zhcydllist.stream().forEach(i -> {
+            Map<String, Object> m = new HashMap<>();
+            if (compare0(i.getYfdldb())) {
+                m.put("key", DateUtils.toDate1(i.getRecordDate()));
+                m.put("value", compare0(i.getYfdldb()) ? compare100(i.getYzhcydldb().divide(i.getYfdldb(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            } else {
+                m.put("key", DateUtils.toDate1(i.getRecordDate()));
+                m.put("value", 0);
             }
             zhcydl.add(m);
         });
     }
 
-    private void yearZhcydl(){
-        zhcydllist.stream().forEach(i->{
-            Map<String,Object> m = new HashMap<>();
-            if(compare0(i.getNfdldb())){
-                m.put("key",DateUtils.toDate1(i.getRecordDate()));
-                m.put("value", compare0(i.getNfdldb())?compare100(i.getNzhcydldb().divide(i.getNfdldb(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-            }else {
-                m.put("key",DateUtils.toDate1(i.getRecordDate()));
-                m.put("value",0);
+    private void yearZhcydl() {
+        zhcydllist.stream().forEach(i -> {
+            Map<String, Object> m = new HashMap<>();
+            if (compare0(i.getNfdldb())) {
+                m.put("key", DateUtils.toDate1(i.getRecordDate()));
+                m.put("value", compare0(i.getNfdldb()) ? compare100(i.getNzhcydldb().divide(i.getNfdldb(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            } else {
+                m.put("key", DateUtils.toDate1(i.getRecordDate()));
+                m.put("value", 0);
             }
             zhcydl.add(m);
         });
     }
 
 
-    /** 损失电量分析*/
+    /**
+     * 损失电量分析
+     */
     private void currFiveDlFx() {
         ProEconPowerstationInfoDay1 fiveInfo = wsmap.get("currFiveInfo");
 
-        //发电量
-        wsdlfx.put("fdl",  compare0(fiveInfo.getRllfdl())?compare100(fiveInfo.getRfdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-        //受累
-        wsdlfx.put("sldl", compare0(fiveInfo.getRllfdl())?compare100((fiveInfo.getRcwsldwssdl().add(fiveInfo.getRcwsltqssdl())).divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-        //检修
-        wsdlfx.put("jxdl", compare0(fiveInfo.getRllfdl())?compare100(fiveInfo.getRjxssdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-        //限电
-        wsdlfx.put("xddl", compare0(fiveInfo.getRllfdl())?compare100((fiveInfo.getRxdtjssdl().add(fiveInfo.getRxdjclssdl())).divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-        //故障
-        wsdlfx.put("gzdl", compare0(fiveInfo.getRllfdl())?compare100(fiveInfo.getRgzssdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-        //性能
-        wsdlfx.put("xndl", compare0(fiveInfo.getRllfdl())?compare100(fiveInfo.getRxnssdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
+        if (null != fiveInfo) {
+            //发电量
+            wsdlfx.put("fdl", compare0(fiveInfo.getRllfdl()) ? compare100(fiveInfo.getRfdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            //受累
+            wsdlfx.put("sldl", compare0(fiveInfo.getRllfdl()) ? compare100((fiveInfo.getRcwsldwssdl().add(fiveInfo.getRcwsltqssdl())).divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            //检修
+            wsdlfx.put("jxdl", compare0(fiveInfo.getRllfdl()) ? compare100(fiveInfo.getRjxssdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            //限电
+            wsdlfx.put("xddl", compare0(fiveInfo.getRllfdl()) ? compare100((fiveInfo.getRxdtjssdl().add(fiveInfo.getRxdjclssdl())).divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            //故障
+            wsdlfx.put("gzdl", compare0(fiveInfo.getRllfdl()) ? compare100(fiveInfo.getRgzssdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            //性能
+            wsdlfx.put("xndl", compare0(fiveInfo.getRllfdl()) ? compare100(fiveInfo.getRxnssdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+
+        } else {
+            //发电量
+            wsdlfx.put("fdl", new BigDecimal(0));
+            //受累
+            wsdlfx.put("sldl", new BigDecimal(0));
+            //检修
+            wsdlfx.put("jxdl", new BigDecimal(0));
+            //限电
+            wsdlfx.put("xddl", new BigDecimal(0));
+            //故障
+            wsdlfx.put("gzdl", new BigDecimal(0));
+            //性能
+            wsdlfx.put("xndl", new BigDecimal(0));
+
+        }
+
 
     }
+
     private void monthFiveDlFx() {
         ProEconPowerstationInfoDay1 fiveInfo = wsmap.get("currFiveInfo");
-        //发电量
-        wsdlfx.put("fdl",  compare0(fiveInfo.getYllfdl())? compare100(fiveInfo.getYfdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-        //受累
-        wsdlfx.put("sldl", compare0(fiveInfo.getYllfdl())? compare100((fiveInfo.getYcwsldwssdl().add(fiveInfo.getYcwsltqssdl())).divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-        //检修
-        wsdlfx.put("jxdl", compare0(fiveInfo.getYllfdl())? compare100(fiveInfo.getYjxssdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-        //限电
-        wsdlfx.put("xddl", compare0(fiveInfo.getYllfdl())? compare100((fiveInfo.getYxdtjssdl().add(fiveInfo.getYxdjclssdl())).divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-        //故障
-        wsdlfx.put("gzdl", compare0(fiveInfo.getYllfdl())? compare100(fiveInfo.getYgzssdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-        //性能
-        wsdlfx.put("xndl", compare0(fiveInfo.getYllfdl())? compare100(fiveInfo.getYxnssdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-
+        if (null != fiveInfo) {
+            //发电量
+            wsdlfx.put("fdl", compare0(fiveInfo.getYllfdl()) ? compare100(fiveInfo.getYfdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            //受累
+            wsdlfx.put("sldl", compare0(fiveInfo.getYllfdl()) ? compare100((fiveInfo.getYcwsldwssdl().add(fiveInfo.getYcwsltqssdl())).divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            //检修
+            wsdlfx.put("jxdl", compare0(fiveInfo.getYllfdl()) ? compare100(fiveInfo.getYjxssdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            //限电
+            wsdlfx.put("xddl", compare0(fiveInfo.getYllfdl()) ? compare100((fiveInfo.getYxdtjssdl().add(fiveInfo.getYxdjclssdl())).divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            //故障
+            wsdlfx.put("gzdl", compare0(fiveInfo.getYllfdl()) ? compare100(fiveInfo.getYgzssdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            //性能
+            wsdlfx.put("xndl", compare0(fiveInfo.getYllfdl()) ? compare100(fiveInfo.getYxnssdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+
+        } else {
+            //发电量
+            wsdlfx.put("fdl", new BigDecimal(0));
+            //受累
+            wsdlfx.put("sldl", new BigDecimal(0));
+            //检修
+            wsdlfx.put("jxdl", new BigDecimal(0));
+            //限电
+            wsdlfx.put("xddl", new BigDecimal(0));
+            //故障
+            wsdlfx.put("gzdl", new BigDecimal(0));
+            //性能
+            wsdlfx.put("xndl", new BigDecimal(0));
+        }
     }
 
     private void yearFiveDlFx() {
         ProEconPowerstationInfoDay1 fiveInfo = wsmap.get("currFiveInfo");
-        //发电量
-        wsdlfx.put("fdl", compare0(fiveInfo.getNllfdl()) ? compare100(fiveInfo.getNfdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-        //受累
-        wsdlfx.put("sldl", compare0(fiveInfo.getNllfdl()) ? compare100((fiveInfo.getNcwsldwssdl().add(fiveInfo.getNcwsltqssdl())).divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-        //检修
-        wsdlfx.put("jxdl", compare0(fiveInfo.getNllfdl()) ? compare100(fiveInfo.getNjxssdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-        //限电
-        wsdlfx.put("xddl", compare0(fiveInfo.getNllfdl()) ? compare100((fiveInfo.getNxdtjssdl().add(fiveInfo.getNxdjclssdl())).divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-        //故障
-        wsdlfx.put("gzdl", compare0(fiveInfo.getNllfdl()) ? compare100(fiveInfo.getNgzssdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))): new BigDecimal(0));
-        //性能
-        wsdlfx.put("xndl", compare0(fiveInfo.getNllfdl()) ? compare100(fiveInfo.getNxnssdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+        if (null != fiveInfo) {
+            //发电量
+            wsdlfx.put("fdl", compare0(fiveInfo.getNllfdl()) ? compare100(fiveInfo.getNfdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            //受累
+            wsdlfx.put("sldl", compare0(fiveInfo.getNllfdl()) ? compare100((fiveInfo.getNcwsldwssdl().add(fiveInfo.getNcwsltqssdl())).divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            //检修
+            wsdlfx.put("jxdl", compare0(fiveInfo.getNllfdl()) ? compare100(fiveInfo.getNjxssdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            //限电
+            wsdlfx.put("xddl", compare0(fiveInfo.getNllfdl()) ? compare100((fiveInfo.getNxdtjssdl().add(fiveInfo.getNxdjclssdl())).divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            //故障
+            wsdlfx.put("gzdl", compare0(fiveInfo.getNllfdl()) ? compare100(fiveInfo.getNgzssdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+            //性能
+            wsdlfx.put("xndl", compare0(fiveInfo.getNllfdl()) ? compare100(fiveInfo.getNxnssdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+        } else {
+            //发电量
+            wsdlfx.put("fdl", new BigDecimal(0));
+            //受累
+            wsdlfx.put("sldl", new BigDecimal(0));
+            //检修
+            wsdlfx.put("jxdl", new BigDecimal(0));
+            //限电
+            wsdlfx.put("xddl", new BigDecimal(0));
+            //故障
+            wsdlfx.put("gzdl", new BigDecimal(0));
+            //性能
+            wsdlfx.put("xndl", new BigDecimal(0));
+        }
     }
 
 
-
-
     /**
      * 五损经济指标
      */
@@ -678,17 +731,17 @@ public class EconomyPointHomePageService {
 
             if (null != ringThreeInfo) {
 
-                dto.setRingFwjszzl(compare0(ringThreeInfo.getYfwjsl())?compare100((currThreeInfo.getYfwjsl().subtract(ringThreeInfo.getYfwjsl())).divide(ringThreeInfo.getYfwjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))):new BigDecimal(0));
-                dto.setRingZtzhzzl(compare0(ringThreeInfo.getYztzhjsl())?compare100((currThreeInfo.getYztzhjsl().subtract(ringThreeInfo.getYztzhjsl())).divide(ringThreeInfo.getYztzhjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))):new BigDecimal(0));
-                dto.setRingXqjszzl(compare0(ringThreeInfo.getYgzxqjsl())?compare100((currThreeInfo.getYgzxqjsl().subtract(ringThreeInfo.getYgzxqjsl())).divide(ringThreeInfo.getYgzxqjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))):new BigDecimal(0));
+                dto.setRingFwjszzl(compare0(ringThreeInfo.getYfwjsl()) ? compare100((currThreeInfo.getYfwjsl().subtract(ringThreeInfo.getYfwjsl())).divide(ringThreeInfo.getYfwjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+                dto.setRingZtzhzzl(compare0(ringThreeInfo.getYztzhjsl()) ? compare100((currThreeInfo.getYztzhjsl().subtract(ringThreeInfo.getYztzhjsl())).divide(ringThreeInfo.getYztzhjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+                dto.setRingXqjszzl(compare0(ringThreeInfo.getYgzxqjsl()) ? compare100((currThreeInfo.getYgzxqjsl().subtract(ringThreeInfo.getYgzxqjsl())).divide(ringThreeInfo.getYgzxqjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
 
             }
 
             if (null != withThreeInfo) {
 
-                dto.setWithFwjszzl(compare0(withThreeInfo.getYfwjsl())?compare100((currThreeInfo.getYfwjsl().subtract(withThreeInfo.getYfwjsl())).divide(withThreeInfo.getYfwjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))):new BigDecimal(0));
-                dto.setWithZtzhzzl(compare0(withThreeInfo.getYztzhjsl())?compare100((currThreeInfo.getYztzhjsl().subtract(withThreeInfo.getYztzhjsl())).divide(withThreeInfo.getYztzhjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))):new BigDecimal(0));
-                dto.setWithXqjszzl(compare0(withThreeInfo.getYgzxqjsl())?compare100((currThreeInfo.getYgzxqjsl().subtract(withThreeInfo.getYgzxqjsl())).divide(withThreeInfo.getYgzxqjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))):new BigDecimal(0));
+                dto.setWithFwjszzl(compare0(withThreeInfo.getYfwjsl()) ? compare100((currThreeInfo.getYfwjsl().subtract(withThreeInfo.getYfwjsl())).divide(withThreeInfo.getYfwjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+                dto.setWithZtzhzzl(compare0(withThreeInfo.getYztzhjsl()) ? compare100((currThreeInfo.getYztzhjsl().subtract(withThreeInfo.getYztzhjsl())).divide(withThreeInfo.getYztzhjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+                dto.setWithXqjszzl(compare0(withThreeInfo.getYgzxqjsl()) ? compare100((currThreeInfo.getYgzxqjsl().subtract(withThreeInfo.getYgzxqjsl())).divide(withThreeInfo.getYgzxqjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
 
             }
 
@@ -710,17 +763,17 @@ public class EconomyPointHomePageService {
 
             if (null != ringThreeInfo) {
 
-                dto.setRingFwjszzl(compare0(ringThreeInfo.getNfwjsl())?(currThreeInfo.getNfwjsl().subtract(ringThreeInfo.getNfwjsl())).divide(ringThreeInfo.getNfwjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")): new BigDecimal(0));
-                dto.setRingZtzhzzl(compare0(ringThreeInfo.getNztzhjsl())?(currThreeInfo.getNztzhjsl().subtract(ringThreeInfo.getNztzhjsl())).divide(ringThreeInfo.getNztzhjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")): new BigDecimal(0));
-                dto.setRingXqjszzl(compare0(ringThreeInfo.getNgzxqjsl())?(currThreeInfo.getNgzxqjsl().subtract(ringThreeInfo.getNgzxqjsl())).divide(ringThreeInfo.getNgzxqjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")): new BigDecimal(0));
+                dto.setRingFwjszzl(compare0(ringThreeInfo.getNfwjsl()) ? (currThreeInfo.getNfwjsl().subtract(ringThreeInfo.getNfwjsl())).divide(ringThreeInfo.getNfwjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")) : new BigDecimal(0));
+                dto.setRingZtzhzzl(compare0(ringThreeInfo.getNztzhjsl()) ? (currThreeInfo.getNztzhjsl().subtract(ringThreeInfo.getNztzhjsl())).divide(ringThreeInfo.getNztzhjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")) : new BigDecimal(0));
+                dto.setRingXqjszzl(compare0(ringThreeInfo.getNgzxqjsl()) ? (currThreeInfo.getNgzxqjsl().subtract(ringThreeInfo.getNgzxqjsl())).divide(ringThreeInfo.getNgzxqjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")) : new BigDecimal(0));
 
             }
 
             if (null != withThreeInfo) {
 
-                dto.setWithFwjszzl(compare0(withThreeInfo.getNfwjsl())?(currThreeInfo.getNfwjsl().subtract(withThreeInfo.getNfwjsl())).divide(withThreeInfo.getNfwjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")): new BigDecimal(0));
-                dto.setWithZtzhzzl(compare0(withThreeInfo.getNztzhjsl())?(currThreeInfo.getNztzhjsl().subtract(withThreeInfo.getNztzhjsl())).divide(withThreeInfo.getNztzhjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")): new BigDecimal(0));
-                dto.setWithXqjszzl(compare0(withThreeInfo.getNgzxqjsl())?(currThreeInfo.getNgzxqjsl().subtract(withThreeInfo.getNgzxqjsl())).divide(withThreeInfo.getNgzxqjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")): new BigDecimal(0));
+                dto.setWithFwjszzl(compare0(withThreeInfo.getNfwjsl()) ? (currThreeInfo.getNfwjsl().subtract(withThreeInfo.getNfwjsl())).divide(withThreeInfo.getNfwjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")) : new BigDecimal(0));
+                dto.setWithZtzhzzl(compare0(withThreeInfo.getNztzhjsl()) ? (currThreeInfo.getNztzhjsl().subtract(withThreeInfo.getNztzhjsl())).divide(withThreeInfo.getNztzhjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")) : new BigDecimal(0));
+                dto.setWithXqjszzl(compare0(withThreeInfo.getNgzxqjsl()) ? (currThreeInfo.getNgzxqjsl().subtract(withThreeInfo.getNgzxqjsl())).divide(withThreeInfo.getNgzxqjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")) : new BigDecimal(0));
 
             }
 
@@ -752,7 +805,7 @@ public class EconomyPointHomePageService {
 
         if (null != currFiveInfo && null != currDlInfo) {
 
-            BigDecimal currZhcydl = compare0(currFiveInfo.getRfdl())?compare100(currDlInfo.getRzhcydldb().divide(currFiveInfo.getRfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))):new BigDecimal(0);
+            BigDecimal currZhcydl = compare0(currFiveInfo.getRfdl()) ? compare100(currDlInfo.getRzhcydldb().divide(currFiveInfo.getRfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0);
             dto.setCurrZhcydl(currZhcydl);
 
             if (null != ringFiveInfo && null != ringDlInfo && compare0(ringFiveInfo.getRfdl())) {
@@ -787,14 +840,14 @@ public class EconomyPointHomePageService {
 
         if (null != currTimeInfo) {
 
-            double currhours = DateUtils.hoursDiff1(new Date(),DateUtils.getStartOfDay(new Date()));
+            double currhours = DateUtils.hoursDiff1(new Date(), DateUtils.getStartOfDay(new Date()));
             BigDecimal currhours2 = new BigDecimal(0.00).valueOf(currhours);
             currhours2 = compare0(currhours2) ? currhours2 : new BigDecimal(1);
             BigDecimal currSbklyl = currhours2.subtract((currTimeInfo.getRhjgzxsmx().add(currTimeInfo.getRhjjxtjxs()))).divide(currhours2, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
             dto.setCurrSbklyl(currSbklyl);
             if (null != ringTimeInfo) {
 
-                int ringhours = DateUtils.hoursDiff(new Date(),DateUtils.getMonthFirstZero());
+                int ringhours = DateUtils.hoursDiff(new Date(), DateUtils.getMonthFirstZero());
                 BigDecimal ringhours2 = new BigDecimal(0.00).valueOf((int) ringhours);
                 BigDecimal ringSbklyl = ringhours2.subtract((ringTimeInfo.getRhjgzxsmx().add(ringTimeInfo.getRhjjxtjxs()))).divide(ringhours2, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
                 BigDecimal ringSbklyzzl = (currSbklyl.subtract(ringSbklyl)).divide(ringSbklyl, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
@@ -802,7 +855,7 @@ public class EconomyPointHomePageService {
             }
             if (null != withTimeInfo) {
 
-                int withhours = DateUtils.hoursDiff(new Date(),DateUtils.getYearFirstZero());
+                int withhours = DateUtils.hoursDiff(new Date(), DateUtils.getYearFirstZero());
                 BigDecimal withhours2 = new BigDecimal(0.00).valueOf((int) withhours);
                 BigDecimal withSbklyl = withhours2.subtract((withTimeInfo.getRhjgzxsmx().add(withTimeInfo.getRhjjxtjxs()))).divide(withhours2, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
                 BigDecimal withSbklyzzl = (currSbklyl.subtract(withSbklyl)).divide(withSbklyl, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
@@ -853,13 +906,13 @@ public class EconomyPointHomePageService {
 
         if (null != currTimeInfo) {
 
-            int currhours = DateUtils.hoursDiff(new Date(),DateUtils.getStartOfDay(new Date()));
+            int currhours = DateUtils.hoursDiff(new Date(), DateUtils.getStartOfDay(new Date()));
             BigDecimal currhours2 = new BigDecimal(0.00).valueOf((int) currhours);
             BigDecimal currSbklyl = currhours2.subtract((currTimeInfo.getYhjgzxsmx().add(currTimeInfo.getYhjjxtjxs()))).divide(currhours2, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
             dto.setCurrSbklyl(currSbklyl);
             if (null != ringTimeInfo) {
 
-                int ringhours = DateUtils.hoursDiff(new Date(),DateUtils.getMonthFirstZero());
+                int ringhours = DateUtils.hoursDiff(new Date(), DateUtils.getMonthFirstZero());
                 BigDecimal ringhours2 = new BigDecimal(0.00).valueOf((int) ringhours);
                 BigDecimal ringSbklyl = ringhours2.subtract((ringTimeInfo.getYhjgzxsmx().add(ringTimeInfo.getYhjjxtjxs()))).divide(ringhours2, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
                 BigDecimal ringSbklyzzl = (currSbklyl.subtract(ringSbklyl)).divide(ringSbklyl, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
@@ -867,7 +920,7 @@ public class EconomyPointHomePageService {
             }
             if (null != withTimeInfo) {
 
-                int withhours = DateUtils.hoursDiff(new Date(),DateUtils.getYearFirstZero());
+                int withhours = DateUtils.hoursDiff(new Date(), DateUtils.getYearFirstZero());
                 BigDecimal withhours2 = new BigDecimal(0.00).valueOf((int) withhours);
                 BigDecimal withSbklyl = withhours2.subtract((withTimeInfo.getYhjgzxsmx().add(withTimeInfo.getYhjjxtjxs()))).divide(withhours2, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
                 BigDecimal withSbklyzzl = (currSbklyl.subtract(withSbklyl)).divide(withSbklyl, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
@@ -932,14 +985,14 @@ public class EconomyPointHomePageService {
 
         if (null != currTimeInfo) {
 
-            int currhours = DateUtils.hoursDiff(new Date(),DateUtils.getStartOfDay(new Date()));
+            int currhours = DateUtils.hoursDiff(new Date(), DateUtils.getStartOfDay(new Date()));
             BigDecimal currhours2 = new BigDecimal(0).valueOf((int) currhours);
             currhours2 = compare0(currhours2) ? currhours2 : new BigDecimal(1);
             BigDecimal currSbklyl = currhours2.subtract((currTimeInfo.getNhjgzxsmx().add(currTimeInfo.getNhjjxtjxs()))).divide(currhours2, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
             dto.setCurrSbklyl(currSbklyl);
             if (null != ringTimeInfo) {
 
-                int ringhours = DateUtils.hoursDiff(new Date(),DateUtils.getMonthFirstZero());
+                int ringhours = DateUtils.hoursDiff(new Date(), DateUtils.getMonthFirstZero());
                 BigDecimal ringhours2 = new BigDecimal(0).valueOf((int) ringhours);
                 ringhours2 = compare0(ringhours2) ? ringhours2 : new BigDecimal(1);
                 BigDecimal ringSbklyl = ringhours2.subtract((ringTimeInfo.getNhjgzxsmx().add(ringTimeInfo.getNhjjxtjxs()))).divide(ringhours2, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
@@ -948,7 +1001,7 @@ public class EconomyPointHomePageService {
             }
             if (null != withTimeInfo) {
 
-                int withhours = DateUtils.hoursDiff(new Date(),DateUtils.getYearFirstZero());
+                int withhours = DateUtils.hoursDiff(new Date(), DateUtils.getYearFirstZero());
                 BigDecimal withhours2 = new BigDecimal(0).valueOf((int) withhours);
                 withhours2 = compare0(withhours2) ? withhours2 : new BigDecimal(1);
                 BigDecimal withSbklyl = withhours2.subtract((withTimeInfo.getNhjgzxsmx().add(withTimeInfo.getNhjjxtjxs()))).divide(withhours2, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
@@ -960,25 +1013,23 @@ public class EconomyPointHomePageService {
     }
 
 
-    private BigDecimal compare100(BigDecimal a){
-        BigDecimal b = new BigDecimal (100);
-        if(b.compareTo(a) == -1){
-            a = new BigDecimal (100);;
+    private BigDecimal compare100(BigDecimal a) {
+        BigDecimal b = new BigDecimal(100);
+        if (b.compareTo(a) == -1) {
+            a = new BigDecimal(100);
+            ;
         }
         return a;
 
     }
 
-    private boolean compare0(BigDecimal a){
-        BigDecimal b = new BigDecimal (0.00);
-        if(b.compareTo(a.setScale(2,BigDecimal.ROUND_HALF_UP)) == 0){
-           return false;
+    private boolean compare0(BigDecimal a) {
+        BigDecimal b = new BigDecimal(0.00);
+        if (b.compareTo(a.setScale(2, BigDecimal.ROUND_HALF_UP)) == 0) {
+            return false;
         }
         return true;
-
     }
 
 
-
-
 }

+ 851 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/performacompare/EquipmentPerformaCompareService.java

@@ -0,0 +1,851 @@
+package com.gyee.runeconomy.service.performacompare;
+
+
+import com.gyee.common.util.ClassUtil;
+import com.gyee.common.vo.benchmark.DjhxdbInitVo;
+import com.gyee.common.vo.benchmark.DjhxdbtopVo;
+import com.gyee.common.vo.benchmark.FzyVo;
+import com.gyee.runeconomy.model.auto.ProEconWtAlysisDay;
+import com.gyee.runeconomy.model.auto.ProEconWtPowerCurveFitting;
+import com.gyee.runeconomy.model.auto.ProEconWtwindDayInfo;
+import com.gyee.runeconomy.service.auto.IProEconWtAlysisDayService;
+import com.gyee.runeconomy.service.auto.IProEconWtPowerCurveFittingService;
+import com.gyee.runeconomy.service.auto.IProEconWtwindDayInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Service
+public class EquipmentPerformaCompareService {
+
+
+    @Autowired
+    private IProEconWtAlysisDayService proEconWtAlysisDayService;
+
+    @Autowired
+    private IProEconWtwindDayInfoService proEconWtwindDayInfoService;
+
+    @Autowired
+    private IProEconWtPowerCurveFittingService proEconWtPowerCurveFittingService;
+
+    /**
+     * 单机横向对比列表
+     * @param type
+     * @param windturbineIds
+     * @param date
+     * @return
+     */
+    public List<Object> getEquipmentPerformaCompareList(String type, String windturbineIds, String date) {
+
+        List<Object> objects = new ArrayList<>();
+        List<ProEconWtAlysisDay>  list =  proEconWtAlysisDayService.getProEconWtAlysisDayList(windturbineIds,date);//风机性能分析数据
+        List<ProEconWtwindDayInfo> fzyList =  proEconWtwindDayInfoService.getProEconWtwindDayInfoList(windturbineIds,date);//风资源
+        List<DjhxdbtopVo> resultList = alysisConversionMethod(list,fzyList,type);//日月年指标转换记录
+        objects = convert(resultList);
+
+        return objects;
+    }
+
+
+    /***
+     * 获取实际拟合曲线
+     * @param windturbineIds
+     * @return
+     */
+    public Map<String, List<ProEconWtPowerCurveFitting>> getgroupProEconWtPowerCurveFittingList(String windturbineIds) {
+
+        Map<String, List<ProEconWtPowerCurveFitting>> map =  proEconWtPowerCurveFittingService.getgroupProEconWtPowerCurveFittingList(windturbineIds);
+
+        return map;
+    }
+
+
+
+
+
+
+
+    /**
+     * 单机横向对比列表行转列
+     * @param resultList
+     * @return
+     */
+    private List<Object> convert(List<DjhxdbtopVo> resultList) {
+        List<Object> rList = new ArrayList<>();
+        List<String> wtids = resultList.stream().map(i -> i.getWtid()).collect(Collectors.toList());
+        DjhxdbInitVo fdj = new DjhxdbInitVo();
+        fdj.setName("风电机");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.String"));
+                addValMap.put(String.valueOf(j+1), wtids.get(j));
+            }
+            Object blo = new ClassUtil().dynamicClass(fdj, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        DjhxdbInitVo fdl = new DjhxdbInitVo();
+        fdl.setName("发电量");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getFdl());
+            }
+            Object blo = new ClassUtil().dynamicClass(fdl, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo yfdl = new DjhxdbInitVo();
+        yfdl.setName("应发电量");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getYfdl());
+            }
+            Object blo = new ClassUtil().dynamicClass(yfdl, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo pjgl = new DjhxdbInitVo();
+        pjgl.setName("平均功率");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getPjgl());
+            }
+            Object blo = new ClassUtil().dynamicClass(pjgl, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo pjfs = new DjhxdbInitVo();
+        pjfs.setName("平均风速");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getPjfs());
+            }
+            Object blo = new ClassUtil().dynamicClass(pjfs, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo yxxs = new DjhxdbInitVo();
+        yxxs.setName("运行小时");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getYxxs());
+            }
+            Object blo = new ClassUtil().dynamicClass(yxxs, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo djxs = new DjhxdbInitVo();
+        djxs.setName("待机小时");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getDjxs());
+            }
+            Object blo = new ClassUtil().dynamicClass(djxs, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo gzxs = new DjhxdbInitVo();
+        gzxs.setName("故障小时");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getGzxs());
+            }
+            Object blo = new ClassUtil().dynamicClass(gzxs, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo whxs = new DjhxdbInitVo();
+        whxs.setName("维护小时");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getWhxs());
+            }
+            Object blo = new ClassUtil().dynamicClass(whxs, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo zdxs = new DjhxdbInitVo();
+        zdxs.setName("中断小时");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getZdxs());
+            }
+            Object blo = new ClassUtil().dynamicClass(zdxs, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo yxfs = new DjhxdbInitVo();
+        yxfs.setName("有效风时");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getYxfs());
+            }
+            Object blo = new ClassUtil().dynamicClass(yxfs, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo ssdl = new DjhxdbInitVo();
+        ssdl.setName("损失电量");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getSsdl());
+            }
+            Object blo = new ClassUtil().dynamicClass(ssdl, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+//
+//        DjhxdbInitVo bjcs = new DjhxdbInitVo();
+//        bjcs.setName("报警次数");
+//        try {
+//            LinkedHashMap addMap = new LinkedHashMap();
+//            LinkedHashMap addValMap = new LinkedHashMap();
+//
+//            for (int j=0;j<wtids.size();j++){
+//                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+//                int finalJ = j;
+//                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getBjcs());
+//            }
+//            Object blo = new ClassUtil().dynamicClass(bjcs, addMap, addValMap);
+//            rList.add(blo);
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+
+        DjhxdbInitVo tjcs = new DjhxdbInitVo();
+        tjcs.setName("停机次数");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getTjcs());
+            }
+            Object blo = new ClassUtil().dynamicClass(tjcs, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo bbhcs = new DjhxdbInitVo();
+        bbhcs.setName("不饱和次数");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getBbhcs());
+            }
+            Object blo = new ClassUtil().dynamicClass(bbhcs, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo sbklly = new DjhxdbInitVo();
+        sbklly.setName("设备可利用率");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getSbklly());
+            }
+            Object blo = new ClassUtil().dynamicClass(sbklly, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo pjwd = new DjhxdbInitVo();
+        pjwd.setName("平均温度");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getPjwd());
+            }
+            Object blo = new ClassUtil().dynamicClass(pjwd, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo pjsd = new DjhxdbInitVo();
+        pjsd.setName("平均湿度");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getPjsd());
+            }
+            Object blo = new ClassUtil().dynamicClass(pjsd, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo pjyq = new DjhxdbInitVo();
+        pjyq.setName("平均压强");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getPjyq());
+            }
+            Object blo = new ClassUtil().dynamicClass(pjyq, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo nhyd = new DjhxdbInitVo();
+        nhyd.setName("拟合优度");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getNhyd());
+            }
+            Object blo = new ClassUtil().dynamicClass(nhyd, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo sjbz = new DjhxdbInitVo();
+        sjbz.setName("实际/保证");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getSjbz());
+            }
+            Object blo = new ClassUtil().dynamicClass(sjbz, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo fzy = new DjhxdbInitVo();
+        fzy.setName("风资源");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.util.List"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getFzyList());
+            }
+            Object blo = new ClassUtil().dynamicClass(fzy, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        DjhxdbInitVo jfpl = new DjhxdbInitVo();
+        jfpl.setName("静风频率");
+        try {
+            LinkedHashMap addMap = new LinkedHashMap();
+            LinkedHashMap addValMap = new LinkedHashMap();
+
+            for (int j=0;j<wtids.size();j++){
+                addMap.put(String.valueOf(j+1), Class.forName("java.lang.Double"));
+                int finalJ = j;
+                addValMap.put(String.valueOf(j+1), resultList.stream().filter(i->i.getWtid().equals(wtids.get(finalJ))).findFirst().get().getJfpl());
+            }
+            Object blo = new ClassUtil().dynamicClass(jfpl, addMap, addValMap);
+            rList.add(blo);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        return rList;
+    }
+
+    //日月年指标转换方法
+    List<DjhxdbtopVo> alysisConversionMethod(List<ProEconWtAlysisDay>  list ,List<ProEconWtwindDayInfo>  fzyList ,String type ){
+        List<DjhxdbtopVo> resultList = new ArrayList<>();
+        list.stream().forEach(i->{
+            DjhxdbtopVo vo = new DjhxdbtopVo();
+            vo.setWtid(i.getWindturbineId());
+            Optional<ProEconWtwindDayInfo> first = fzyList.stream().filter(fzy -> fzy.getWindturbineId().equals(i.getWindturbineId())).findFirst();
+            List<FzyVo> vos = getFzyVos(first,type);
+            switch (type){
+                case "1" :
+                    vo.setFdl(i.getRfdl());
+                    vo.setYfdl(i.getRyfdl());
+                    vo.setPjgl(i.getRpjgl());
+                    vo.setPjfs(i.getRpjfs());
+                    vo.setYxxs(i.getRyxxs());
+                    vo.setDjxs(i.getRdjxs());
+                    vo.setGzxs(i.getRgzxs());
+                    vo.setWhxs(i.getRjxxs());
+                    vo.setZdxs(i.getRzdxs());
+                    vo.setYxfs(i.getRyxfs());
+                    vo.setSsdl(i.getRssdl());
+                    vo.setBjcs(i.getRbjcs());
+                    vo.setTjcs(i.getRtjcs());
+                    vo.setBbhcs(i.getRbbhcs());
+                    vo.setSbklly(i.getRsbklyl());
+                    vo.setPjwd(i.getRpjwd());
+                    vo.setPjsd(i.getRpjsd());
+                    vo.setPjyq(i.getRpjyq());
+                    vo.setNhyd(i.getRnhyd());
+                    vo.setSjbz(i.getRsjbz());
+                    break;
+                case "2":
+                    vo.setFdl(i.getYfdl());
+                    vo.setYfdl(i.getYyfdl());
+                    vo.setPjgl(i.getYpjgl());
+                    vo.setPjfs(i.getYpjfs());
+                    vo.setYxxs(i.getYyxxs());
+                    vo.setDjxs(i.getYdjxs());
+                    vo.setGzxs(i.getYgzxs());
+                    vo.setWhxs(i.getYjxxs());
+                    vo.setZdxs(i.getYzdxs());
+                    vo.setYxfs(i.getYyxfs());
+                    vo.setSsdl(i.getYssdl());
+                    vo.setBjcs(i.getYbjcs());
+                    vo.setTjcs(i.getYtjcs());
+                    vo.setBbhcs(i.getYbbhcs());
+                    vo.setSbklly(i.getYsbklyl());
+                    vo.setPjwd(i.getYpjwd());
+                    vo.setPjsd(i.getYpjsd());
+                    vo.setPjyq(i.getYpjyq());
+                    vo.setNhyd(i.getYnhyd());
+                    vo.setSjbz(i.getYsjbz());
+                    break;
+                case "3":
+                    vo.setFdl(i.getNfdl());
+                    vo.setYfdl(i.getNyfdl());
+                    vo.setPjgl(i.getNpjgl());
+                    vo.setPjfs(i.getNpjfs());
+                    vo.setYxxs(i.getNyxxs());
+                    vo.setDjxs(i.getNdjxs());
+                    vo.setGzxs(i.getNgzxs());
+                    vo.setWhxs(i.getNjxxs());
+                    vo.setZdxs(i.getNzdxs());
+                    vo.setYxfs(i.getNyxfs());
+                    vo.setSsdl(i.getNssdl());
+                    vo.setBjcs(i.getNbjcs());
+                    vo.setTjcs(i.getNtjcs());
+                    vo.setBbhcs(i.getNbbhcs());
+                    vo.setSbklly(i.getNsbklyl());
+                    vo.setPjwd(i.getNpjwd());
+                    vo.setPjsd(i.getNpjsd());
+                    vo.setPjyq(i.getNpjyq());
+                    vo.setNhyd(i.getNnhyd());
+                    vo.setSjbz(i.getNsjbz());
+                    break;
+
+            }
+            vo.setFzyList(vos);
+            vo.setJfpl(first.get().getCb());
+            resultList.add(vo);
+        });
+        return resultList;
+    }
+
+
+
+
+
+    List<FzyVo>  getFzyVos( Optional<ProEconWtwindDayInfo> first ,String type) {
+        List<FzyVo> vos = new ArrayList<>();
+        ProEconWtwindDayInfo winfo = first.get();
+
+        switch (type) {
+            case "1":
+                for (int j = 0; j < 16; j++) {
+                    FzyVo vo = new FzyVo();
+
+                    switch (j) {
+                        case 0:
+                            // vo.setName("N("+winfo.getN4()+"/"+winfo.getN()+")");
+                            vo.setName("N");
+                            vo.setValue(winfo.getN4());
+                            break;
+                        case 1:
+                            // vo.setName("NNE("+winfo.getNne4()+"/"+winfo.getNne()+")");
+                            vo.setName("NNE");
+                            vo.setValue(winfo.getNne4());
+                            break;
+                        case 2:
+                            // vo.setName("NE("+winfo.getNe4()+"/"+winfo.getNe()+")");
+                            vo.setName("NE");
+                            vo.setValue(winfo.getNe4());
+                            break;
+                        case 3:
+                            // vo.setName("ENE("+winfo.getEne4()+"/"+winfo.getEne()+")");
+                            vo.setName("ENE");
+                            vo.setValue(winfo.getEne4());
+
+                            break;
+                        case 4:
+                            // vo.setName("E("+winfo.getE4()+"/"+winfo.getE()+")");
+                            vo.setName("E");
+                            vo.setValue(winfo.getE4());
+                            break;
+                        case 5:
+                            // vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
+                            vo.setName("ESE");
+                            vo.setValue(winfo.getEse4());
+                            break;
+                        case 6:
+                            // vo.setName("SE("+winfo.getSe4()+"/"+winfo.getSe()+")");
+                            vo.setName("SE");
+                            vo.setValue(winfo.getSe4());
+                            break;
+                        case 7:
+                            // vo.setName("SSE("+winfo.getSse4()+"/"+winfo.getSse()+")");
+                            vo.setName("SSE");
+                            vo.setValue(winfo.getSse4());
+                            break;
+                        case 8:
+                            // vo.setName("S("+winfo.getS4()+"/"+winfo.getS()+")");
+                            vo.setName("S");
+                            vo.setValue(winfo.getS4());
+                            break;
+                        case 9:
+                            // vo.setName("SSW("+winfo.getSsw4()+"/"+winfo.getSsw()+")");
+                            vo.setName("SSW");
+                            vo.setValue(winfo.getSsw4());
+                            break;
+                        case 10:
+                            // vo.setName("SW("+winfo.getSw4()+"/"+winfo.getSw()+")");
+                            vo.setName("SW");
+                            vo.setValue(winfo.getSw4());
+                            break;
+                        case 11:
+                            // vo.setName("WSW("+winfo.getWsw4()+"/"+winfo.getWsw()+")");
+                            vo.setName("WSW");
+                            vo.setValue(winfo.getWsw4());
+
+                            break;
+                        case 12:
+                            // vo.setName("W("+winfo.getW4()+"/"+winfo.getW()+")");
+                            vo.setName("W");
+                            vo.setValue(winfo.getW4());
+                            break;
+                        case 13:
+                            // vo.setName("WNW("+winfo.getWnw4()+"/"+winfo.getWnw()+")");
+                            vo.setName("WNW");
+                            vo.setValue(winfo.getWnw4());
+                            break;
+                        case 14:
+                            // vo.setName("NW("+winfo.getNw4()+"/"+winfo.getNw()+")");
+                            vo.setName("NW");
+                            vo.setValue(winfo.getNw4());
+                            break;
+                        case 15:
+                            // vo.setName("NNW("+winfo.getNnw4()+"/"+winfo.getNnw()+")");
+                            vo.setName("NNW");
+                            vo.setValue(winfo.getNnw4());
+                            break;
+
+                        default:
+                            break;
+                    }
+                    vos.add(vo);
+                }
+                break;
+            case "2":
+                for (int j = 0; j < 16; j++) {
+                    FzyVo vo = new FzyVo();
+
+                    switch (j) {
+                        case 0:
+                            // vo.setName("N("+winfo.getN4()+"/"+winfo.getN()+")");
+                            vo.setName("N");
+                            vo.setValue(winfo.getN10());
+                            break;
+                        case 1:
+                            // vo.setName("NNE("+winfo.getNne4()+"/"+winfo.getNne()+")");
+                            vo.setName("NNE");
+                            vo.setValue(winfo.getNne10());
+                            break;
+                        case 2:
+                            // vo.setName("NE("+winfo.getNe4()+"/"+winfo.getNe()+")");
+                            vo.setName("NE");
+                            vo.setValue(winfo.getNe10());
+                            break;
+                        case 3:
+                            // vo.setName("ENE("+winfo.getEne4()+"/"+winfo.getEne()+")");
+                            vo.setName("ENE");
+                            vo.setValue(winfo.getEne10());
+
+                            break;
+                        case 4:
+                            // vo.setName("E("+winfo.getE4()+"/"+winfo.getE()+")");
+                            vo.setName("E");
+                            vo.setValue(winfo.getE10());
+                            break;
+                        case 5:
+                            // vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
+                            vo.setName("ESE");
+                            vo.setValue(winfo.getEse10());
+                            break;
+                        case 6:
+                            // vo.setName("SE("+winfo.getSe4()+"/"+winfo.getSe()+")");
+                            vo.setName("SE");
+                            vo.setValue(winfo.getSe10());
+                            break;
+                        case 7:
+                            // vo.setName("SSE("+winfo.getSse4()+"/"+winfo.getSse()+")");
+                            vo.setName("SSE");
+                            vo.setValue(winfo.getSse10());
+                            break;
+                        case 8:
+                            // vo.setName("S("+winfo.getS4()+"/"+winfo.getS()+")");
+                            vo.setName("S");
+                            vo.setValue(winfo.getS10());
+                            break;
+                        case 9:
+                            // vo.setName("SSW("+winfo.getSsw4()+"/"+winfo.getSsw()+")");
+                            vo.setName("SSW");
+                            vo.setValue(winfo.getSsw10());
+                            break;
+                        case 10:
+                            // vo.setName("SW("+winfo.getSw4()+"/"+winfo.getSw()+")");
+                            vo.setName("SW");
+                            vo.setValue(winfo.getSw10());
+                            break;
+                        case 11:
+                            // vo.setName("WSW("+winfo.getWsw4()+"/"+winfo.getWsw()+")");
+                            vo.setName("WSW");
+                            vo.setValue(winfo.getWsw10());
+
+                            break;
+                        case 12:
+                            // vo.setName("W("+winfo.getW4()+"/"+winfo.getW()+")");
+                            vo.setName("W");
+                            vo.setValue(winfo.getW10());
+                            break;
+                        case 13:
+                            // vo.setName("WNW("+winfo.getWnw4()+"/"+winfo.getWnw()+")");
+                            vo.setName("WNW");
+                            vo.setValue(winfo.getWnw10());
+                            break;
+                        case 14:
+                            // vo.setName("NW("+winfo.getNw4()+"/"+winfo.getNw()+")");
+                            vo.setName("NW");
+                            vo.setValue(winfo.getNw10());
+                            break;
+                        case 15:
+                            // vo.setName("NNW("+winfo.getNnw4()+"/"+winfo.getNnw()+")");
+                            vo.setName("NNW");
+                            vo.setValue(winfo.getNnw10());
+                            break;
+
+                        default:
+                            break;
+                    }
+                    vos.add(vo);
+                }
+                break;
+            case "3":
+                for (int j = 0; j < 16; j++) {
+                    FzyVo vo = new FzyVo();
+
+                    switch (j) {
+                        case 0:
+                            // vo.setName("N("+winfo.getN4()+"/"+winfo.getN()+")");
+                            vo.setName("N");
+                            vo.setValue(winfo.getN16());
+                            break;
+                        case 1:
+                            // vo.setName("NNE("+winfo.getNne4()+"/"+winfo.getNne()+")");
+                            vo.setName("NNE");
+                            vo.setValue(winfo.getNne16());
+                            break;
+                        case 2:
+                            // vo.setName("NE("+winfo.getNe4()+"/"+winfo.getNe()+")");
+                            vo.setName("NE");
+                            vo.setValue(winfo.getNe16());
+                            break;
+                        case 3:
+                            // vo.setName("ENE("+winfo.getEne4()+"/"+winfo.getEne()+")");
+                            vo.setName("ENE");
+                            vo.setValue(winfo.getEne16());
+
+                            break;
+                        case 4:
+                            // vo.setName("E("+winfo.getE4()+"/"+winfo.getE()+")");
+                            vo.setName("E");
+                            vo.setValue(winfo.getE16());
+                            break;
+                        case 5:
+                            // vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
+                            vo.setName("ESE");
+                            vo.setValue(winfo.getEse16());
+                            break;
+                        case 6:
+                            // vo.setName("SE("+winfo.getSe4()+"/"+winfo.getSe()+")");
+                            vo.setName("SE");
+                            vo.setValue(winfo.getSe16());
+                            break;
+                        case 7:
+                            // vo.setName("SSE("+winfo.getSse4()+"/"+winfo.getSse()+")");
+                            vo.setName("SSE");
+                            vo.setValue(winfo.getSse16());
+                            break;
+                        case 8:
+                            // vo.setName("S("+winfo.getS4()+"/"+winfo.getS()+")");
+                            vo.setName("S");
+                            vo.setValue(winfo.getS16());
+                            break;
+                        case 9:
+                            // vo.setName("SSW("+winfo.getSsw4()+"/"+winfo.getSsw()+")");
+                            vo.setName("SSW");
+                            vo.setValue(winfo.getSsw16());
+                            break;
+                        case 10:
+                            // vo.setName("SW("+winfo.getSw4()+"/"+winfo.getSw()+")");
+                            vo.setName("SW");
+                            vo.setValue(winfo.getSw16());
+                            break;
+                        case 11:
+                            // vo.setName("WSW("+winfo.getWsw4()+"/"+winfo.getWsw()+")");
+                            vo.setName("WSW");
+                            vo.setValue(winfo.getWsw16());
+
+                            break;
+                        case 12:
+                            // vo.setName("W("+winfo.getW4()+"/"+winfo.getW()+")");
+                            vo.setName("W");
+                            vo.setValue(winfo.getW16());
+                            break;
+                        case 13:
+                            // vo.setName("WNW("+winfo.getWnw4()+"/"+winfo.getWnw()+")");
+                            vo.setName("WNW");
+                            vo.setValue(winfo.getWnw16());
+                            break;
+                        case 14:
+                            // vo.setName("NW("+winfo.getNw4()+"/"+winfo.getNw()+")");
+                            vo.setName("NW");
+                            vo.setValue(winfo.getNw16());
+                            break;
+                        case 15:
+                            // vo.setName("NNW("+winfo.getNnw4()+"/"+winfo.getNnw()+")");
+                            vo.setName("NNW");
+                            vo.setValue(winfo.getNnw16());
+                            break;
+
+                        default:
+                            break;
+                    }
+                    vos.add(vo);
+                }
+                break;
+
+        }
+
+        return vos;
+    }
+
+
+}

+ 566 - 4
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/specific/SpecificService.java

@@ -4,22 +4,24 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.gyee.common.model.StringUtils;
 import com.gyee.common.util.DateUtils;
 import com.gyee.common.util.DoubleUtils;
+import com.gyee.common.vo.specific.SpecificCenterVo;
 import com.gyee.common.vo.specific.SpecificTargetVo;
+import com.gyee.common.vo.specific.SpecificTopVo;
 import com.gyee.runeconomy.init.CacheContext;
+import com.gyee.runeconomy.model.auto.ProBasicPowerstation;
 import com.gyee.runeconomy.model.auto.ProEconPowerstationInfoDay1;
 import com.gyee.runeconomy.model.auto.ProEconPowerstationInfoDay4;
 import com.gyee.runeconomy.model.auto.ProEconPowerstationInfoDay5;
 import com.gyee.runeconomy.service.auto.IProEconPowerstationInfoDay1Service;
 import com.gyee.runeconomy.service.auto.IProEconPowerstationInfoDay4Service;
 import com.gyee.runeconomy.service.auto.IProEconPowerstationInfoDay5Service;
+import com.gyee.runeconomy.service.bmk.BenchmarkingService;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Optional;
+import java.util.*;
+import java.util.stream.Collectors;
 
 /*
 @author   谢生杰
@@ -35,6 +37,566 @@ public class SpecificService {
     private IProEconPowerstationInfoDay4Service proEconPowerstationInfoDay4Service;
     @Resource
     private IProEconPowerstationInfoDay5Service proEconPowerstationInfoDay5Service;
+    @Resource
+    private BenchmarkingService benchmarkingService;
+
+
+    /**
+     * 获取专题分析上面部分
+     * @param yearmonth
+     * @return
+     * @throws ParseException
+     */
+    public List<SpecificTopVo> maintoplist(String companys,String type,String yearmonth) throws ParseException {
+        List<SpecificTopVo> resultList = new ArrayList<>();
+        Date date = DateUtils.parseDate(yearmonth+"-01");
+        Calendar c = Calendar.getInstance();
+        c.setTime(date);
+        Integer year = c.get(Calendar.YEAR);
+        Integer month = c.get(Calendar.MONTH)+1;
+        SpecificTopVo dqvo = new SpecificTopVo();
+        dqvo.setType("本期");
+        setDySpecificinfodays(companys,type,yearmonth,dqvo);
+        setDnSpecificinfodays(companys,type,yearmonth,dqvo);
+        resultList.add(dqvo);
+        SpecificTopVo tqvo = new SpecificTopVo();
+        tqvo.setType("同期");
+        setTySpecificinfodays(companys,type,yearmonth,tqvo);
+        setTnSpecificinfodays(companys,type,yearmonth,tqvo);
+        resultList.add(tqvo);
+        SpecificTopVo bjvo = new SpecificTopVo();
+        bjvo.setType("比较");
+        setBjVo(dqvo,tqvo,bjvo);
+        resultList.add(bjvo);
+        return resultList;
+    }
+
+    /**
+     * 比较当前,同期值,给比较值赋值
+     * @param dqvo
+     * @param tqvo
+     * @param bjvo
+     */
+    private void setBjVo(SpecificTopVo dqvo, SpecificTopVo tqvo, SpecificTopVo bjvo) {
+        bjvo.setYfnlyl(dqvo.getYfnlyl()>=tqvo.getYfnlyl() ? 1.0 : 2.0);
+        bjvo.setYwhssl(dqvo.getYwhssl()>=tqvo.getYwhssl()?1.0:2.0);
+        bjvo.setYgzssl(dqvo.getYgzssl()>=tqvo.getYgzssl()?1.0:2.0);
+        bjvo.setYxdssl(dqvo.getYxdssl()>=tqvo.getYxdssl()?1.0:2.0);
+        bjvo.setYxnssl(dqvo.getYxnssl()>=tqvo.getYxnssl()?1.0:2.0);
+        bjvo.setYslssl(dqvo.getYslssl()>=tqvo.getYslssl()?1.0:2.0);
+        bjvo.setNfnlyl(dqvo.getNfnlyl()>=tqvo.getNfnlyl() ? 1.0 : 2.0);
+        bjvo.setNwhssl(dqvo.getNwhssl()>=tqvo.getNwhssl()?1.0:2.0);
+        bjvo.setNgzssl(dqvo.getNgzssl()>=tqvo.getNgzssl()?1.0:2.0);
+        bjvo.setNxdssl(dqvo.getNxdssl()>=tqvo.getNxdssl()?1.0:2.0);
+        bjvo.setNxnssl(dqvo.getNxnssl()>=tqvo.getNxnssl()?1.0:2.0);
+        bjvo.setNslssl(dqvo.getNslssl()>=tqvo.getNslssl()?1.0:2.0);
+    }
+
+    /**
+     * 获取当月专题分析上面数据
+     * @param companys
+     * @param type
+     * @param yearmonth
+     * @return
+     */
+    private void setDySpecificinfodays(String companys,String type,String yearmonth,SpecificTopVo dqvo) {
+        QueryWrapper<ProEconPowerstationInfoDay1> qw = new QueryWrapper<>();
+        qw.select("max(yllfdl) as yllfdl,max(yfdl) as yfdl,max(ygzssdl) as ygzssdl,max(ycnslgzssdl) as ycnslgzssdl,max(yjxssdl) as yjxssdl,max(ycnsljxssdl) ycnsljxssdl,max(ydjssdl) ydjssdl,max(yqxjclssdl) as yqxjclssdl,max(ysdtjssdl) as ysdtjssdl,max(yxnssdl) as yxnssdl,max(yxdtjssdl) as yxdtjssdl,max(yxdjclssdl) as yxdjclssdl,max(ycwsldwssdl) ycwsldwssdl,max(ycwsltqssdl) ycwsltqssdl");
+        qw.eq("foreign_key_id",companys+type);
+        qw.eq("to_char(record_date,'yyyy-MM')",yearmonth);
+        qw.groupBy("to_char(record_date,'yyyy-MM')");
+        List<ProEconPowerstationInfoDay1> monthList = proEconPowerstationInfoDay1Service.list(qw);
+        if (StringUtils.isNotEmpty(monthList)){
+            Optional<ProEconPowerstationInfoDay1> monthFirst = monthList.stream().findFirst();
+            if (monthFirst.isPresent()){
+                ProEconPowerstationInfoDay1 monthSpecific = monthFirst.get();
+                dqvo.setYllfdl(DoubleUtils.getRoundingNum(monthSpecific.getYllfdl().doubleValue()/10000,2));
+                dqvo.setYsjfdl(DoubleUtils.getRoundingNum(monthSpecific.getYfdl().doubleValue()/10000,2));
+                dqvo.setYwhssdl(DoubleUtils.getRoundingNum(monthSpecific.getYjxssdl().doubleValue()/10000+monthSpecific.getYcnsljxssdl().doubleValue()/10000,2));
+                dqvo.setYgzssdl(DoubleUtils.getRoundingNum(monthSpecific.getYgzssdl().doubleValue()/10000+monthSpecific.getYcnslgzssdl().doubleValue()/10000,2));
+                dqvo.setYxdssdl(DoubleUtils.getRoundingNum(monthSpecific.getYxnssdl().doubleValue()/10000+monthSpecific.getYxdjclssdl().doubleValue()/10000,2));
+                dqvo.setYxnssdl(DoubleUtils.getRoundingNum(monthSpecific.getYdjssdl().doubleValue()/10000+monthSpecific.getYqxjclssdl().doubleValue()/10000+monthSpecific.getYxnssdl().doubleValue()/10000+monthSpecific.getYsdtjssdl().doubleValue()/10000,2));
+                dqvo.setYslssdl(DoubleUtils.getRoundingNum(monthSpecific.getYcwsldwssdl().doubleValue()/10000+monthSpecific.getYcwsltqssdl().doubleValue()/10000,2));
+                if (dqvo.getYllfdl()!=0){
+                    dqvo.setYfnlyl(DoubleUtils.getRoundingNum(dqvo.getYsjfdl()/dqvo.getYllfdl()*100,2));
+                    dqvo.setYwhssl(DoubleUtils.getRoundingNum(dqvo.getYwhssdl()/dqvo.getYllfdl()*100,2));
+                    dqvo.setYgzssl(DoubleUtils.getRoundingNum(dqvo.getYgzssdl()/dqvo.getYllfdl()*100,2));
+                    dqvo.setYxdssl(DoubleUtils.getRoundingNum(dqvo.getYxdssdl()/dqvo.getYllfdl()*100,2));
+                    dqvo.setYxnssl(DoubleUtils.getRoundingNum(dqvo.getYxnssdl()/dqvo.getYllfdl()*100,2));
+                    dqvo.setYslssl(DoubleUtils.getRoundingNum(dqvo.getYslssdl()/dqvo.getYllfdl()*100,2));
+                }else{
+                    dqvo.setYfnlyl(0.0);
+                    dqvo.setYwhssl(0.0);
+                    dqvo.setYgzssl(0.0);
+                    dqvo.setYxdssl(0.0);
+                    dqvo.setYxnssl(0.0);
+                    dqvo.setYslssl(0.0);
+                }
+            }
+        }
+        else {
+            dqvo.setYllfdl(0.0);
+            dqvo.setYsjfdl(0.0);
+            dqvo.setYwhssdl(0.0);
+            dqvo.setYgzssdl(0.0);
+            dqvo.setYxdssdl(0.0);
+            dqvo.setYxnssdl(0.0);
+            dqvo.setYslssdl(0.0);
+            dqvo.setYfnlyl(0.0);
+            dqvo.setYwhssl(0.0);
+            dqvo.setYgzssl(0.0);
+            dqvo.setYxdssl(0.0);
+            dqvo.setYxnssl(0.0);
+            dqvo.setYslssl(0.0);
+        }
+
+    }
+    /**
+     * 获取月同期专题分析上面数据
+     * @param companys
+     * @param type
+     * @return
+     */
+    private void setTySpecificinfodays(String companys,String type,String yearmonth,SpecificTopVo dqvo) {
+        String yearString = yearmonth.split("-")[0];
+        String year = String.valueOf(Integer.parseInt(yearString) - 1);
+        String yearMonth = year+"-"+yearmonth.split("-")[1];
+        QueryWrapper<ProEconPowerstationInfoDay1> qw = new QueryWrapper<>();
+        qw.select("max(yllfdl) as yllfdl,max(yfdl) as yfdl,max(ygzssdl) as ygzssdl,max(ycnslgzssdl) as ycnslgzssdl,max(yjxssdl) as yjxssdl,max(ycnsljxssdl) ycnsljxssdl,max(ydjssdl) ydjssdl,max(yqxjclssdl) as yqxjclssdl,max(ysdtjssdl) as ysdtjssdl,max(yxnssdl) as yxnssdl,max(yxdtjssdl) as yxdtjssdl,max(yxdjclssdl) as yxdjclssdl,max(ycwsldwssdl) ycwsldwssdl,max(ycwsltqssdl) ycwsltqssdl");
+        qw.eq("foreign_key_id",companys+type);
+        qw.eq("to_char(record_date,'yyyy-MM')",yearMonth);
+        qw.groupBy("to_char(record_date,'yyyy-MM')");
+        List<ProEconPowerstationInfoDay1> monthList = proEconPowerstationInfoDay1Service.list(qw);
+        Optional<ProEconPowerstationInfoDay1> monthFirst = monthList.stream().findFirst();
+        if (monthFirst.isPresent()){
+            ProEconPowerstationInfoDay1 monthSpecific = monthFirst.get();
+            dqvo.setYllfdl(DoubleUtils.getRoundingNum(monthSpecific.getYllfdl().doubleValue()/10000,2));
+            dqvo.setYsjfdl(DoubleUtils.getRoundingNum(monthSpecific.getYfdl().doubleValue()/10000,2));
+            dqvo.setYwhssdl(DoubleUtils.getRoundingNum(monthSpecific.getYjxssdl().doubleValue()/10000+monthSpecific.getYcnsljxssdl().doubleValue()/10000,2));
+            dqvo.setYgzssdl(DoubleUtils.getRoundingNum(monthSpecific.getYgzssdl().doubleValue()/10000+monthSpecific.getYcnslgzssdl().doubleValue()/10000,2));
+            dqvo.setYxdssdl(DoubleUtils.getRoundingNum(monthSpecific.getYxnssdl().doubleValue()/10000+monthSpecific.getYxdjclssdl().doubleValue()/10000,2));
+            dqvo.setYxnssdl(DoubleUtils.getRoundingNum(monthSpecific.getYdjssdl().doubleValue()/10000+monthSpecific.getYqxjclssdl().doubleValue()/10000+monthSpecific.getYxnssdl().doubleValue()/10000+monthSpecific.getYsdtjssdl().doubleValue()/10000,2));
+            dqvo.setYslssdl(DoubleUtils.getRoundingNum(monthSpecific.getYcwsldwssdl().doubleValue()/10000+monthSpecific.getYcwsltqssdl().doubleValue()/10000,2));
+            if (dqvo.getYllfdl()!=0){
+                dqvo.setYfnlyl(DoubleUtils.getRoundingNum(dqvo.getYsjfdl()/dqvo.getYllfdl()*100,2));
+                dqvo.setYwhssl(DoubleUtils.getRoundingNum(dqvo.getYwhssdl()/dqvo.getYllfdl()*100,2));
+                dqvo.setYgzssl(DoubleUtils.getRoundingNum(dqvo.getYgzssdl()/dqvo.getYllfdl()*100,2));
+                dqvo.setYxdssl(DoubleUtils.getRoundingNum(dqvo.getYxdssdl()/dqvo.getYllfdl()*100,2));
+                dqvo.setYxnssl(DoubleUtils.getRoundingNum(dqvo.getYxnssdl()/dqvo.getYllfdl()*100,2));
+                dqvo.setYslssl(DoubleUtils.getRoundingNum(dqvo.getYslssdl()/dqvo.getYllfdl()*100,2));
+            }else {
+                dqvo.setYfnlyl(0.0);
+                dqvo.setYwhssl(0.0);
+                dqvo.setYgzssl(0.0);
+                dqvo.setYxdssl(0.0);
+                dqvo.setYxnssl(0.0);
+                dqvo.setYslssl(0.0);
+            }
+        }else{
+            dqvo.setYllfdl(0.0);
+            dqvo.setYsjfdl(0.0);
+            dqvo.setYwhssdl(0.0);
+            dqvo.setYgzssdl(0.0);
+            dqvo.setYxdssdl(0.0);
+            dqvo.setYxnssdl(0.0);
+            dqvo.setYslssdl(0.0);
+            dqvo.setYfnlyl(0.0);
+            dqvo.setYwhssl(0.0);
+            dqvo.setYgzssl(0.0);
+            dqvo.setYxdssl(0.0);
+            dqvo.setYxnssl(0.0);
+            dqvo.setYslssl(0.0);
+        }
+    }
+
+    /**
+     * 获取当年专题分析上面数据
+     * @param companys
+     * @param type
+     * @param yearmonth
+     * @param dqvo
+     */
+    private void setDnSpecificinfodays(String companys,String type,String yearmonth,SpecificTopVo dqvo) {
+        QueryWrapper<ProEconPowerstationInfoDay1> qw = new QueryWrapper<>();
+        qw.select("max(nllfdl) as nllfdl,max(nfdl) as nfdl,max(ngzssdl) as ngzssdl,max(ncnslgzssdl) as ncnslgzssdl,max(njxssdl) as njxssdl,max(ncnsljxssdl) ncnsljxssdl,max(ndjssdl) ndjssdl,max(nqxjclssdl) as nqxjclssdl,max(nsdtjssdl) as nsdtjssdl,max(nxnssdl) as nxnssdl,max(nxdtjssdl) as nxdtjssdl,max(nxdjclssdl) as nxdjclssdl,max(ncwsldwssdl) ncwsldwssdl,max(ncwsltqssdl) ncwsltqssdl");
+        qw.eq("foreign_key_id",companys+type);
+        qw.eq("to_char(record_date,'yyyy')",yearmonth.split("-")[0]);
+        qw.groupBy("to_char(record_date,'yyyy')");
+        List<ProEconPowerstationInfoDay1> yearList = proEconPowerstationInfoDay1Service.list(qw);
+        if (StringUtils.isNotEmpty(yearList)){
+            Optional<ProEconPowerstationInfoDay1> yearFirsts = yearList.stream().findFirst();
+            if (yearFirsts.isPresent()){
+                ProEconPowerstationInfoDay1 yearSpecific = yearFirsts.get();
+                dqvo.setNllfdl(DoubleUtils.getRoundingNum(yearSpecific.getNllfdl().doubleValue()/10000,2));
+                dqvo.setNsjfdl(DoubleUtils.getRoundingNum(yearSpecific.getNfdl().doubleValue()/10000,2));
+                dqvo.setNwhssdl(DoubleUtils.getRoundingNum(yearSpecific.getNjxssdl().doubleValue()/10000+yearSpecific.getNcnsljxssdl().doubleValue()/10000,2));
+                dqvo.setNgzssdl(DoubleUtils.getRoundingNum(yearSpecific.getNgzssdl().doubleValue()/10000+yearSpecific.getNcnslgzssdl().doubleValue()/10000,2));
+                dqvo.setNxdssdl(DoubleUtils.getRoundingNum(yearSpecific.getNxnssdl().doubleValue()/10000+yearSpecific.getNxdjclssdl().doubleValue()/10000,2));
+                dqvo.setNxnssdl(DoubleUtils.getRoundingNum(yearSpecific.getNdjssdl().doubleValue()/10000+yearSpecific.getNqxjclssdl().doubleValue()/10000+yearSpecific.getNxnssdl().doubleValue()/10000+yearSpecific.getNsdtjssdl().doubleValue()/10000,2));
+                dqvo.setNslssdl(DoubleUtils.getRoundingNum(yearSpecific.getNcwsldwssdl().doubleValue()/10000+yearSpecific.getNcwsltqssdl().doubleValue()/10000,2));
+                if (dqvo.getYllfdl()!=0){
+                    dqvo.setNfnlyl(DoubleUtils.getRoundingNum(dqvo.getNsjfdl()/dqvo.getNllfdl()*100,2));
+                    dqvo.setNwhssl(DoubleUtils.getRoundingNum(dqvo.getNwhssdl()/dqvo.getNllfdl()*100,2));
+                    dqvo.setNgzssl(DoubleUtils.getRoundingNum(dqvo.getNgzssdl()/dqvo.getNllfdl()*100,2));
+                    dqvo.setNxdssl(DoubleUtils.getRoundingNum(dqvo.getNxdssdl()/dqvo.getNllfdl()*100,2));
+                    dqvo.setNxnssl(DoubleUtils.getRoundingNum(dqvo.getNxnssdl()/dqvo.getNllfdl()*100,2));
+                    dqvo.setNslssl(DoubleUtils.getRoundingNum(dqvo.getNslssdl()/dqvo.getNllfdl()*100,2));
+                }else {
+                    dqvo.setNfnlyl(0.0);
+                    dqvo.setNwhssl(0.0);
+                    dqvo.setNgzssl(0.0);
+                    dqvo.setNxdssl(0.0);
+                    dqvo.setNxnssl(0.0);
+                    dqvo.setNslssl(0.0);
+                }
+            }
+        } else {
+            dqvo.setNllfdl(0.0);
+            dqvo.setNsjfdl(0.0);
+            dqvo.setNwhssdl(0.0);
+            dqvo.setNgzssdl(0.0);
+            dqvo.setNxdssdl(0.0);
+            dqvo.setNxnssdl(0.0);
+            dqvo.setNslssdl(0.0);
+            dqvo.setNfnlyl(0.0);
+            dqvo.setNwhssl(0.0);
+            dqvo.setNgzssl(0.0);
+            dqvo.setNxdssl(0.0);
+            dqvo.setNxnssl(0.0);
+            dqvo.setNslssl(0.0);
+        }
+
+    }
+
+    /**
+     * 获取年同期专题分析上面数据
+     * @param companys
+     * @param dqvo
+     */
+    private void setTnSpecificinfodays(String companys,String type,String yearmonth,SpecificTopVo dqvo) throws ParseException {
+        String yearString = yearmonth.split("-")[0];
+        String year = String.valueOf(Integer.parseInt(yearString) - 1);
+        QueryWrapper<ProEconPowerstationInfoDay1> qw = new QueryWrapper<>();
+        qw.select("max(nllfdl) as nllfdl,max(nfdl) as nfdl,max(ngzssdl) as ngzssdl,max(ncnslgzssdl) as ncnslgzssdl,max(njxssdl) as njxssdl,max(ncnsljxssdl) ncnsljxssdl,max(ndjssdl) ndjssdl,max(nqxjclssdl) as nqxjclssdl,max(nsdtjssdl) as nsdtjssdl,max(nxnssdl) as nxnssdl,max(nxdtjssdl) as nxdtjssdl,max(nxdjclssdl) as nxdjclssdl,max(ncwsldwssdl) ncwsldwssdl,max(ncwsltqssdl) ncwsltqssdl");
+        qw.eq("foreign_key_id",companys+type);
+        qw.eq("to_char(record_date,'yyyy')",year);
+        qw.groupBy("to_char(record_date,'yyyy')");
+        List<ProEconPowerstationInfoDay1> yearList = proEconPowerstationInfoDay1Service.list(qw);
+
+        Optional<ProEconPowerstationInfoDay1> yearFirsts = yearList.stream().findFirst();
+        if (yearFirsts.isPresent()){
+            ProEconPowerstationInfoDay1 yearSpecific = yearFirsts.get();
+            dqvo.setNllfdl(DoubleUtils.getRoundingNum(yearSpecific.getNllfdl().doubleValue()/10000,2));
+            dqvo.setNsjfdl(DoubleUtils.getRoundingNum(yearSpecific.getNfdl().doubleValue()/10000,2));
+            dqvo.setNwhssdl(DoubleUtils.getRoundingNum(yearSpecific.getNjxssdl().doubleValue()/10000+yearSpecific.getNcnsljxssdl().doubleValue()/10000,2));
+            dqvo.setNgzssdl(DoubleUtils.getRoundingNum(yearSpecific.getNgzssdl().doubleValue()/10000+yearSpecific.getNcnslgzssdl().doubleValue()/10000,2));
+            dqvo.setNxdssdl(DoubleUtils.getRoundingNum(yearSpecific.getNxnssdl().doubleValue()/10000+yearSpecific.getNxdjclssdl().doubleValue()/10000,2));
+            dqvo.setNxnssdl(DoubleUtils.getRoundingNum(yearSpecific.getNdjssdl().doubleValue()/10000+yearSpecific.getNqxjclssdl().doubleValue()/10000+yearSpecific.getNxnssdl().doubleValue()/10000+yearSpecific.getNsdtjssdl().doubleValue()/10000,2));
+            dqvo.setNslssdl(DoubleUtils.getRoundingNum(yearSpecific.getNcwsldwssdl().doubleValue()/10000+yearSpecific.getNcwsltqssdl().doubleValue()/10000,2));
+            if (dqvo.getYllfdl()!=0){
+                dqvo.setNfnlyl(DoubleUtils.getRoundingNum(dqvo.getNsjfdl()/dqvo.getNllfdl()*100,2));
+                dqvo.setNwhssl(DoubleUtils.getRoundingNum(dqvo.getNwhssdl()/dqvo.getNllfdl()*100,2));
+                dqvo.setNgzssl(DoubleUtils.getRoundingNum(dqvo.getNgzssdl()/dqvo.getNllfdl()*100,2));
+                dqvo.setNxdssl(DoubleUtils.getRoundingNum(dqvo.getNxdssdl()/dqvo.getNllfdl()*100,2));
+                dqvo.setNxnssl(DoubleUtils.getRoundingNum(dqvo.getNxnssdl()/dqvo.getNllfdl()*100,2));
+                dqvo.setNslssl(DoubleUtils.getRoundingNum(dqvo.getNslssdl()/dqvo.getNllfdl()*100,2));
+            }else {
+                dqvo.setNfnlyl(0.0);
+                dqvo.setNwhssl(0.0);
+                dqvo.setNgzssl(0.0);
+                dqvo.setNxdssl(0.0);
+                dqvo.setNxnssl(0.0);
+                dqvo.setNslssl(0.0);
+            }
+        }else{
+            dqvo.setNllfdl(0.0);
+            dqvo.setNsjfdl(0.0);
+            dqvo.setNwhssdl(0.0);
+            dqvo.setNgzssdl(0.0);
+            dqvo.setNxdssdl(0.0);
+            dqvo.setNxnssdl(0.0);
+            dqvo.setNslssdl(0.0);
+            dqvo.setNfnlyl(0.0);
+            dqvo.setNwhssl(0.0);
+            dqvo.setNgzssl(0.0);
+            dqvo.setNxdssl(0.0);
+            dqvo.setNxnssl(0.0);
+            dqvo.setNslssl(0.0);
+        }
+    }
+
+
+    /**
+     * 获取专题分析中间部分
+     * @param yearmonth
+     * @return
+     */
+    public Map<String,List<SpecificCenterVo>> maincenterlist(String companys,String type,String yearmonth) throws ParseException {
+        Map<String, ProBasicPowerstation> wpmap = CacheContext.wpmap;
+        Date date = DateUtils.parseDate(yearmonth+"-01");
+        Calendar  c= Calendar.getInstance();
+        c.setTime(date);
+        int year = c.get(Calendar.YEAR);
+        int month = c.get(Calendar.MONTH)+1;
+        //定义左边部分的结果list
+        List<SpecificCenterVo> monthresultList = new ArrayList<>();
+        //设置当月数据
+        setCenterDyInfo(companys,type,yearmonth,monthresultList);
+        //设置同期数据
+        setCenterYtqInfo(companys,type,yearmonth,monthresultList);
+        //设置比较数据
+        monthresultList.stream().forEach(i->{
+            i.setMtbfCompare(i.getMtbf()>i.getTqmtbf()?1:2);
+            i.setMttrCompare(i.getMttr()>i.getTqmttr()?1:2);
+            i.setFwjslCompare(i.getFwjsl()>i.getTqfwjsl()?1:2);
+            i.setZtzhlCompare(i.getZtzhl()>i.getTqztzhl()?1:2);
+            i.setXqjslCompare(i.getXqjsl()>i.getTqxqjsl()?1:2);
+        });
+
+        //定义右边部分的结果list
+        List<SpecificCenterVo> yearresultList = new ArrayList<>();
+        //设置当年数据
+        setCenterDnInfo(companys,type,yearmonth, yearresultList);
+        //设置同期数据
+        setCenterNtqInfo(companys,type,yearmonth,yearresultList);
+        //设置比较数据
+        yearresultList.stream().forEach(i->{
+            i.setMtbfCompare(i.getMtbf()>i.getTqmtbf()?1:2);
+            i.setMttrCompare(i.getMttr()>i.getTqmttr()?1:2);
+            i.setFwjslCompare(i.getFwjsl()>i.getTqfwjsl()?1:2);
+            i.setZtzhlCompare(i.getZtzhl()>i.getTqztzhl()?1:2);
+            i.setXqjslCompare(i.getXqjsl()>i.getTqxqjsl()?1:2);
+        });
+
+        //封装最终返回结果
+        monthresultList.stream().forEach(i->{
+            i.setWpid(wpmap.get(i.getWpid()).getAname());
+        });
+        yearresultList.stream().forEach(i->{
+            i.setWpid(wpmap.get(i.getWpid()).getAname());
+        });
+        Map<String,List<SpecificCenterVo>> resultMap = new HashMap<>();
+        resultMap.put("当月",monthresultList);
+        resultMap.put("当年",yearresultList);
+        return resultMap;
+
+    }
+
+    /**
+     * 设置月同期mtbf,mttr,复位及时率,状态转换率,消缺及时率
+     * @param companys
+     * @param type
+     * @param yearmonth
+     * @param monthresultList
+     */
+    private void setCenterYtqInfo(String companys,String type,String yearmonth, List<SpecificCenterVo> monthresultList) {
+        String yearString = yearmonth.split("-")[0];
+        String year = String.valueOf(Integer.parseInt(yearString) - 1);
+        String yearMonth = year+"-"+yearmonth.split("-")[1];
+        QueryWrapper<ProEconPowerstationInfoDay4> qw = new QueryWrapper<>();
+
+        qw.select("foreign_key_id,max(ymtbf) ymtbf,max(ymttr) ymttr,max(yfwjsl) yfwjsl,max(yztzhjsl) yztzhjsl,max(ygzxqjsl) ygzxqjsl");
+        qw.eq("location","wp");
+        if (type.endsWith("-1")){
+            qw.like("foreign_key_id","_FDC_");
+        }else if (type.endsWith("-2")){
+            qw.like("foreign_key_id","_GDC_");
+        }
+        if (companys.endsWith("ZGS")){
+            qw.in("foreign_key_id",CacheContext.wpls.stream().filter(wp->wp.getCompanyId().equals(companys)).map(wp->wp.getId()).collect(Collectors.toList()));
+        }
+        qw.eq("to_char(record_date,'yyyy-MM')",yearMonth);
+        qw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
+        List<ProEconPowerstationInfoDay4> tqList = proEconPowerstationInfoDay4Service.list(qw);
+        if (StringUtils.isNotEmpty(tqList)){
+            tqList.stream().forEach(i->{
+                Optional<SpecificCenterVo> optionMonth = monthresultList.stream().filter(j -> j.getWpid().equals(i.getWindpowerstationId())).findFirst();
+                SpecificCenterVo leftVo = optionMonth.get();
+                if (optionMonth.isPresent()){
+                    leftVo.setTqmtbf(DoubleUtils.keepPrecision(i.getYmtbf().doubleValue(),2));
+                    leftVo.setTqmttr(DoubleUtils.keepPrecision(i.getYmttr().doubleValue(),2));
+                    leftVo.setTqfwjsl(DoubleUtils.keepPrecision(i.getYfwjsl().doubleValue(),2));
+                    leftVo.setTqztzhl(DoubleUtils.keepPrecision(i.getYztzhjsl().doubleValue(),2));
+                    leftVo.setTqxqjsl(DoubleUtils.keepPrecision(i.getYgzxqjsl().doubleValue(),2));
+                }else{
+                    leftVo.setTqmtbf(0.0);
+                    leftVo.setTqmttr(0.0);
+                    leftVo.setTqfwjsl(0.0);
+                    leftVo.setTqztzhl(0.0);
+                    leftVo.setTqxqjsl(0.0);
+                }
+            });
+        }else {
+            List<ProBasicPowerstation> wpls = benchmarkingService.wpByCplist(companys, type);
+            wpls.stream().forEach(wp->{
+                Optional<SpecificCenterVo> optionMonth = monthresultList.stream().filter(j -> j.getWpid().equals(wp.getId())).findFirst();
+                if (optionMonth.isPresent()){
+                    SpecificCenterVo leftVo = optionMonth.get();
+                    leftVo.setTqmtbf(0.0);
+                    leftVo.setTqmttr(0.0);
+                    leftVo.setTqfwjsl(0.0);
+                    leftVo.setTqztzhl(0.0);
+                    leftVo.setTqxqjsl(0.0);
+                }
+
+            });
+
+        }
+
+    }
+
+    /**
+     * 设置年同期mtbf,mttr,复位及时率,状态转换率,消缺及时率
+     * @param companys
+     * @param yearresultList
+     */
+    private void setCenterNtqInfo(String companys,String type,String yearmonth, List<SpecificCenterVo> yearresultList) throws ParseException {
+        String yearString = yearmonth.split("-")[0];
+        String year = String.valueOf(Integer.parseInt(yearString) - 1);
+        QueryWrapper<ProEconPowerstationInfoDay4> qw = new QueryWrapper<>();
+        qw.select("foreign_key_id,max(nmtbf) nmtbf,max(nmttr) nmttr,max(nfwjsl) nfwjsl,max(nztzhjsl) nztzhjsl,max(ngzxqjsl) ngzxqjsl");
+        qw.eq("location","wp");
+        if (type.endsWith("-1")){
+            qw.like("foreign_key_id","_FDC_");
+        }else if (type.endsWith("-2")){
+            qw.like("foreign_key_id","_GDC_");
+        }
+        if (companys.endsWith("ZGS")){
+            qw.in("foreign_key_id",CacheContext.wpls.stream().filter(wp->wp.getCompanyId().equals(companys)).map(wp->wp.getId()).collect(Collectors.toList()));
+        }
+        qw.eq("to_char(record_date,'yyyy')",year);
+        qw.groupBy("to_char(record_date,'yyyy'),foreign_key_id");
+        List<ProEconPowerstationInfoDay4> tqList = proEconPowerstationInfoDay4Service.list(qw);
+        if (StringUtils.isNotEmpty(tqList)){
+            tqList.stream().forEach(i->{
+                Optional<SpecificCenterVo> optionYear = yearresultList.stream().filter(j -> j.getWpid().equals(i.getWindpowerstationId())).findFirst();
+                if (optionYear.isPresent()){
+                    SpecificCenterVo rightVo = optionYear.get();
+                    rightVo.setTqmtbf(DoubleUtils.keepPrecision(i.getNmtbf().doubleValue(),2));
+                    rightVo.setTqmttr(DoubleUtils.keepPrecision(i.getNmttr().doubleValue(),2));
+                    rightVo.setTqfwjsl(DoubleUtils.keepPrecision(i.getNfwjsl().doubleValue(),2));
+                    rightVo.setTqztzhl(DoubleUtils.keepPrecision(i.getNztzhjsl().doubleValue(),2));
+                    rightVo.setTqxqjsl(DoubleUtils.keepPrecision(i.getNgzxqjsl().doubleValue(),2));
+                }
+            });
+        }else {
+            List<ProBasicPowerstation> wpls = benchmarkingService.wpByCplist(companys, type);
+            wpls.stream().forEach(wp->{
+                Optional<SpecificCenterVo> optionMonth = yearresultList.stream().filter(j -> j.getWpid().equals(wp.getId())).findFirst();
+                if (optionMonth.isPresent()){
+                    SpecificCenterVo leftVo = optionMonth.get();
+                    leftVo.setTqmtbf(0.0);
+                    leftVo.setTqmttr(0.0);
+                    leftVo.setTqfwjsl(0.0);
+                    leftVo.setTqztzhl(0.0);
+                    leftVo.setTqxqjsl(0.0);
+                }
+
+            });
+        }
+
+    }
+
+    /**
+     * 设置当月mtbf,mttr,复位及时率,状态转换率,消缺及时率
+     * @param companys
+     * @param type
+     * @param monthresultList
+     */
+    private void setCenterDyInfo(String companys,String type,String yearmonth, List<SpecificCenterVo> monthresultList) {
+        QueryWrapper<ProEconPowerstationInfoDay4> qw = new QueryWrapper<>();
+
+        qw.select("foreign_key_id,max(ymtbf) ymtbf,max(ymttr) ymttr,max(yfwjsl) yfwjsl,max(yztzhjsl) yztzhjsl,max(ygzxqjsl) ygzxqjsl");
+        qw.eq("location","wp");
+        if (type.endsWith("-1")){
+            qw.like("foreign_key_id","_FDC_");
+        }else if (type.endsWith("-2")){
+            qw.like("foreign_key_id","_GDC_");
+        }
+
+        if (companys.endsWith("ZGS")){
+            List<String> collect = CacheContext.wpls.stream().filter(wp -> wp.getCompanyId().equals(companys)).map(wp -> wp.getId()).collect(Collectors.toList());
+            qw.in("foreign_key_id",CacheContext.wpls.stream().filter(wp -> wp.getCompanyId().equals(companys)).map(wp -> wp.getId()).collect(Collectors.toList()));
+        }
+        qw.eq("to_char(record_date,'yyyy-MM')",yearmonth);
+        qw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
+        List<ProEconPowerstationInfoDay4> dyList = proEconPowerstationInfoDay4Service.list(qw);
+        if (StringUtils.isNotEmpty(dyList)){
+            dyList.stream().forEach(i->{
+                SpecificCenterVo leftVo = new SpecificCenterVo();
+                leftVo.setWpid(i.getForeignKeyId());
+                leftVo.setMtbf(DoubleUtils.keepPrecision(i.getYmtbf().doubleValue(),2));
+                leftVo.setMttr(DoubleUtils.keepPrecision(i.getYmttr().doubleValue(),2));
+                leftVo.setFwjsl(DoubleUtils.keepPrecision(i.getYfwjsl().doubleValue(),2));
+                leftVo.setZtzhl(DoubleUtils.keepPrecision(i.getYztzhjsl().doubleValue(),2));
+                leftVo.setXqjsl(DoubleUtils.keepPrecision(i.getYgzxqjsl().doubleValue(),2));
+                monthresultList.add(leftVo);
+            });
+        }else {
+            List<ProBasicPowerstation> wpls = benchmarkingService.wpByCplist(companys, type);
+            wpls.stream().forEach(i->{
+                SpecificCenterVo leftVo = new SpecificCenterVo();
+                leftVo.setWpid(i.getId());
+                leftVo.setMtbf(0.0);
+                leftVo.setMttr(0.0);
+                leftVo.setFwjsl(0.0);
+                leftVo.setZtzhl(0.0);
+                leftVo.setXqjsl(0.0);
+                monthresultList.add(leftVo);
+            });
+        }
+
+    }
+
+    /**
+     * 设置当年mtbf,mttr,复位及时率,状态转换率,消缺及时率
+     * @param companys
+     * @param yearresultList
+     */
+    private void setCenterDnInfo(String companys,String type,String yearmonth, List<SpecificCenterVo> yearresultList) {
+
+
+        QueryWrapper<ProEconPowerstationInfoDay4> qw = new QueryWrapper<>();
+
+        qw.select("foreign_key_id,max(nmtbf) nmtbf,max(nmttr) nmttr,max(nfwjsl) nfwjsl,max(nztzhjsl) nztzhjsl,max(ngzxqjsl) ngzxqjsl");
+        qw.eq("location","wp");
+        if (type.endsWith("-1")){
+            qw.like("foreign_key_id","_FDC_");
+        }else if (type.endsWith("-2")){
+            qw.like("foreign_key_id","_GDC_");
+        }
+        if (companys.endsWith("ZGS")){
+            qw.in("foreign_key_id",CacheContext.wpls.stream().filter(wp->wp.getCompanyId().equals(companys)).map(wp->wp.getId()).collect(Collectors.toList()));
+        }
+        qw.eq("to_char(record_date,'yyyy')",yearmonth.split("-")[0]);
+        qw.groupBy("to_char(record_date,'yyyy'),foreign_key_id");
+        List<ProEconPowerstationInfoDay4> dyList = proEconPowerstationInfoDay4Service.list(qw);
+        if (StringUtils.isNotEmpty(dyList)){
+            dyList.stream().forEach(i->{
+                SpecificCenterVo rightVo = new SpecificCenterVo();
+                rightVo.setWpid(i.getForeignKeyId());
+                rightVo.setMtbf(DoubleUtils.keepPrecision(i.getNmtbf().doubleValue(),2));
+                rightVo.setMttr(DoubleUtils.keepPrecision(i.getNmttr().doubleValue(),2));
+                rightVo.setFwjsl(DoubleUtils.keepPrecision(i.getNfwjsl().doubleValue(),2));
+                rightVo.setZtzhl(DoubleUtils.keepPrecision(i.getNztzhjsl().doubleValue(),2));
+                rightVo.setXqjsl(DoubleUtils.keepPrecision(i.getNgzxqjsl().doubleValue(),2));
+                yearresultList.add(rightVo);
+            });
+        }else {
+            List<ProBasicPowerstation> wpls = benchmarkingService.wpByCplist(companys, type);
+            wpls.stream().forEach(i->{
+                SpecificCenterVo rightVo = new SpecificCenterVo();
+                rightVo.setWpid(i.getId());
+                rightVo.setMtbf(0.0);
+                rightVo.setMttr(0.0);
+                rightVo.setFwjsl(0.0);
+                rightVo.setZtzhl(0.0);
+                rightVo.setXqjsl(0.0);
+                yearresultList.add(rightVo);
+            });
+        }
+
+    }
 
     /**
      * 获取风能利用率

+ 1 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/threerate/ThreeRateService.java

@@ -108,7 +108,7 @@ public class ThreeRateService {
             wpids = wplist.stream().map(ProBasicPowerstation::getId).collect(Collectors.toList());
 
         }
-        if (StringUtils.isNotEmpty(companyId)) {
+        if (StringUtils.isNotEmpty(windpowerstationId)) {
             wpids.add(windpowerstationId);
         }
 

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

@@ -107,7 +107,7 @@ logging:
 initialcode: INITIAL
 
   #url: http://192.168.11.250:8011/ts
-runWindpowerstation: SD_GDDL_RZLX_FDC_STA,SD_GDDL_QDJN_FDC_STA,SD_GDDL_WHWD_FDC_STA,SD_GDDL_WHXQ_FDC_STA,SD_GDDL_RZWL_FDC_STA,SD_GDDL_WFZC_FDC_STA,SD_GDDL_DZXJ_FDC_STA,SD_GDDL_XTTA_FDC_STA,SD_GDDL_BH1_FDC_STA,SD_GDDL_BH2_FDC_STA,SD_GDDL_CG_FDC_STA,SD_GDDL_FJ_FDC_STA,SD_GDDL_YS_FDC_STA,SD_GDDL_FXFC_FDC_STA,SD_GDDL_JNSS_FDC_STA,SD_GDDL_WFBH_FDC_STA,SD_GDDL_PLHS_FDC_STA,SD_GDDL_JNCQ_FDC_STA,SD_GDDL_LXLN_FDC_STA,SD_GDDL_LQJS_FDC_STA,SD_GDDL_ZYXD_FDC_STA,SD_GDDL_ZYFS_FDC_STA
+runWindpowerstation: SD_GDDL_RZLX_FDC_STA,SD_GDDL_QDJN_FDC_STA,SD_GDDL_WHWD_FDC_STA,SD_GDDL_WHXQ_FDC_STA,SD_GDDL_RZWL_FDC_STA,SD_GDDL_WFZC_FDC_STA,SD_GDDL_DZXJ_FDC_STA,SD_GDDL_XTTA_FDC_STA,SD_LYDL_BH1_FDC_STA,SD_LYDL_BH2_FDC_STA,SD_LYDL_CG_FDC_STA,SD_LYDL_FJ_FDC_STA,SD_LYDL_YS_FDC_STA,SD_SXNY_FXFC_FDC_STA,SD_SXNY_JNSS_FDC_STA,SD_SXNY_WFBH_FDC_STA,SD_SXNY_PLHS_FDC_STA,SD_SXNY_JNCQ_FDC_STA,SD_SXNY_LXLN_FDC_STA,SD_SXNY_LQJS_FDC_STA,SD_SXNY_ZYXD_FDC_STA,SD_SXNY_ZYFS_FDC_STA,SD_GHTZ_HZJ_GDC_STA
 
 gyee:
   #数据适配器