Browse Source

计算服务程序优化

xieshengjie 2 years ago
parent
commit
dd73d39bd3
100 changed files with 9481 additions and 0 deletions
  1. 25 0
      README.md
  2. 115 0
      realtime/computing-services7001/pom.xml
  3. 19 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/GenerationMain.java
  4. 148 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/config/GeneratorCodeConfig.java
  5. 68 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/config/XxlJobConfig.java
  6. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/controller/EquipmentmodelController.java
  7. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/controller/LineController.java
  8. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/controller/MeterpointController.java
  9. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/controller/MeterpointvalueController.java
  10. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/controller/ProjectController.java
  11. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/controller/ShutdowneventController.java
  12. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindpowerstationController.java
  13. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindpowerstationpointnewController.java
  14. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindpowerstationstandardpointController.java
  15. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindpowerstationtestingpointController.java
  16. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindturbineController.java
  17. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindturbinepowerController.java
  18. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindturbinestandardpointController.java
  19. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindturbinestatusdiController.java
  20. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindturbinetestingpointaiController.java
  21. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindturbinetestingpointnewController.java
  22. 184 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/init/CacheContext.java
  23. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/EquipmentmodelMapper.java
  24. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/LineMapper.java
  25. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/MeterpointMapper.java
  26. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/MeterpointvalueMapper.java
  27. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/ProjectMapper.java
  28. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/ShutdowneventMapper.java
  29. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindpowerstationMapper.java
  30. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindpowerstationpointnewMapper.java
  31. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindpowerstationstandardpointMapper.java
  32. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindpowerstationtestingpointMapper.java
  33. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindturbineMapper.java
  34. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindturbinepowerMapper.java
  35. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindturbinestandardpointMapper.java
  36. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindturbinestatusdiMapper.java
  37. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindturbinetestingpointaiMapper.java
  38. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindturbinetestingpointnewMapper.java
  39. 65 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Equipmentmodel.java
  40. 53 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Line.java
  41. 91 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Meterpoint.java
  42. 74 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Meterpointvalue.java
  43. 70 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Project.java
  44. 66 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Shutdownevent.java
  45. 86 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windpowerstation.java
  46. 77 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windpowerstationpointnew.java
  47. 40 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windpowerstationstandardpoint.java
  48. 74 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windpowerstationtestingpoint.java
  49. 67 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windturbine.java
  50. 34 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windturbinepower.java
  51. 40 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windturbinestandardpoint.java
  52. 80 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windturbinestatusdi.java
  53. 80 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windturbinetestingpointai.java
  54. 80 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windturbinetestingpointnew.java
  55. 530 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/AverageAndGeneratingService.java
  56. 1102 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/FiveLossesService.java
  57. 690 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/GenerationService.java
  58. 151 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/RealtimeSpeedPowerService.java
  59. 82 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/SafetyService.java
  60. 723 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/StatusService.java
  61. 245 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/TheorypowerService.java
  62. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IEquipmentmodelService.java
  63. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/ILineService.java
  64. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IMeterpointService.java
  65. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IMeterpointvalueService.java
  66. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IProjectService.java
  67. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IShutdowneventService.java
  68. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindpowerstationService.java
  69. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindpowerstationpointnewService.java
  70. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindpowerstationstandardpointService.java
  71. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindpowerstationtestingpointService.java
  72. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindturbineService.java
  73. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindturbinepowerService.java
  74. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindturbinestandardpointService.java
  75. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindturbinestatusdiService.java
  76. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindturbinetestingpointaiService.java
  77. 16 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindturbinetestingpointnewService.java
  78. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/EquipmentmodelServiceImpl.java
  79. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/LineServiceImpl.java
  80. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/MeterpointServiceImpl.java
  81. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/MeterpointvalueServiceImpl.java
  82. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/ProjectServiceImpl.java
  83. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/ShutdowneventServiceImpl.java
  84. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindpowerstationServiceImpl.java
  85. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindpowerstationpointnewServiceImpl.java
  86. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindpowerstationstandardpointServiceImpl.java
  87. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindpowerstationtestingpointServiceImpl.java
  88. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindturbineServiceImpl.java
  89. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindturbinepowerServiceImpl.java
  90. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindturbinestandardpointServiceImpl.java
  91. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindturbinestatusdiServiceImpl.java
  92. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindturbinetestingpointaiServiceImpl.java
  93. 20 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindturbinetestingpointnewServiceImpl.java
  94. 201 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/task/SaticScheduleTask.java
  95. 48 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/util/realtimesource/ApiGolden.java
  96. 1316 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/util/realtimesource/EdosUtil.java
  97. 1316 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/util/realtimesource/EdosUtilTd.java
  98. 27 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/util/realtimesource/GoldenConfig.java
  99. 262 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/util/realtimesource/IEdosUtil.java
  100. 0 0
      realtime/computing-services7001/src/main/java/com/gyee/generation/util/realtimesource/StringUtil.java

+ 25 - 0
README.md

@@ -0,0 +1,25 @@
+# sis
+
+
+##模块:
+### common -- 公共类型和方法
+* data -- 公共数据类型
+* utils -- 公共方法
+
+### cache -- 数据缓存模块
+
+
+### realtime -- 实时计算
+* 7001 -- GJY_FDC,YF_FDC,PDL_FDC
+* 7002 -- HSM_FDC,PTZ_FDC,DJY_FDC,ZK_FDC,YLZ_FDC
+* 7003 -- NJL_FDC,BHB3_FDC,XWT_FDC,YTY_FDC,BHB_FDC,MLJ_FDC
+
+### web -- 接口层
+
+
+
+
+
+
+
+

+ 115 - 0
realtime/computing-services7001/pom.xml

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>realtime</artifactId>
+        <groupId>com.gyee</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>computing-services7001</artifactId>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.oracle</groupId>
+            <artifactId>ojdbc6</artifactId>
+            <version>11.2.0.3</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.data</groupId>
+            <artifactId>spring-data-redis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-generator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.freemarker</groupId>
+            <artifactId>freemarker</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.gyee</groupId>
+            <artifactId>common</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.17</version>
+            <scope>compile</scope>
+        </dependency>
+        <!-- ********************** plugin ********************** -->
+        <!-- groovy-all -->
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy</artifactId>
+        </dependency>
+        <!-- xxl-job-core -->
+        <dependency>
+            <groupId>com.xuxueli</groupId>
+            <artifactId>xxl-job-core</artifactId>
+            <version>2.3.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty-all</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+        </dependency>
+
+
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

+ 19 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/GenerationMain.java

@@ -0,0 +1,19 @@
+package com.gyee.generation;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * @ClassName : GenerationMain
+ * @Author : xieshengjie
+ * @Date: 2022/2/28 14:55
+ * @Description :
+ */
+@SpringBootApplication
+@MapperScan("com.gyee.generation.mapper")
+public class GenerationMain {
+    public static void main(String[] args) {
+        SpringApplication.run(GenerationMain.class,args);
+    }
+}

+ 148 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/config/GeneratorCodeConfig.java

@@ -0,0 +1,148 @@
+package com.gyee.generation.config;
+
+
+import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.generator.AutoGenerator;
+import com.baomidou.mybatisplus.generator.config.*;
+import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
+import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
+
+import java.util.Scanner;
+
+/**
+ *@ClassName GeneratorCodeConfig
+ *@Description 自动生成mybatisplus的相关代码
+ *@Author 谢生杰
+ *@Date 2020/9/25 18:26
+ *@Version 1.0
+ **/
+public class GeneratorCodeConfig {
+    public static String scanner(String tip) {
+        Scanner scanner = new Scanner(System.in);
+        StringBuilder help = new StringBuilder();
+        help.append("请输入" + tip + ":");
+        System.out.println(help.toString());
+        if (scanner.hasNext()) {
+            String ipt = scanner.next();
+            if (StringUtils.isNotEmpty(ipt)) {
+                return ipt;
+            }
+        }
+        throw new MybatisPlusException("请输入正确的" + tip + "!");
+    }
+
+    public static void main(String[] args) {
+        // 代码生成器
+        AutoGenerator mpg = new AutoGenerator();
+
+        // 全局配置
+        GlobalConfig gc = new GlobalConfig();
+        String projectPath = System.getProperty("user.dir");
+        gc.setOutputDir(projectPath + "/src/main/java");
+        gc.setAuthor("谢生杰");
+        gc.setOpen(false);
+        //实体属性 Swagger2 注解
+        gc.setSwagger2(false);
+        mpg.setGlobalConfig(gc);
+
+        // 数据源配置
+        DataSourceConfig dsc = new DataSourceConfig();
+        /*dsc.setUrl("jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true");
+        dsc.setDriverName("com.mysql.jdbc.Driver");
+        dsc.setUsername("root");
+        dsc.setPassword("root");
+        mpg.setDataSource(dsc);*/
+//        dsc.setDriverName("oracle.jdbc.driver.OracleDriver");
+//        dsc.setUsername("gdprod");
+//        dsc.setPassword("gd123");
+//        dsc.setUrl("jdbc:oracle:thin:@10.83.68.165:1521:gdsj");
+
+        dsc.setDriverName("org.postgresql.Driver");
+        dsc.setUsername("gdprod");
+        dsc.setPassword("gd123");
+        dsc.setUrl("jdbc:postgresql://10.81.3.151:5432/wisdom");
+        mpg.setDataSource(dsc);
+
+
+
+        // 包配置
+        PackageConfig pc = new PackageConfig();
+//        pc.setModuleName(scanner("模块名"));
+        pc.setParent("com.gyee.generation");
+        pc.setEntity("model.auto");
+        pc.setMapper("mapper.auto");
+        pc.setService("service.auto");
+        pc.setServiceImpl("service.auto.impl");
+        mpg.setPackageInfo(pc);
+
+        // 自定义配置
+//        InjectionConfig cfg = new InjectionConfig() {
+//            @Override
+//            public void initMap() {
+//                // to do nothing
+//            }
+//        };
+
+        // 如果模板引擎是 freemarker
+//        String templatePath = "/templates/mapper.xml.ftl";
+        // 如果模板引擎是 velocity
+        // String templatePath = "/templates/mapper.xml.vm";
+
+        // 自定义输出配置
+//        List<FileOutConfig> focList = new ArrayList<>();
+        // 自定义配置会被优先输出
+//        focList.add(new FileOutConfig(templatePath) {
+//            @Override
+//            public String outputFile(TableInfo tableInfo) {
+//                // 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
+//                return projectPath + "/src/main/resources/mapper/" + pc.getModuleName()
+//                        + "/" + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML;
+//            }
+//        });
+        /*
+        cfg.setFileCreate(new IFileCreate() {
+            @Override
+            public boolean isCreate(ConfigBuilder configBuilder, FileType fileType, String filePath) {
+                // 判断自定义文件夹是否需要创建
+                checkDir("调用默认方法创建的目录");
+                return false;
+            }
+        });
+        */
+//        cfg.setFileOutConfigList(focList);
+//        mpg.setCfg(cfg);
+
+        // 配置模板
+        TemplateConfig templateConfig = new TemplateConfig();
+
+        // 配置自定义输出模板
+        //指定自定义模板路径,注意不要带上.ftl/.vm, 会根据使用的模板引擎自动识别
+        // templateConfig.setEntity("templates/entity2.java");
+        // templateConfig.setService();
+        // templateConfig.setController();
+
+        templateConfig.setXml(null);
+        mpg.setTemplate(templateConfig);
+
+        // 策略配置
+        StrategyConfig strategy = new StrategyConfig();
+        strategy.setNaming(NamingStrategy.underline_to_camel);
+        strategy.setColumnNaming(NamingStrategy.underline_to_camel);
+        strategy.setSuperEntityClass("com.baomidou.mybatisplus.extension.activerecord.Model");
+        strategy.setEntityLombokModel(true);
+        strategy.setRestControllerStyle(true);
+
+        strategy.setEntityLombokModel(true);
+        // 公共父类
+//        strategy.setSuperControllerClass("com.baomidou.ant.common.BaseController");
+        // 写于父类中的公共字段
+//        strategy.setSuperEntityColumns("id");
+        strategy.setInclude(scanner("表名,多个英文逗号分割").split(","));
+        strategy.setControllerMappingHyphenStyle(true);
+        strategy.setTablePrefix(pc.getModuleName() + "_");
+        mpg.setStrategy(strategy);
+        mpg.setTemplateEngine(new FreemarkerTemplateEngine());
+        mpg.execute();
+    }
+}

+ 68 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/config/XxlJobConfig.java

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

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/controller/EquipmentmodelController.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-28
+ */
+@RestController
+@RequestMapping("//equipmentmodel")
+public class EquipmentmodelController {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/controller/LineController.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@RestController
+@RequestMapping("//line")
+public class LineController {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/controller/MeterpointController.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@RestController
+@RequestMapping("//meterpoint")
+public class MeterpointController {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/controller/MeterpointvalueController.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-21
+ */
+@RestController
+@RequestMapping("//meterpointvalue")
+public class MeterpointvalueController {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/controller/ProjectController.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@RestController
+@RequestMapping("//project")
+public class ProjectController {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/controller/ShutdowneventController.java

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

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindpowerstationController.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@RestController
+@RequestMapping("//windpowerstation")
+public class WindpowerstationController {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindpowerstationpointnewController.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-02
+ */
+@RestController
+@RequestMapping("//windpowerstationpointnew")
+public class WindpowerstationpointnewController {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindpowerstationstandardpointController.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@RestController
+@RequestMapping("//windpowerstationstandardpoint")
+public class WindpowerstationstandardpointController {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindpowerstationtestingpointController.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@RestController
+@RequestMapping("//windpowerstationtestingpoint")
+public class WindpowerstationtestingpointController {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindturbineController.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@RestController
+@RequestMapping("//windturbine")
+public class WindturbineController {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindturbinepowerController.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-04-26
+ */
+@RestController
+@RequestMapping("//windturbinepower")
+public class WindturbinepowerController {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindturbinestandardpointController.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@RestController
+@RequestMapping("//windturbinestandardpoint")
+public class WindturbinestandardpointController {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindturbinestatusdiController.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-28
+ */
+@RestController
+@RequestMapping("//windturbinestatusdi")
+public class WindturbinestatusdiController {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindturbinetestingpointaiController.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@RestController
+@RequestMapping("//windturbinetestingpointai")
+public class WindturbinetestingpointaiController {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/controller/WindturbinetestingpointnewController.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-02
+ */
+@RestController
+@RequestMapping("//windturbinetestingpointnew")
+public class WindturbinetestingpointnewController {
+
+}

+ 184 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/init/CacheContext.java

@@ -0,0 +1,184 @@
+package com.gyee.generation.init;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
+import com.gyee.common.model.StringUtils;
+import com.gyee.generation.model.auto.*;
+import com.gyee.generation.service.auto.*;
+import com.gyee.generation.util.redis.RedisService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @ClassName : CacheContext
+ * @Author : xieshengjie
+ * @Date: 2021/5/18 9:35
+ * @Description : 缓存
+ */
+@Component
+public class CacheContext implements CommandLineRunner {
+    Logger logger = LoggerFactory.getLogger(CacheContext.class);
+
+    @Resource
+    private IWindturbineService windturbineService;
+    @Resource
+    private ILineService lineService;
+    @Resource
+    private IProjectService projectService;
+    @Resource
+    private IWindpowerstationService windpowerstationService;
+    @Resource
+    private IMeterpointService meterpointService;
+    @Resource
+    private IEquipmentmodelService equipmentmodelService;
+    @Resource
+    private IWindturbinestatusdiService windturbinestatusdiService;
+    @Resource
+    private IWindturbinepowerService windturbinepowerService;
+    @Resource
+    private RedisService redisService;
+    @Value("${runWindpowerstation}")
+    private String runWindpowerstation;
+
+    public static List<Windturbine> wtls = new ArrayList<>();
+    public static List<Project> projects = new ArrayList<>();
+    public static List<Line>  lines = new ArrayList<>();
+    public static List<Windpowerstation>  wpls = new ArrayList<>();
+    public static List<Meterpoint>  meterpoints = new ArrayList<>();
+    public static Map<String,Meterpoint>  meterpointMap = new HashMap<>();
+    public static Map<String,List<Project>> wppromap = new HashMap<>();
+    public static Map<String,List<Line>> prolinemap = new HashMap<>();
+    public static Map<String,List<Windturbine>> linewtmap = new HashMap<>();
+    public static Map<String, Map<String, Windturbinetestingpointnew>> wtpAimap = new HashMap<>();// 风电机测点AI表
+    public static Map<String,Map<String, Windpowerstationpointnew>> linepointmap =new HashMap<>();
+    public static Map<String,Map<String, Windpowerstationpointnew>> propointmap =new HashMap<>();
+    public static Map<String,Map<String, Windpowerstationpointnew>> wppointmap =new HashMap<>();
+    public static Map<String,Project> proMap = new HashMap<>();
+    public static Map<String,List<Windturbinestatusdi>> statusMap = new HashMap<>();
+    public static Map<String,Map<Double,Double>> zbzglMap = new HashMap<>();
+    public static Map<String,Equipmentmodel> modelMap = new HashMap<>();
+    public static Map<String,Map<Double,Double>> zzsglMap = new HashMap<>();
+    public static Map<String,Double> modelpower = new HashMap<>();
+    @Override
+    public void run(String... args) throws Exception {
+        logger.info("缓存开始------------------------------------------------------------");
+        List<String> runWpids = Arrays.asList(runWindpowerstation.split(","));
+        logger.info(runWpids.get(0)+"------------------"+runWpids.size());
+
+        List<Equipmentmodel> equipmentmodels = equipmentmodelService.list();
+        equipmentmodels.stream().forEach(e->{
+            modelMap.put(e.getId(),e);
+        });
+
+        wtls = windturbineService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationid())).collect(Collectors.toList());
+        logger.info(wtls.size()+"");
+        wtls.forEach(wt->{
+            Equipmentmodel equipmentmodel = modelMap.get(wt.getModelid());
+            modelpower.put(wt.getId(),equipmentmodel.getPowerproduction());
+
+            String wtString = redisService.get(wt.getId());
+            Map<String, Windturbinetestingpointnew> stringWindturbinetestingpointnewMap = JSONObject.parseObject(wtString, new TypeReference<Map<String, Windturbinetestingpointnew>>() {
+            });
+            wtpAimap.put(wt.getId(),stringWindturbinetestingpointnewMap);
+
+            if (linewtmap.containsKey(wt.getLineid())){
+                linewtmap.get(wt.getLineid()).add(wt);
+            }else {
+                List<Windturbine> lines = new ArrayList<>();
+                lines.add(wt);
+                linewtmap.put(wt.getLineid(),lines);
+            }
+        });
+
+        projects = projectService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationid())).collect(Collectors.toList());
+        projects.stream().forEach(p->{
+            proMap.put(p.getId(),p);
+            if (wppromap.containsKey(p.getWindpowerstationid())){
+                wppromap.get(p.getWindpowerstationid()).add(p);
+            }else {
+                List<Project> prolist = new ArrayList<>();
+                prolist.add(p);
+                wppromap.put(p.getWindpowerstationid(),prolist);
+            }
+            String pjString = redisService.get(p.getId());
+            Map<String, Windpowerstationpointnew> stringWindpowerstationpointnewMap = JSONObject.parseObject(pjString, new TypeReference<Map<String, Windpowerstationpointnew>>() {
+            });
+            propointmap.put(p.getId(),stringWindpowerstationpointnewMap);
+
+        });
+
+        lines = lineService.list().stream().filter(i-> StringUtils.isNotNull(proMap.get(i.getProjectid())) && runWpids.contains(proMap.get(i.getProjectid()).getWindpowerstationid())).collect(Collectors.toList());
+        lines.stream().forEach(l->{
+            if (prolinemap.containsKey(l.getProjectid())){
+                prolinemap.get(l.getProjectid()).add(l);
+            }else {
+                List<Line> lineList = new ArrayList<>();
+                lineList.add(l);
+                prolinemap.put(l.getProjectid(),lineList);
+            }
+            String lnString = redisService.get(l.getId());
+            Map<String, Windpowerstationpointnew> stringWindpowerstationpointnewMap = JSONObject.parseObject(lnString, new TypeReference<Map<String, Windpowerstationpointnew>>() {
+            });
+            linepointmap.put(l.getId(),stringWindpowerstationpointnewMap);
+        });
+
+        wpls = windpowerstationService.list().stream().filter(i->runWpids.contains(i.getId())).collect(Collectors.toList());;
+        meterpoints = meterpointService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationid())).collect(Collectors.toList());
+        meterpoints.stream().forEach(meterpoint -> {
+            meterpointMap.put(meterpoint.getId(),meterpoint);
+        });
+
+
+        wpls.stream().forEach(wp->{
+            String wpString = redisService.get(wp.getId());
+            Map<String, Windpowerstationpointnew> stringMapMap = JSONObject.parseObject(wpString, new TypeReference<Map<String, Windpowerstationpointnew>>() {
+            });
+            wppointmap.put(wp.getId(),stringMapMap);
+        });
+
+        String sszzt = redisService.get("SSZZT");
+         statusMap = JSONObject.parseObject(sszzt, new TypeReference<Map<String,List<Windturbinestatusdi>>>() {
+        });
+
+
+
+        String zbzgl = redisService.get("ZBZGL");
+        zbzglMap = JSONObject.parseObject(zbzgl, new TypeReference<Map<String,Map<Double,Double>>>() {
+        });
+
+        List<Windturbinepower> windturbinepowerList = windturbinepowerService.list().stream().filter(windturbinepower -> runWindpowerstation.contains(windturbinepower.getWindpowerstationid())).collect(Collectors.toList());
+        windturbinepowerList.stream().forEach(w -> {
+            if (zzsglMap.containsKey(w.getWindturbineid())){
+                zzsglMap.get(w.getWindturbineid()).put(w.getSpeed(),w.getTheorypower());
+            }else {
+                Map<Double,Double> tempMap = new HashMap<>();
+                tempMap.put(w.getSpeed(),w.getTheorypower());
+                zzsglMap.put(w.getWindturbineid(),tempMap);
+            }
+
+        });
+
+//        String wpString = redisService.get("PRODUCT-WP");
+//        wppointmap = JSONObject.parseObject(wpString, new TypeReference<Map<String, Map<String, Windpowerstationpointnew>>>() {
+//        });
+//        String pjString = redisService.get("PRODUCT-PJ");
+//        propointmap = JSONObject.parseObject(pjString, new TypeReference<Map<String, Map<String, Windpowerstationpointnew>>>() {
+//        });
+//        String lnString = redisService.get("PRODUCT-LN");
+//        linepointmap = JSONObject.parseObject(lnString, new TypeReference<Map<String, Map<String, Windpowerstationpointnew>>>() {
+//        });
+
+//        String wtString = redisService.get("PRODUCT-WT");
+//        wtpAimap = JSONObject.parseObject(wtString, new TypeReference<Map<String, Map<String, Windturbinetestingpointnew>>>() {
+//        });
+        logger.info("缓存结束------------------------------------------------------------");
+    }
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/EquipmentmodelMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.Equipmentmodel;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-28
+ */
+public interface EquipmentmodelMapper extends BaseMapper<Equipmentmodel> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/LineMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.Line;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface LineMapper extends BaseMapper<Line> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/MeterpointMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.Meterpoint;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface MeterpointMapper extends BaseMapper<Meterpoint> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/MeterpointvalueMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.Meterpointvalue;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-21
+ */
+public interface MeterpointvalueMapper extends BaseMapper<Meterpointvalue> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/ProjectMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.Project;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface ProjectMapper extends BaseMapper<Project> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/ShutdowneventMapper.java

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

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindpowerstationMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.Windpowerstation;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface WindpowerstationMapper extends BaseMapper<Windpowerstation> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindpowerstationpointnewMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.Windpowerstationpointnew;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-02
+ */
+public interface WindpowerstationpointnewMapper extends BaseMapper<Windpowerstationpointnew> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindpowerstationstandardpointMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.Windpowerstationstandardpoint;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface WindpowerstationstandardpointMapper extends BaseMapper<Windpowerstationstandardpoint> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindpowerstationtestingpointMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.Windpowerstationtestingpoint;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface WindpowerstationtestingpointMapper extends BaseMapper<Windpowerstationtestingpoint> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindturbineMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.Windturbine;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface WindturbineMapper extends BaseMapper<Windturbine> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindturbinepowerMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.Windturbinepower;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-04-26
+ */
+public interface WindturbinepowerMapper extends BaseMapper<Windturbinepower> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindturbinestandardpointMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.Windturbinestandardpoint;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface WindturbinestandardpointMapper extends BaseMapper<Windturbinestandardpoint> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindturbinestatusdiMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.Windturbinestatusdi;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-28
+ */
+public interface WindturbinestatusdiMapper extends BaseMapper<Windturbinestatusdi> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindturbinetestingpointaiMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.Windturbinetestingpointai;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface WindturbinetestingpointaiMapper extends BaseMapper<Windturbinetestingpointai> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/mapper/auto/WindturbinetestingpointnewMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.Windturbinetestingpointnew;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-02
+ */
+public interface WindturbinetestingpointnewMapper extends BaseMapper<Windturbinetestingpointnew> {
+
+}

+ 65 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Equipmentmodel.java

@@ -0,0 +1,65 @@
+package com.gyee.generation.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("EQUIPMENTMODEL")
+public class Equipmentmodel extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("DESCRIPTION")
+    private String description;
+
+    @TableField("POWERPRODUCTION")
+    private Double powerproduction;
+
+    @TableField("CUTINWINDSPEED")
+    private Double cutinwindspeed;
+
+    @TableField("RATEDWINDSPEED")
+    private Double ratedwindspeed;
+
+    @TableField("CUTOUTWINDSPEED")
+    private String cutoutwindspeed;
+
+    @TableField("WINDTURBINEMANUFACTURERID")
+    private String windturbinemanufacturerid;
+
+    @TableField("PHOTO")
+    private String photo;
+
+    @TableField("UNIT")
+    private String unit;
+
+    @TableField("SWEPTAREA")
+    private Double sweptarea;
+
+    @TableField("EQUIPMENTCATEGORY")
+    private Double equipmentcategory;
+
+
+}

+ 53 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Line.java

@@ -0,0 +1,53 @@
+package com.gyee.generation.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("LINE")
+public class Line extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("ANAME")
+    private String aname;
+
+    @TableField("PROJECTID")
+    private String projectid;
+
+    @TableField("ORDERNUM")
+    private Integer ordernum;
+
+    @TableField("CAPACITY")
+    private Integer capacity;
+
+    @TableField("CAPACITYUNIT")
+    private String capacityunit;
+
+    @TableField("QUANTITY")
+    private Integer quantity;
+
+
+}

+ 91 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Meterpoint.java

@@ -0,0 +1,91 @@
+package com.gyee.generation.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("METERPOINT")
+public class Meterpoint extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("DESCRIPTION")
+    private String description;
+
+    @TableField("WINDPOWERSTATIONID")
+    private String windpowerstationid;
+
+    @TableField("PROJECTID")
+    private String projectid;
+
+    @TableField("LINEID")
+    private String lineid;
+
+    @TableField("METERTYPE")
+    private String metertype;
+
+    @TableField("METERCODE")
+    private String metercode;
+
+    @TableField("METERSORT")
+    private String metersort;
+
+    @TableField("DISPLAYTYPE")
+    private String displaytype;
+
+    @TableField("UNIFORMCODE")
+    private String uniformcode;
+
+    @TableField("MAGNIFICATION")
+    private Double magnification;
+
+    @TableField("SHORTID")
+    private String shortid;
+
+    @TableField("LONGID")
+    private String longid;
+
+    @TableField("REALTIMEID")
+    private String realtimeid;
+
+    @TableField("INITIALVALUE")
+    private Double initialvalue;
+
+    @TableField("XS")
+    private Double xs;
+
+    @TableField("MAGNIFICATIONXS")
+    private Double magnificationxs;
+
+    @TableField("OTHERVALUE")
+    private Double othervalue;
+
+    @TableField("OTHERDATE")
+    private Date otherdate;
+
+
+}

+ 74 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Meterpointvalue.java

@@ -0,0 +1,74 @@
+package com.gyee.generation.model.auto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("METERPOINTVALUE")
+public class Meterpointvalue extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "ID",type = IdType.ASSIGN_ID)
+    private Long id;
+
+    @TableField("RECORDDATE")
+    private Date recorddate;
+
+    @TableField("METERID")
+    private String meterid;
+
+    @TableField("YEAR")
+    private Double year;
+
+    @TableField("MONTH")
+    private Double month;
+
+    @TableField("DAY")
+    private Double day;
+
+    @TableField("NOW")
+    private Double now;
+
+    @TableField("TOTALVALUE")
+    private Double totalvalue;
+
+    @TableField("YEARVALUE")
+    private Double yearvalue;
+
+    @TableField("MONTHVALUE")
+    private Double monthvalue;
+
+    @TableField("DAYVALUE")
+    private Double dayvalue;
+
+    @TableField("YEAR4")
+    private Double year4;
+
+    @TableField("MONTH4")
+    private Double month4;
+
+    @TableField("DAY4")
+    private Double day4;
+
+    @TableField("NOW4")
+    private Double now4;
+
+
+}

+ 70 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Project.java

@@ -0,0 +1,70 @@
+package com.gyee.generation.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("PROJECT")
+public class Project extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("ANAME")
+    private String aname;
+
+    @TableField("WINDPOWERSTATIONID")
+    private String windpowerstationid;
+
+    @TableField("CAPACITY")
+    private Integer capacity;
+
+    @TableField("CAPACITYUNIT")
+    private String capacityunit;
+
+    @TableField("QUANTITY")
+    private Integer quantity;
+
+    @TableField("MODEL")
+    private String model;
+
+    @TableField("COMMISSIONDATE")
+    private Date commissiondate;
+
+    @TableField("MASTERPHONE")
+    private String masterphone;
+
+    @TableField("SHIFTFOREMAN")
+    private String shiftforeman;
+
+    @TableField("SHIFTFOREMANPHONE")
+    private String shiftforemanphone;
+
+    @TableField("ORDERNUM")
+    private Integer ordernum;
+
+
+}

+ 66 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Shutdownevent.java

@@ -0,0 +1,66 @@
+package com.gyee.generation.model.auto;
+
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.Value;
+import org.springframework.data.annotation.Id;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-07-29
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Shutdownevent extends Model {
+
+    private static final long serialVersionUID = 1L;
+    @TableId(value = "id",type = IdType.INPUT)
+    private String id;
+
+    private String windpowerstationid;
+
+    private String windturbineid;
+
+    private Date stoptime;
+
+    private Date starttime;
+
+    private Double stophours;
+
+    private Double losspower;
+
+    private String stoptypeid;
+
+    private Integer ishandle;
+
+    private String warningid;
+
+    private String projectid;
+
+    private String handleway;
+
+    private String faultview;
+
+    private Integer statuscode;
+
+    private String mainid;
+
+    private String resetrate;
+
+    private String staterate;
+
+    private String failrate;
+
+    private Integer warningrecordsid;
+
+
+}

+ 86 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windpowerstation.java

@@ -0,0 +1,86 @@
+package com.gyee.generation.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("WINDPOWERSTATION")
+public class Windpowerstation extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("ADDRESS")
+    private String address;
+
+    @TableField("TELEPHONE")
+    private String telephone;
+
+    @TableField("CAPACITY")
+    private Double capacity;
+
+    @TableField("CAPACITYUNIT")
+    private String capacityunit;
+
+    @TableField("QUANTITY")
+    private Double quantity;
+
+    @TableField("ANAME")
+    private String aname;
+
+    @TableField("LONGITUDE")
+    private Double longitude;
+
+    @TableField("LATITUDE")
+    private Double latitude;
+
+    @TableField("PHOTO")
+    private String photo;
+
+    @TableField("COMPANYID")
+    private String companyid;
+
+    @TableField("SYSTEMMANUFACT")
+    private String systemmanufact;
+
+    @TableField("HEADFARM")
+    private String headfarm;
+
+    @TableField("HEADFARMPHONE")
+    private String headfarmphone;
+
+    @TableField("MODEL")
+    private String model;
+
+    @TableField("ORDERNUM")
+    private Double ordernum;
+
+    @TableField("ALTITUDE")
+    private Double altitude;
+
+    @TableField("HEIGHT")
+    private Double height;
+
+
+}

+ 77 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windpowerstationpointnew.java

@@ -0,0 +1,77 @@
+package com.gyee.generation.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("WINDPOWERSTATIONPOINTNEW")
+public class Windpowerstationpointnew extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("MODEL")
+    private String model;
+
+    @TableField("VALUEUNIT")
+    private String valueunit;
+
+    @TableField("ENGLISHNAME")
+    private String englishname;
+
+    @TableField("TYPEID")
+    private String typeid;
+
+    @TableField("MODELID")
+    private String modelid;
+
+    @TableField("MAXVAL")
+    private Double maxval;
+
+    @TableField("MINVAL")
+    private Double minval;
+
+    @TableField("REASONABLEMAXVAL")
+    private Double reasonablemaxval;
+
+    @TableField("REASONABLEMINVAL")
+    private Double reasonableminval;
+
+    @TableField("UNIFORMCODE")
+    private String uniformcode;
+
+    @TableField("SHORTID")
+    private String shortid;
+
+    @TableField("LONGID")
+    private String longid;
+
+    @TableField("WINDPOWERSTATIONID")
+    private String windpowerstationid;
+
+    @TableField("REALTIMEID")
+    private String realtimeid;
+
+
+}

+ 40 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windpowerstationstandardpoint.java

@@ -0,0 +1,40 @@
+package com.gyee.generation.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("WINDPOWERSTATIONSTANDARDPOINT")
+public class Windpowerstationstandardpoint extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("UNIFORMCODE")
+    private String uniformcode;
+
+    @TableField("ORDERNUM")
+    private String ordernum;
+
+
+}

+ 74 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windpowerstationtestingpoint.java

@@ -0,0 +1,74 @@
+package com.gyee.generation.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("WINDPOWERSTATIONTESTINGPOINT")
+public class Windpowerstationtestingpoint extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("MODEL")
+    private String model;
+
+    @TableField("VALUEUNIT")
+    private String valueunit;
+
+    @TableField("ENGLISHNAME")
+    private String englishname;
+
+    @TableField("TYPEID")
+    private String typeid;
+
+    @TableField("MODELID")
+    private String modelid;
+
+    @TableField("MAXVAL")
+    private Double maxval;
+
+    @TableField("MINVAL")
+    private Double minval;
+
+    @TableField("REASONABLEMAXVAL")
+    private Double reasonablemaxval;
+
+    @TableField("REASONABLEMINVAL")
+    private Double reasonableminval;
+
+    @TableField("UNIFORMCODE")
+    private String uniformcode;
+
+    @TableField("SHORTID")
+    private String shortid;
+
+    @TableField("LONGID")
+    private String longid;
+
+    @TableField("WINDPOWERSTATIONID")
+    private String windpowerstationid;
+
+    @TableField("REALTIMEID")
+    private String realtimeid;
+
+
+}

+ 67 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windturbine.java

@@ -0,0 +1,67 @@
+package com.gyee.generation.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("WINDTURBINE")
+public class Windturbine extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("WINDPOWERSTATIONID")
+    private String windpowerstationid;
+
+    @TableField("LONGITUDE")
+    private Double longitude;
+
+    @TableField("LATITUDE")
+    private Double latitude;
+
+    @TableField("MODELID")
+    private String modelid;
+
+    @TableField("STATUS")
+    private String status;
+
+    @TableField("PROJECTID")
+    private String projectid;
+
+    @TableField("LINEID")
+    private String lineid;
+
+    @TableField("FIRSTINTEGRATEDTIME")
+    private Date firstintegratedtime;
+
+    @TableField("PHOTO")
+    private String photo;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("STANDARDID")
+    private String standardid;
+
+
+}

+ 34 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windturbinepower.java

@@ -0,0 +1,34 @@
+package com.gyee.generation.model.auto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-04-26
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Windturbinepower extends Model {
+
+    private static final long serialVersionUID = 1L;
+    @TableId(value = "ID",type = IdType.INPUT)
+    private String id;
+
+    private String windturbineid;
+
+    private String windpowerstationid;
+
+    private Double speed;
+
+    private Double theorypower;
+
+
+}

+ 40 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windturbinestandardpoint.java

@@ -0,0 +1,40 @@
+package com.gyee.generation.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("WINDTURBINESTANDARDPOINT")
+public class Windturbinestandardpoint extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("UNIFORMCODE")
+    private String uniformcode;
+
+    @TableField("ORDERNUM")
+    private String ordernum;
+
+
+}

+ 80 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windturbinestatusdi.java

@@ -0,0 +1,80 @@
+package com.gyee.generation.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("WINDTURBINESTATUSDI")
+public class Windturbinestatusdi extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("MODEL")
+    private String model;
+
+    @TableField("VALUEUNIT")
+    private String valueunit;
+
+    @TableField("ENGLISHNAME")
+    private String englishname;
+
+    @TableField("TYPEID")
+    private String typeid;
+
+    @TableField("MODELID")
+    private String modelid;
+
+    @TableField("MAXVAL")
+    private Double maxval;
+
+    @TableField("MINVAL")
+    private Double minval;
+
+    @TableField("REASONABLEMAXVAL")
+    private Double reasonablemaxval;
+
+    @TableField("REASONABLEMINVAL")
+    private Double reasonableminval;
+
+    @TableField("WINDTURBINEID")
+    private String windturbineid;
+
+    @TableField("UNIFORMCODE")
+    private String uniformcode;
+
+    @TableField("SHORTID")
+    private String shortid;
+
+    @TableField("LONGID")
+    private String longid;
+
+    @TableField("WINDPOWERSTATIONID")
+    private String windpowerstationid;
+
+    @TableField("REALTIMEID")
+    private String realtimeid;
+
+
+}

+ 80 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windturbinetestingpointai.java

@@ -0,0 +1,80 @@
+package com.gyee.generation.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("WINDTURBINETESTINGPOINTAI")
+public class Windturbinetestingpointai extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("MODEL")
+    private String model;
+
+    @TableField("VALUEUNIT")
+    private String valueunit;
+
+    @TableField("ENGLISHNAME")
+    private String englishname;
+
+    @TableField("TYPEID")
+    private String typeid;
+
+    @TableField("MODELID")
+    private String modelid;
+
+    @TableField("MAXVAL")
+    private Double maxval;
+
+    @TableField("MINVAL")
+    private Double minval;
+
+    @TableField("REASONABLEMAXVAL")
+    private Double reasonablemaxval;
+
+    @TableField("REASONABLEMINVAL")
+    private Double reasonableminval;
+
+    @TableField("WINDTURBINEID")
+    private String windturbineid;
+
+    @TableField("UNIFORMCODE")
+    private String uniformcode;
+
+    @TableField("SHORTID")
+    private String shortid;
+
+    @TableField("LONGID")
+    private String longid;
+
+    @TableField("WINDPOWERSTATIONID")
+    private String windpowerstationid;
+
+    @TableField("REALTIMEID")
+    private String realtimeid;
+
+
+}

+ 80 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/model/auto/Windturbinetestingpointnew.java

@@ -0,0 +1,80 @@
+package com.gyee.generation.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("WINDTURBINETESTINGPOINTNEW")
+public class Windturbinetestingpointnew extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("MODEL")
+    private String model;
+
+    @TableField("VALUEUNIT")
+    private String valueunit;
+
+    @TableField("ENGLISHNAME")
+    private String englishname;
+
+    @TableField("TYPEID")
+    private String typeid;
+
+    @TableField("MODELID")
+    private String modelid;
+
+    @TableField("MAXVAL")
+    private Double maxval;
+
+    @TableField("MINVAL")
+    private Double minval;
+
+    @TableField("REASONABLEMAXVAL")
+    private Double reasonablemaxval;
+
+    @TableField("REASONABLEMINVAL")
+    private Double reasonableminval;
+
+    @TableField("WINDTURBINEID")
+    private String windturbineid;
+
+    @TableField("UNIFORMCODE")
+    private String uniformcode;
+
+    @TableField("SHORTID")
+    private String shortid;
+
+    @TableField("LONGID")
+    private String longid;
+
+    @TableField("WINDPOWERSTATIONID")
+    private String windpowerstationid;
+
+    @TableField("REALTIMEID")
+    private String realtimeid;
+
+
+}

+ 530 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/AverageAndGeneratingService.java

@@ -0,0 +1,530 @@
+package com.gyee.generation.service;
+
+import com.gyee.common.contant.Contant;
+import com.gyee.common.model.PointData;
+import com.gyee.common.util.DateUtils;
+import com.gyee.generation.init.CacheContext;
+import com.gyee.generation.model.auto.*;
+import com.gyee.generation.util.realtimesource.IEdosUtil;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+/**
+ * @ClassName : AverageAndGeneratingService
+ * @Author : xieshengjie
+ * @Date: 2022/3/22 10:42
+ * @Description : 平均风速,平均功率,SCADA发电量
+ */
+@Service
+public class AverageAndGeneratingService {
+
+    private Date samedayZero;
+    private Date monthFirstZero;
+    private Date yearFirstZero;
+    private Date currentDate;
+    private List<Windpowerstation> wpls;
+    private Map<String, List<Project>> wppromap;
+    private Map<String, List<Line>> prolinemap;
+    private Map<String, List<Windturbine>> linewtmap;
+    private Date tomorrow;
+    private List<Windturbine> wtls;
+    private Map<String, Map<String, Windpowerstationpointnew>> wppointmap;
+    private Map<String, Map<String, Windpowerstationpointnew>> linepointmap;
+    private Map<String, Map<String, Windpowerstationpointnew>> propointmap;
+    private Map<String, Map<String, Windturbinetestingpointnew>> wtpAimap;
+    @Resource
+    private IEdosUtil edosUtil;
+    @Value("${typeOfElectric.direct}")
+    private String direct;
+
+
+    private void init(){
+        samedayZero = DateUtils.getSamedayZero();
+        monthFirstZero = DateUtils.getMonthFirstZero();
+        yearFirstZero = DateUtils.getYearFirstZero();
+        currentDate = DateUtils.getCurrentDate();
+        wpls = CacheContext.wpls;
+        wtls = CacheContext.wtls;
+        wppromap = CacheContext.wppromap;
+        prolinemap = CacheContext.prolinemap;
+        wppointmap = CacheContext.wppointmap;
+        linepointmap = CacheContext.linepointmap;
+        propointmap = CacheContext.propointmap;
+        wtpAimap = CacheContext.wtpAimap;
+        linewtmap = CacheContext.linewtmap;
+        tomorrow = DateUtils.addDays(samedayZero,1);
+    }
+
+    /**
+     * 保存平均风速,平均功率,scada发电量实时计算点
+     * @throws Exception
+     */
+    public  void saveAvespeedAndAvepowerAndScada() throws Exception {
+        init();
+        List<PointData> resultList = new ArrayList<>();
+        String monthbenchPoints = Contant.monthbenchPoints;
+        wpls.stream().forEach(wp->{
+            List<Project> projects = wppromap.get(wp.getId());
+            Map<String, Windpowerstationpointnew> wppointnewmap = wppointmap.get(wp.getId());
+            Windpowerstationpointnew wppointnew = wppointnewmap.get(Contant.RPJFS);
+            Windpowerstationpointnew ywppointnew = wppointnewmap.get(Contant.YPJFS);
+            Windpowerstationpointnew nwppointnew = wppointnewmap.get(Contant.NPJFS);
+            Windpowerstationpointnew powerwppointnew = wppointnewmap.get(Contant.RPJGL);
+            Windpowerstationpointnew ypowerwppointnew = wppointnewmap.get(Contant.YPJGL);
+            Windpowerstationpointnew npowerwppointnew = wppointnewmap.get(Contant.NPJGL);
+            Windpowerstationpointnew fdlwppointnew = wppointnewmap.get(Contant.RFDL);
+            Windpowerstationpointnew yfdlwppointnew = wppointnewmap.get(Contant.YFDL);
+            Windpowerstationpointnew nfdlwppointnew = wppointnewmap.get(Contant.NFDL);
+            Windpowerstationpointnew fnlylwppointnew = wppointnewmap.get(Contant.FNLYL);
+            Windpowerstationpointnew jpeyhlwppointnew = wppointnewmap.get(Contant.JPEYHL);
+            Windpowerstationpointnew jpeyhtwppointnew = wppointnewmap.get(Contant.JPEYHT);
+            Windpowerstationpointnew jybmwppointnew = wppointnewmap.get(Contant.JYBM);
+            Windpowerstationpointnew jyswppointnew = wppointnewmap.get(Contant.JYS);
+
+            List<PointData> projectavespeedList = new ArrayList<>();
+            List<PointData> yprojectavespeedList = new ArrayList<>();
+            List<PointData> nprojectavespeedList = new ArrayList<>();
+            List<PointData> projectavepowerList = new ArrayList<>();
+            List<PointData> yprojectavepowerList = new ArrayList<>();
+            List<PointData> nprojectavepowerList = new ArrayList<>();
+            List<PointData> projectfdlList = new ArrayList<>();
+            List<PointData> projectyfdlList = new ArrayList<>();
+            List<PointData> projectnfdlList = new ArrayList<>();
+            projects.stream().forEach(project -> {
+                List<Line> lines = prolinemap.get(project.getId());
+                Map<String, Windpowerstationpointnew> projectpointnewmap = propointmap.get(project.getId());
+                Windpowerstationpointnew projectpointnew = projectpointnewmap.get(Contant.RPJFS);
+                Windpowerstationpointnew yprojectpointnew = projectpointnewmap.get(Contant.YPJFS);
+                Windpowerstationpointnew nprojectpointnew = projectpointnewmap.get(Contant.NPJFS);
+                Windpowerstationpointnew powerprojectpointnew = projectpointnewmap.get(Contant.RPJGL);
+                Windpowerstationpointnew ypowerprojectpointnew = projectpointnewmap.get(Contant.YPJGL);
+                Windpowerstationpointnew npowerprojectpointnew = projectpointnewmap.get(Contant.NPJGL);
+                Windpowerstationpointnew fdlprojectpointnew = projectpointnewmap.get(Contant.RFDL);
+                Windpowerstationpointnew yfdlprojectpointnew = projectpointnewmap.get(Contant.YFDL);
+                Windpowerstationpointnew nfdlprojectpointnew = projectpointnewmap.get(Contant.NFDL);
+                Windpowerstationpointnew fnlylprojectpointnew = projectpointnewmap.get(Contant.FNLYL);
+
+                Windpowerstationpointnew jpeyhlprojectpointnew = projectpointnewmap.get(Contant.JPEYHL);
+                Windpowerstationpointnew jpeyhtprojectpointnew = projectpointnewmap.get(Contant.JPEYHT);
+                Windpowerstationpointnew jybmprojectpointnew = projectpointnewmap.get(Contant.JYBM);
+                Windpowerstationpointnew jysprojectpointnew = projectpointnewmap.get(Contant.JYS);
+
+                List<PointData> lineavespeedList = new ArrayList<>();
+                List<PointData> ylineavespeedList = new ArrayList<>();
+                List<PointData> nlineavespeedList = new ArrayList<>();
+                List<PointData> lineavepowerList = new ArrayList<>();
+                List<PointData> ylineavepowerList = new ArrayList<>();
+                List<PointData> nlineavepowerList = new ArrayList<>();
+                List<PointData> linefdlList = new ArrayList<>();
+                List<PointData> ylinefdlList = new ArrayList<>();
+                List<PointData> nlinefdlList = new ArrayList<>();
+                lines.stream().forEach(line -> {
+                    List<Windturbine> windturbines = linewtmap.get(line.getId());
+                    Map<String, Windpowerstationpointnew> linepointnewmap = linepointmap.get(line.getId());
+                    Windpowerstationpointnew linepointnew = linepointnewmap.get(Contant.RPJFS);
+                    Windpowerstationpointnew ylinepointnew = linepointnewmap.get(Contant.YPJFS);
+                    Windpowerstationpointnew nlinepointnew = linepointnewmap.get(Contant.NPJFS);
+                    Windpowerstationpointnew linepowerpointnew = linepointnewmap.get(Contant.RPJGL);
+                    Windpowerstationpointnew ylinepowerpointnew = linepointnewmap.get(Contant.YPJGL);
+                    Windpowerstationpointnew nlinepowerpointnew = linepointnewmap.get(Contant.NPJGL);
+                    Windpowerstationpointnew linefdlpointnew = linepointnewmap.get(Contant.RFDL);
+                    Windpowerstationpointnew ylinefdlpointnew = linepointnewmap.get(Contant.YFDL);
+                    Windpowerstationpointnew nlinefdlpointnew = linepointnewmap.get(Contant.NFDL);
+                    Windpowerstationpointnew linefnlylpointnew = linepointnewmap.get(Contant.FNLYL);
+
+                    Windpowerstationpointnew jpeyhlpointnew = linepointnewmap.get(Contant.JPEYHL);
+                    Windpowerstationpointnew jpeyhtpointnew = linepointnewmap.get(Contant.JPEYHT);
+                    Windpowerstationpointnew jybmpointnew = linepointnewmap.get(Contant.JYBM);
+                    Windpowerstationpointnew jyspointnew = linepointnewmap.get(Contant.JYS);
+
+                    List<PointData> wtavespeedList = new ArrayList<>();
+                    List<PointData> ywtavespeedList = new ArrayList<>();
+                    List<PointData> nwtavespeedList = new ArrayList<>();
+                    List<PointData> wtavepowerList = new ArrayList<>();
+                    List<PointData> ywtavepowerList = new ArrayList<>();
+                    List<PointData> nwtavepowerList = new ArrayList<>();
+                    List<PointData> rfdlList = new ArrayList<>();
+                    List<PointData> yfdlList = new ArrayList<>();
+                    List<PointData> nfdlList = new ArrayList<>();
+
+                    windturbines.stream().forEach(wt->{
+                        Map<String, Windturbinetestingpointnew> windturbinetestingpointnewMap = wtpAimap.get(wt.getId());
+                        Windturbinetestingpointnew aveSpeedPoint = windturbinetestingpointnewMap.get(Contant.RPJFS);
+                        Windturbinetestingpointnew monthAveSpeedPoint = windturbinetestingpointnewMap.get(Contant.YPJFS);
+                        Windturbinetestingpointnew yearAveSpeedPoint = windturbinetestingpointnewMap.get(Contant.NPJFS);
+                        Windturbinetestingpointnew fjssfs = windturbinetestingpointnewMap.get(Contant.AI022);
+                        Windturbinetestingpointnew avePowerPoint = windturbinetestingpointnewMap.get(Contant.RPJGL);
+                        Windturbinetestingpointnew yavePowerPoint = windturbinetestingpointnewMap.get(Contant.YPJGL);
+                        Windturbinetestingpointnew navePowerPoint = windturbinetestingpointnewMap.get(Contant.NPJGL);
+                        Windturbinetestingpointnew fjssgl = windturbinetestingpointnewMap.get(Contant.AI130);
+                        Windturbinetestingpointnew ai064 = windturbinetestingpointnewMap.get(Contant.AI064);
+                        Windturbinetestingpointnew fjfdl = windturbinetestingpointnewMap.get(Contant.RFDL);
+                        Windturbinetestingpointnew fjyfdl = windturbinetestingpointnewMap.get(Contant.YFDL);
+                        Windturbinetestingpointnew fjnfdl = windturbinetestingpointnewMap.get(Contant.NFDL);
+                        Windturbinetestingpointnew ai138 = windturbinetestingpointnewMap.get(Contant.AI138);
+                        Windturbinetestingpointnew ai139 = windturbinetestingpointnewMap.get(Contant.AI139);
+                        try {
+                            //算发电量
+                            Double rfdl = 0.0;
+                            Double yfdl = 0.0;
+                            Double nfdl = 0.0;
+                            if (direct.contains(wt.getProjectid())){
+                                rfdl = edosUtil.getSectionData(ai064,tomorrow.getTime()).getPointValueInDouble();
+                                yfdl = edosUtil.getSectionData(ai138,tomorrow.getTime()).getPointValueInDouble();
+                                nfdl = edosUtil.getSectionData(ai139,tomorrow.getTime()).getPointValueInDouble();
+                            }else{
+                                Double currentValue = 0.0;
+                                Double samedayValue = 0.0;
+                                Double monthFirstValue = 0.0;
+                                Double yearFirstValue = 0.0;
+                                PointData realData = edosUtil.getSectionData(ai064,tomorrow.getTime());
+                                currentValue = realData.getPointValueInDouble();
+                                samedayValue = edosUtil.getSectionData(ai064,samedayZero.getTime()).getPointValueInDouble();
+                                monthFirstValue = edosUtil.getSectionData(ai064,monthFirstZero.getTime()).getPointValueInDouble();
+                                yearFirstValue = edosUtil.getSectionData(ai064,yearFirstZero.getTime()).getPointValueInDouble();
+
+                                rfdl = currentValue - samedayValue;
+                                yfdl = currentValue - monthFirstValue;
+                                nfdl = currentValue - yearFirstValue;
+                            }
+                            PointData fdlpointData = createPointData(fjfdl, rfdl);
+                            rfdlList.add(fdlpointData);
+
+                            PointData yfdlpointData = createPointData(fjyfdl, yfdl);
+
+                            yfdlList.add(yfdlpointData);
+
+                            PointData nfdlpointData = createPointData(fjnfdl, nfdl);
+                            yfdlList.add(nfdlpointData);
+                            //算平均风速
+                            List<PointData> ssfsList = edosUtil.getHistStat(fjssfs, samedayZero.getTime() / 1000, currentDate.getTime() / 1000, 1l, null, 2);
+                            Optional<PointData> ssfsFirst = ssfsList.stream().findFirst();
+                            if (ssfsFirst.isPresent()){
+                                PointData pointData = ssfsFirst.get();
+                                double inDouble = pointData.getPointValueInDouble();
+                                createWtPointData(aveSpeedPoint, pointData, inDouble);
+                                wtavespeedList.add(pointData);
+                            }
+                            //算月平均风速
+                            List<PointData> yssfsList = edosUtil.getHistStat(fjssfs, monthFirstZero.getTime() / 1000, currentDate.getTime() / 1000, 1l, null, 2);
+                            Optional<PointData> yssfsFirst = yssfsList.stream().findFirst();
+                            if (yssfsFirst.isPresent()){
+                                PointData pointData = yssfsFirst.get();
+                                double inDouble = pointData.getPointValueInDouble();
+                                createWtPointData(monthAveSpeedPoint, pointData, inDouble);
+                                ywtavespeedList.add(pointData);
+                            }
+                            //算年平均风速
+                            List<PointData> nssfsList = edosUtil.getHistStat(fjssfs, yearFirstZero.getTime() / 1000, currentDate.getTime() / 1000, 1l, null, 2);
+                            Optional<PointData> nssfsFirst = nssfsList.stream().findFirst();
+                            if (nssfsFirst.isPresent()){
+                                PointData pointData = nssfsFirst.get();
+                                double inDouble = pointData.getPointValueInDouble();
+                                createWtPointData(yearAveSpeedPoint, pointData, inDouble);
+                                nwtavespeedList.add(pointData);
+                            }
+                            //算平均功率
+                            List<PointData> ssglList = edosUtil.getHistStat(fjssgl, samedayZero.getTime() / 1000, currentDate.getTime() / 1000, 1l, null, 2);
+                            Optional<PointData> ssglFirst = ssglList.stream().findFirst();
+                            if (ssglFirst.isPresent()){
+                                PointData pointData = ssglFirst.get();
+                                double inDouble = pointData.getPointValueInDouble();
+                                createWtPointData(avePowerPoint, pointData, inDouble);
+                                wtavepowerList.add(pointData);
+                            }
+                            //算月平均功率
+                            List<PointData> yssglList = edosUtil.getHistStat(fjssgl, monthFirstZero.getTime() / 1000, currentDate.getTime() / 1000, 1l, null, 2);
+                            Optional<PointData> yssglFirst = yssglList.stream().findFirst();
+                            if (yssglFirst.isPresent()){
+                                PointData pointData = yssglFirst.get();
+                                double inDouble = pointData.getPointValueInDouble();
+                                createWtPointData(yavePowerPoint, pointData, inDouble);
+                                ywtavepowerList.add(pointData);
+                            }
+                            //算年平均功率
+                            List<PointData> nssglList = edosUtil.getHistStat(fjssgl, yearFirstZero.getTime() / 1000, currentDate.getTime() / 1000, 1l, null, 2);
+                            Optional<PointData> nssglFirst = nssglList.stream().findFirst();
+                            if (nssglFirst.isPresent()){
+                                PointData pointData = nssglFirst.get();
+                                double inDouble = pointData.getPointValueInDouble();
+                                createWtPointData(navePowerPoint, pointData, inDouble);
+                                nwtavepowerList.add(pointData);
+                            }
+
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    });
+                    resultList.addAll(wtavespeedList);
+                    resultList.addAll(ywtavespeedList);
+                    resultList.addAll(nwtavespeedList);
+                    resultList.addAll(wtavepowerList);
+                    resultList.addAll(ywtavepowerList);
+                    resultList.addAll(nwtavepowerList);
+                    resultList.addAll(rfdlList);
+                    resultList.addAll(yfdlList);
+                    resultList.addAll(nfdlList);
+                    double linefdl = rfdlList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+                    double lineyfdl = yfdlList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+                    double linenfdl = nfdlList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+                    PointData fdlpoint = createWpPointData(linefdlpointnew, linefdl);
+                    PointData yfdlpoint = createWpPointData(ylinefdlpointnew, lineyfdl);
+                    PointData nfdlpoint = createWpPointData(nlinefdlpointnew, linenfdl);
+                    linefdlList.add(fdlpoint);
+                    ylinefdlList.add(yfdlpoint);
+                    nlinefdlList.add(nfdlpoint);
+
+                    //算节能减排
+                    double jpeyhl = lineyfdl * 0.0059;
+                    double jpeyht = lineyfdl * 0.8568;
+                    double jybm = lineyfdl * 0.37;
+                    double jys = lineyfdl * 3.05;
+                    PointData jpeyhlpoint = createWpPointData(jpeyhlpointnew, jpeyhl);
+                    PointData jpeyhtpoint = createWpPointData(jpeyhtpointnew, jpeyht);
+                    PointData jybmpoint = createWpPointData(jybmpointnew, jybm);
+                    PointData jyspoint = createWpPointData(jyspointnew, jys);
+                    resultList.add(jpeyhlpoint);
+                    resultList.add(jpeyhtpoint);
+                    resultList.add(jybmpoint);
+                    resultList.add(jyspoint);
+
+                    //算风能利用率
+                    List<String> pointList = new ArrayList<>();
+                    double ssdl = 0;
+                    Arrays.stream(monthbenchPoints.split(",")).forEach(code->{
+                        pointList.add(linepointnewmap.get(code).getCode());
+                    });
+                    try {
+                        List<PointData> ssdlList = edosUtil.getRealData(pointList);
+                        ssdl = ssdlList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                    double fnlyl = (ssdl+lineyfdl)!=0?lineyfdl/(ssdl+lineyfdl):0;
+                    PointData fnlylpoint = createWpPointData(linefnlylpointnew, fnlyl);
+                    resultList.add(fnlylpoint);
+
+                    OptionalDouble average = wtavespeedList.stream().mapToDouble(PointData::getPointValueInDouble).average();
+                    if (average.isPresent()){
+                        double linespeed = average.getAsDouble();
+                        PointData pointData = createWpPointData(linepointnew, linespeed);
+                        lineavespeedList.add(pointData);
+                    }
+                    OptionalDouble yaverage = ywtavespeedList.stream().mapToDouble(PointData::getPointValueInDouble).average();
+                    if (yaverage.isPresent()){
+                        double linespeed = yaverage.getAsDouble();
+                        PointData pointData = createWpPointData(ylinepointnew, linespeed);
+                        ylineavespeedList.add(pointData);
+                    }
+                    OptionalDouble naverage = nwtavespeedList.stream().mapToDouble(PointData::getPointValueInDouble).average();
+                    if (naverage.isPresent()){
+                        double linespeed = naverage.getAsDouble();
+                        PointData pointData = createWpPointData(nlinepointnew, linespeed);
+                        nlineavespeedList.add(pointData);
+                    }
+                    Double poweraverage = wtavepowerList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+                    PointData powerpointData = createWpPointData(linepowerpointnew, poweraverage);
+                    lineavepowerList.add(powerpointData);
+
+                    Double ypoweraverage = ywtavepowerList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+                    PointData ypowerpointData = createWpPointData(ylinepowerpointnew, ypoweraverage);
+                    ylineavepowerList.add(ypowerpointData);
+
+                    Double npoweraverage = nwtavepowerList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+                    PointData npowerpointData = createWpPointData(nlinepowerpointnew, npoweraverage);
+                    nlineavepowerList.add(npowerpointData);
+                });
+                OptionalDouble average = lineavespeedList.stream().mapToDouble(PointData::getPointValueInDouble).average();
+                OptionalDouble yaverage = ylineavespeedList.stream().mapToDouble(PointData::getPointValueInDouble).average();
+                OptionalDouble naverage = nlineavespeedList.stream().mapToDouble(PointData::getPointValueInDouble).average();
+
+                Double prorfdl = linefdlList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+                Double proyfdl = ylinefdlList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+                Double pronfdl = nlinefdlList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+                resultList.addAll(lineavespeedList);
+                resultList.addAll(ylineavespeedList);
+                resultList.addAll(nlineavespeedList);
+                resultList.addAll(lineavepowerList);
+                resultList.addAll(ylineavepowerList);
+                resultList.addAll(nlineavepowerList);
+                resultList.addAll(linefdlList);
+                resultList.addAll(ylinefdlList);
+                resultList.addAll(nlinefdlList);
+
+                //算节能减排
+                double jpeyhl = proyfdl * 0.0059;
+                double jpeyht = proyfdl * 0.8568;
+                double jybm = proyfdl * 0.37;
+                double jys = proyfdl * 3.05;
+                PointData jpeyhlpoint = createWpPointData(jpeyhlprojectpointnew, jpeyhl);
+                PointData jpeyhtpoint = createWpPointData(jpeyhtprojectpointnew, jpeyht);
+                PointData jybmpoint = createWpPointData(jybmprojectpointnew, jybm);
+                PointData jyspoint = createWpPointData(jysprojectpointnew, jys);
+                resultList.add(jpeyhlpoint);
+                resultList.add(jpeyhtpoint);
+                resultList.add(jybmpoint);
+                resultList.add(jyspoint);
+
+                //算风能利用率
+                List<String> pointList = new ArrayList<>();
+                double ssdl = 0;
+                Arrays.stream(monthbenchPoints.split(",")).forEach(code->{
+                    pointList.add(projectpointnewmap.get(code).getCode());
+                });
+                try {
+                    List<PointData> ssdlList = edosUtil.getRealData(pointList);
+                    ssdl = ssdlList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+                double fnlyl = (ssdl+proyfdl)!=0?proyfdl/(ssdl+proyfdl):0;
+                PointData fnlylpoint = createWpPointData(fnlylprojectpointnew, fnlyl);
+                resultList.add(fnlylpoint);
+
+                PointData rfdlpointData = createWpPointData(fdlprojectpointnew, prorfdl);
+                PointData yfdlpointData = createWpPointData(yfdlprojectpointnew, proyfdl);
+                PointData nfdlpointData = createWpPointData(nfdlprojectpointnew, pronfdl);
+                projectfdlList.add(rfdlpointData);
+                projectyfdlList.add(yfdlpointData);
+                projectnfdlList.add(nfdlpointData);
+                if (average.isPresent()){
+                    double projectspeed = average.getAsDouble();
+                    PointData pointData = createWpPointData(projectpointnew, projectspeed);
+                    projectavespeedList.add(pointData);
+                }
+                if (yaverage.isPresent()){
+                    double projectspeed = yaverage.getAsDouble();
+                    PointData pointData = createWpPointData(yprojectpointnew, projectspeed);
+                    yprojectavespeedList.add(pointData);
+                }
+                if (naverage.isPresent()){
+                    double projectspeed = naverage.getAsDouble();
+                    PointData pointData = createWpPointData(nprojectpointnew, projectspeed);
+                    nprojectavespeedList.add(pointData);
+                }
+
+                Double poweraverage = lineavepowerList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+                Double ypoweraverage = ylineavepowerList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+                Double npoweraverage = nlineavepowerList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+                PointData powerpointData = createWpPointData(powerprojectpointnew, poweraverage);
+                projectavepowerList.add(powerpointData);
+                PointData ypowerpointData = createWpPointData(ypowerprojectpointnew, ypoweraverage);
+                yprojectavepowerList.add(ypowerpointData);
+                PointData npowerpointData = createWpPointData(npowerprojectpointnew, npoweraverage);
+                nprojectavepowerList.add(npowerpointData);
+            });
+
+            resultList.addAll(projectfdlList);
+            resultList.addAll(projectyfdlList);
+            resultList.addAll(projectnfdlList);
+            double fcrfdl = projectfdlList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+            PointData fdlpointData = createWpPointData(fdlwppointnew, fcrfdl);
+            resultList.add(fdlpointData);
+
+            double fcyfdl = projectyfdlList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+            PointData yfdlpointData = createWpPointData(yfdlwppointnew, fcyfdl);
+            resultList.add(yfdlpointData);
+
+            //算节能减排
+            double jpeyhl = fcyfdl * 0.0059;
+            double jpeyht = fcyfdl * 0.8568;
+            double jybm = fcyfdl * 0.37;
+            double jys = fcyfdl * 3.05;
+            PointData jpeyhlpoint = createWpPointData(jpeyhlwppointnew, jpeyhl);
+            PointData jpeyhtpoint = createWpPointData(jpeyhtwppointnew, jpeyht);
+            PointData jybmpoint = createWpPointData(jybmwppointnew, jybm);
+            PointData jyspoint = createWpPointData(jyswppointnew, jys);
+            resultList.add(jpeyhlpoint);
+            resultList.add(jpeyhtpoint);
+            resultList.add(jybmpoint);
+            resultList.add(jyspoint);
+            //算风能利用率
+            List<String> pointList = new ArrayList<>();
+            double ssdl = 0;
+            Arrays.stream(monthbenchPoints.split(",")).forEach(code->{
+                pointList.add(wppointnewmap.get(code).getCode());
+            });
+            try {
+                List<PointData> ssdlList = edosUtil.getRealData(pointList);
+                ssdl = ssdlList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            double fnlyl = (ssdl+fcyfdl)!=0?fcyfdl/(ssdl+fcyfdl):0;
+            PointData fnlylpoint = createWpPointData(fnlylwppointnew, fnlyl);
+            resultList.add(fnlylpoint);
+
+            double fcnfdl = projectnfdlList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+            PointData nfdlpointData = createWpPointData(nfdlwppointnew, fcnfdl);
+            resultList.add(nfdlpointData);
+
+            OptionalDouble average = projectavespeedList.stream().mapToDouble(PointData::getPointValueInDouble).average();
+            resultList.addAll(projectavespeedList);
+            if (average.isPresent()){
+                double wpspeed = average.getAsDouble();
+                PointData pointData = createWpPointData(wppointnew, wpspeed);
+                resultList.add(pointData);
+            }
+            OptionalDouble yaverage = yprojectavespeedList.stream().mapToDouble(PointData::getPointValueInDouble).average();
+            resultList.addAll(yprojectavespeedList);
+            if (yaverage.isPresent()){
+                double wpspeed = yaverage.getAsDouble();
+                PointData pointData = createWpPointData(ywppointnew, wpspeed);
+                resultList.add(pointData);
+            }
+            OptionalDouble naverage = nprojectavespeedList.stream().mapToDouble(PointData::getPointValueInDouble).average();
+            resultList.addAll(nprojectavespeedList);
+            if (naverage.isPresent()){
+                double wpspeed = naverage.getAsDouble();
+                PointData pointData = createWpPointData(nwppointnew, wpspeed);
+                resultList.add(pointData);
+            }
+            Double poweraverage = projectavepowerList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+            resultList.addAll(projectavepowerList);
+            PointData powerpointData = createWpPointData(powerwppointnew, poweraverage);
+            resultList.add(powerpointData);
+
+            Double ypoweraverage = yprojectavepowerList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+            resultList.addAll(yprojectavepowerList);
+            PointData ypowerpointData = createWpPointData(ypowerwppointnew, ypoweraverage);
+            resultList.add(ypowerpointData);
+
+            Double npoweraverage = nprojectavepowerList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
+            resultList.addAll(nprojectavepowerList);
+            PointData npowerpointData = createWpPointData(npowerwppointnew, npoweraverage);
+            resultList.add(npowerpointData);
+        });
+        edosUtil.sendMultiPoint(resultList);
+    }
+
+    private PointData createPointData(Windturbinetestingpointnew fjfdl, Double rfdl) {
+        PointData pointData = new PointData();
+        pointData.setEdnaId(fjfdl.getCode());
+        pointData.setPointName(fjfdl.getName());
+        pointData.setPointTime(currentDate.getTime());
+        pointData.setPointValueInDouble(rfdl);
+        pointData.setPointValue(String.valueOf(rfdl));
+        return pointData;
+    }
+
+    private PointData createWpPointData(Windpowerstationpointnew linepointnew, double linespeed) {
+        PointData pointData = new PointData();
+        pointData.setEdnaId(linepointnew.getCode());
+        pointData.setPointTime(currentDate.getTime());
+        pointData.setPointName(linepointnew.getName());
+        pointData.setPointValue(String.valueOf(linespeed));
+        pointData.setPointValueInDouble(linespeed);
+        return pointData;
+    }
+
+    private void createWtPointData(Windturbinetestingpointnew aveSpeedPoint, PointData pointData, double inDouble) {
+        pointData.setEdnaId(aveSpeedPoint.getCode());
+        pointData.setPointName(aveSpeedPoint.getName());
+        pointData.setPointValueInDouble(inDouble);
+        pointData.setPointValue(String.valueOf(inDouble));
+        pointData.setPointTime(currentDate.getTime());
+    }
+}

File diff suppressed because it is too large
+ 1102 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/FiveLossesService.java


+ 690 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/GenerationService.java

@@ -0,0 +1,690 @@
+package com.gyee.generation.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.gyee.common.contant.Contant;
+import com.gyee.common.model.PointData;
+import com.gyee.common.model.StringUtils;
+import com.gyee.common.util.DateUtils;
+import com.gyee.common.util.DoubleUtils;
+import com.gyee.generation.init.CacheContext;
+import com.gyee.generation.model.auto.*;
+import com.gyee.generation.service.auto.IMeterpointvalueService;
+import com.gyee.generation.util.realtimesource.IEdosUtil;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicReference;
+
+/**
+ * @ClassName : GenerationService
+ * @Author : xieshengjie
+ * @Date: 2022/2/28 15:23
+ * @Description :
+ */
+@Service
+public class GenerationService {
+
+   private Log log = LogFactory.getLog(GenerationService.class);
+    @Resource
+    private IEdosUtil edosUtil;
+    @Resource
+    private IMeterpointvalueService meterpointvalueService;
+
+
+    /**
+     * 保存电计量电量,场用电量,购网电量,上网电量
+     * @throws Exception
+     */
+    public void saveGenerationDatas() throws Exception {
+        List<PointData> resultList = new ArrayList<>();
+        List<PointData> fdlList = new ArrayList<>();
+        List<Windpowerstation> wpls = CacheContext.wpls;
+        List<Line> lines = CacheContext.lines;
+        Map<String, List<Project>> wppromap = CacheContext.wppromap;
+        Map<String, List<Line>> prolinemap = CacheContext.prolinemap;
+        List<Meterpoint> meterpoints = CacheContext.meterpoints;
+        Map<String, Map<String, Windpowerstationpointnew>> wppointmap = CacheContext.wppointmap;
+        Map<String, Map<String, Windpowerstationpointnew>> linepointmap = CacheContext.linepointmap;
+        Map<String, Map<String, Windpowerstationpointnew>> propointmap = CacheContext.propointmap;
+        Date samedayZero = DateUtils.getSamedayZero();
+        Date monthFirstZero = DateUtils.getMonthFirstZero();
+        Date yearFirstZero = DateUtils.getYearFirstZero();
+        Date currentDate = DateUtils.getCurrentDate();
+        Date tomorrow = DateUtils.addDays(samedayZero,1);
+
+        lines.stream().forEach(line->{
+            Map<String, Windpowerstationpointnew> linemap = linepointmap.get(line.getId());
+            //线路发电量
+            Optional<Meterpoint> fdlOptional = meterpoints.stream().filter(me -> me.getLineid().equals(line.getId()) &&  me.getUniformcode().equals("ZXYG") && me.getMetertype().equals("进线") && me.getMetersort().equals("主")).findFirst();
+            computeFdl(fdlList, tomorrow,samedayZero, monthFirstZero, yearFirstZero, currentDate, linemap, fdlOptional);
+        });
+        wpls.stream().forEach(wp->{
+            Map<String, Windpowerstationpointnew> wpmap = wppointmap.get(wp.getId());
+            AtomicReference<Double> fcrfdl = new AtomicReference<>((double) 0);
+            AtomicReference<Double> fcyfdl = new AtomicReference<>((double) 0);
+            AtomicReference<Double> fcnfdl = new AtomicReference<>((double) 0);
+            AtomicReference<Double> fcrswdl = new AtomicReference<>((double) 0);
+            AtomicReference<Double> fcyswdl = new AtomicReference<>((double) 0);
+            AtomicReference<Double> fcnswdl = new AtomicReference<>((double) 0);
+            AtomicReference<Double> fcrgwdl = new AtomicReference<>((double) 0);
+            AtomicReference<Double> fcygwdl = new AtomicReference<>((double) 0);
+            AtomicReference<Double> fcngwdl = new AtomicReference<>((double) 0);
+            AtomicReference<Double> fcrcydl = new AtomicReference<>((double) 0);
+            AtomicReference<Double> fcycydl = new AtomicReference<>((double) 0);
+            AtomicReference<Double> fcncydl = new AtomicReference<>((double) 0);
+            wppromap.get(wp.getId()).stream().forEach(project -> {
+                Map<String, Windpowerstationpointnew> projectmap = propointmap.get(project.getId());
+                AtomicReference<Double> qcrfdl = new AtomicReference<>(0.0);
+                AtomicReference<Double> qcyfdl = new AtomicReference<>(0.0);
+                AtomicReference<Double> qcnfdl = new AtomicReference<>(0.0);
+                AtomicReference<Double> qcrswdl = new AtomicReference<>(0.0);
+                AtomicReference<Double> qcyswdl = new AtomicReference<>(0.0);
+                AtomicReference<Double> qcnswdl = new AtomicReference<>(0.0);
+                AtomicReference<Double> qcrgwdl = new AtomicReference<>(0.0);
+                AtomicReference<Double> qcygwdl = new AtomicReference<>(0.0);
+                AtomicReference<Double> qcngwdl = new AtomicReference<>(0.0);
+                AtomicReference<Double> qcrcydl = new AtomicReference<>(0.0);
+                AtomicReference<Double> qcycydl = new AtomicReference<>(0.0);
+                AtomicReference<Double> qcncydl = new AtomicReference<>(0.0);
+                prolinemap.get(project.getId()).stream().forEach(line -> {
+                    Map<String, Windpowerstationpointnew> linemap = linepointmap.get(line.getId());
+                    //线路发电量
+                    Optional<Meterpoint> fdlOptional = meterpoints.stream().filter(me -> me.getLineid().equals(line.getId()) &&   me.getUniformcode().equals("ZXYG") && me.getMetertype().equals("进线") && me.getMetersort().equals("主")).findFirst();
+                    lineFdl(resultList,tomorrow, samedayZero, monthFirstZero, yearFirstZero, currentDate, qcrfdl, qcyfdl, qcnfdl, linemap, fdlOptional);
+                    log.info(line.getName()+"电计量电量计算完毕!");
+                    //线路上网电量
+                    Optional<Meterpoint> swdlOptional= null;
+                    Optional<Meterpoint> gwdlOptional=null;
+                    if (wp.getId().equals("GJY_FDC")){
+                        swdlOptional = meterpoints.stream().filter(me ->   me.getUniformcode().equals("ZXYG") && me.getMetertype().equals("主变高压侧") && me.getMetersort().equals("主") && me.getLineid().contains(line.getId())).findFirst();
+                        gwdlOptional = meterpoints.stream().filter(me ->  me.getUniformcode().equals("FXYG") && me.getMetertype().equals("主变高压侧") && me.getMetersort().equals("主") && me.getLineid().contains(line.getId())).findFirst();
+                    }else{
+                        swdlOptional = meterpoints.stream().filter(me ->   me.getUniformcode().equals("ZXYG") && me.getMetertype().equals("出线") && me.getMetersort().equals("主") && me.getLineid().contains(line.getId())).findFirst();
+                        gwdlOptional = meterpoints.stream().filter(me ->  me.getUniformcode().equals("FXYG") && me.getMetertype().equals("出线") && me.getMetersort().equals("主") && me.getLineid().contains(line.getId())).findFirst();
+                    }
+                     lineOrtherdl(fdlList,tomorrow,resultList, linepointmap, samedayZero, monthFirstZero, yearFirstZero, currentDate, qcrswdl, qcyswdl, qcnswdl, line, linemap, swdlOptional,Contant.SWDLB,Contant.SWDLY,Contant.SWDLN);
+                    log.info(line.getName()+"上网电量计算完毕!");
+                    //线路购网电量
+                    lineOrtherdl(fdlList,tomorrow,resultList, linepointmap, samedayZero, monthFirstZero, yearFirstZero, currentDate, qcrgwdl, qcygwdl, qcngwdl, line, linemap, gwdlOptional,Contant.GWGWB,Contant.GWGWY,Contant.GWGWN);
+                    log.info(line.getName()+"工网购网电量计算完毕!");
+                    //厂用电量
+                    Optional<Meterpoint> zybOptional = meterpoints.stream().filter(me->   me.getUniformcode().equals("ZXYG") && me.getMetertype().equals("站用变") && me.getMetersort().equals("主") && me.getLineid().contains(line.getId())).findFirst();
+                    lineOrtherdl(fdlList,tomorrow,resultList, linepointmap, samedayZero, monthFirstZero, yearFirstZero, currentDate, qcrcydl, qcycydl, qcncydl, line, linemap, zybOptional,Contant.CYDLB,Contant.CYDLY,Contant.CYDLN);
+                    log.info(line.getName()+"场用电量计算完毕!");
+                    //农网购网电量
+                    setZero(resultList,currentDate,linemap,Contant.NWGWB,Contant.NWGWY,Contant.NWGWN);
+                    log.info(line.getName()+"农网购网电量计算完毕!");
+
+                });
+                //期次发电量
+                projectFdl(resultList, currentDate, fcrfdl, fcyfdl, fcnfdl, projectmap, qcrfdl, qcyfdl, qcnfdl);
+                log.info(project.getName()+"发电量计算完毕!");
+                //期次上网电量
+                projectOrther(resultList, currentDate, fcrswdl, fcyswdl, fcnswdl, projectmap, qcrswdl, qcyswdl, qcnswdl,Contant.SWDLB,Contant.SWDLY,Contant.SWDLN);
+                log.info(project.getName()+"上网电量计算完毕!");
+                //期次购网电量
+                projectOrther(resultList, currentDate, fcrgwdl, fcygwdl, fcngwdl, projectmap, qcrgwdl, qcygwdl, qcngwdl,Contant.GWGWB,Contant.GWGWY,Contant.GWGWN);
+                log.info(project.getName()+"工网购网电量计算完毕!");
+                //期次厂用电量
+                projectOrther(resultList, currentDate, fcrcydl, fcycydl, fcncydl, projectmap, qcrcydl, qcycydl, qcncydl,Contant.CYDLB,Contant.CYDLY,Contant.CYDLN);
+                log.info(project.getName()+"场用电量计算完毕!");
+                //期次农网电量
+                setZero(resultList,currentDate,projectmap,Contant.NWGWB,Contant.NWGWY,Contant.NWGWN);
+                log.info(project.getName()+"农网电量计算完毕!");
+
+            });
+            //场站发电量
+            windpowerFdl(resultList, currentDate, wpmap, fcrfdl, fcyfdl, fcnfdl,Contant.RFDLB,Contant.YFDLB,Contant.NFDLB);
+            log.info(wp.getName()+"发电量计算完毕!");
+            //场站上网电量
+            windpowerFdl(resultList, currentDate, wpmap, fcrswdl, fcyswdl, fcnswdl,Contant.SWDLB,Contant.SWDLY,Contant.SWDLN);
+            log.info(wp.getName()+"上网电量计算完毕!");
+            //场站购网电量
+            windpowerFdl(resultList, currentDate, wpmap, fcrgwdl, fcygwdl, fcngwdl,Contant.GWGWB,Contant.GWGWY,Contant.GWGWN);
+            log.info(wp.getName()+"工网购网电量计算完毕!");
+            //场站场用电量
+            windpowerFdl(resultList, currentDate, wpmap, fcrcydl, fcycydl, fcncydl,Contant.CYDLB,Contant.CYDLY,Contant.CYDLN);
+            log.info(wp.getName()+"场用电量计算完毕!");
+            //场站农网电量
+            setZero(resultList,currentDate,wpmap,Contant.NWGWB,Contant.NWGWY,Contant.NWGWN);
+            log.info(wp.getName()+"农网购网电量计算完毕!");
+        });
+
+        edosUtil.sendMultiPoint(resultList);
+    }
+
+    /**
+     * 存储meterpointvalue表
+     * 实时+0点算前一天
+     */
+    public void saveMeterpointValueRealtime(String beginDate,String endDate){
+        List<Meterpoint> meterpoints = CacheContext.meterpoints;
+        List<String> days = DateUtils.getDays(beginDate, endDate);
+        days.stream().forEach(day->{
+            Date samedayZero = DateUtils.getSamedayZero(day);
+            Date monthFirstZero = DateUtils.getMonthFirstZero(day);
+            Date yearFirstZero = DateUtils.getYearFirstZero(day);
+            Date date = DateUtils.addDays(samedayZero, 1);
+            List<Meterpointvalue> resultList = new ArrayList<>();
+            QueryWrapper<Meterpointvalue> qw = new QueryWrapper();
+            qw.eq("recorddate",date);
+            meterpointvalueService.remove(qw);
+            meterpoints.stream().forEach(meterpoint -> {
+                String meterid = meterpoint.getId();
+                Double magnification = meterpoint.getMagnification();
+                Double xs = meterpoint.getXs();
+                Meterpointvalue meterpointvalue = new Meterpointvalue();
+
+                meterpointvalue.setRecorddate(date);
+                meterpointvalue.setMeterid(meterpoint.getId());
+                Double real = 0.0;
+                Double sameday = 0.0;
+                Double month = 0.0;
+                Double year = 0.0;
+                try {
+                    real = edosUtil.getSectionData(meterid,date.getTime()).getPointValueInDouble();
+                    sameday = edosUtil.getSectionData(meterid,samedayZero.getTime()).getPointValueInDouble();
+                    month = edosUtil.getSectionData(meterid,monthFirstZero.getTime()).getPointValueInDouble();
+                    year = edosUtil.getSectionData(meterid,yearFirstZero.getTime()).getPointValueInDouble();
+
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+                meterpointvalue.setYear(DoubleUtils.keepPrecision(year/xs,2));
+                meterpointvalue.setYear4(DoubleUtils.keepPrecision(year/xs,4));
+                meterpointvalue.setMonth(DoubleUtils.keepPrecision(month/xs,2));
+                meterpointvalue.setMonth4(DoubleUtils.keepPrecision(month/xs,4));
+                meterpointvalue.setDay(DoubleUtils.keepPrecision(sameday/xs,2));
+                meterpointvalue.setDay4(DoubleUtils.keepPrecision(sameday/xs,4));
+                meterpointvalue.setNow(DoubleUtils.keepPrecision(real/xs,2));
+                meterpointvalue.setNow4(DoubleUtils.keepPrecision(real/xs,4));
+                Double yearvalue = (real/xs - year/xs) * magnification;
+                Double monthvalue = (real/xs - month/xs) * magnification;
+                Double dayvalue = (real/xs - sameday/xs) * magnification;
+                meterpointvalue.setYearvalue(yearvalue);
+                meterpointvalue.setMonthvalue(monthvalue);
+                meterpointvalue.setDayvalue(dayvalue);
+                resultList.add(meterpointvalue);
+            });
+            meterpointvalueService.saveBatch(resultList);
+        });
+
+
+
+    }
+
+    public void updateMeterpointValueHistory(String beginDate,String endDate){
+        List<Meterpointvalue> resultLsit = new ArrayList<>();
+        Map<String,Meterpoint> meterpointMap = CacheContext.meterpointMap;
+        List<String> days = DateUtils.getDays(beginDate, endDate);
+        days.stream().forEach(day->{
+            Date date = DateUtils.parseDate(beginDate);
+            Date date1 = DateUtils.addDays(date, 1);
+            Date date2= DateUtils.addDays(date1, 1);
+            QueryWrapper<Meterpointvalue> qw = new QueryWrapper<>();
+            qw.eq("recorddate",date1);
+            List<Meterpointvalue> meterpointvalues = meterpointvalueService.list(qw);
+
+            meterpointvalues.stream().forEach(meterpointvalue -> {
+                Meterpoint meterpoint = meterpointMap.get(meterpointvalue.getMeterid());
+                Double magnification = meterpoint.getMagnification();
+                Double xs = meterpoint.getXs();
+                Double real = 0.0;
+
+                try {
+                    real = edosUtil.getSectionData(meterpointvalue.getMeterid(),date1.getTime()).getPointValueInDouble();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+                Double yearvalue = (real/xs - meterpointvalue.getYear4()) * magnification;
+                Double monthvalue = (real/xs - meterpointvalue.getMonth4()) * magnification;
+                Double dayvalue = (real/xs - meterpointvalue.getDay4()) * magnification;
+                meterpointvalue.setNow(DoubleUtils.keepPrecision(real,2));
+                meterpointvalue.setNow4(DoubleUtils.keepPrecision(real,4));
+                meterpointvalue.setYearvalue(yearvalue);
+                meterpointvalue.setMonthvalue(monthvalue);
+                meterpointvalue.setDayvalue(dayvalue);
+                resultLsit.add(meterpointvalue);
+            });
+            meterpointvalueService.saveOrUpdateBatch(resultLsit);
+        });
+    }
+
+
+    private void setGsZero(List<PointData> resultList,Date currentDate,Map<String, Map<String, Windpowerstationpointnew>> linemap,String foreignkeyid,String rcode,String ycode,String ncode) {
+        //线路日发电量
+        PointData r = new PointData();
+        r.setPointTime(currentDate.getTime());
+        r.setPointValue("0");
+        r.setPointValueInDouble(0);
+        r.setEdnaId(linemap.get(foreignkeyid).get(rcode).getCode());
+        r.setPointName(linemap.get(foreignkeyid).get(rcode).getName());
+        resultList.add(r);
+        //线路月发电量
+        PointData y = new PointData();
+        y.setPointTime(currentDate.getTime());
+        y.setPointValue("0");
+        y.setPointValueInDouble(0);
+        y.setEdnaId(linemap.get(foreignkeyid).get(ycode).getCode());
+        y.setPointName(linemap.get(foreignkeyid).get(ycode).getName());
+        resultList.add(y);
+        //线路年发电量
+        PointData n = new PointData();
+        n.setPointTime(currentDate.getTime());
+        n.setPointValue("0");
+        n.setPointValueInDouble(0);
+        n.setEdnaId(linemap.get(foreignkeyid).get(ncode).getCode());
+        n.setPointName(linemap.get(foreignkeyid).get(ncode).getName());
+        resultList.add(n);
+    }
+    private void setZero(List<PointData> resultList,Date currentDate,Map<String, Windpowerstationpointnew> linemap,String rcode,String ycode,String ncode) {
+        //线路日发电量
+        PointData r = new PointData();
+        r.setPointTime(currentDate.getTime());
+        r.setPointValue("0");
+        r.setPointValueInDouble(0);
+        r.setEdnaId(linemap.get(rcode).getCode());
+        r.setPointName(linemap.get(rcode).getName());
+        resultList.add(r);
+        //线路月发电量
+        PointData y = new PointData();
+        y.setPointTime(currentDate.getTime());
+        y.setPointValue("0");
+        y.setPointValueInDouble(0);
+        y.setEdnaId(linemap.get(ycode).getCode());
+        y.setPointName(linemap.get(ycode).getName());
+        resultList.add(y);
+        //线路年发电量
+        PointData n = new PointData();
+        n.setPointTime(currentDate.getTime());
+        n.setPointValue("0");
+        n.setPointValueInDouble(0);
+        n.setEdnaId(linemap.get(ncode).getCode());
+        n.setPointName(linemap.get(ncode).getName());
+        resultList.add(n);
+    }
+
+    private Map<String,Double> getPercentage(List<PointData> fdlList,Meterpoint swdlMeterpoint,List<PointData> resultList,Map<String, Map<String, Windpowerstationpointnew>> linepointmap,Line line){
+
+        Map<String,Double> percentageMap = new HashMap<>();
+        String[] swdlLines = swdlMeterpoint.getLineid().split("\\|");
+        AtomicReference<Double> xldl = new AtomicReference<>((double) 0);
+        AtomicReference<Double> xlzdl = new AtomicReference<>((double) 0);
+        AtomicReference<Double> xlydl = new AtomicReference<>((double) 0);
+        AtomicReference<Double> xlzydl = new AtomicReference<>((double) 0);
+        AtomicReference<Double> xlndl = new AtomicReference<>((double) 0);
+        AtomicReference<Double> xlzndl = new AtomicReference<>((double) 0);
+        Arrays.stream(swdlLines).forEach(l->{
+            Optional<PointData> xldlfirst = fdlList.stream().filter(res -> res.getEdnaId().equals(linepointmap.get(l).get(Contant.RFDLB).getCode())).findFirst();
+            if (xldlfirst.isPresent()){
+                if (l.equals(line.getId())){
+                    xldl.set(xldlfirst.get().getPointValueInDouble());
+                    xlzdl.updateAndGet(v -> new Double((double) (v + xldlfirst.get().getPointValueInDouble())));
+                }else{
+                    xlzdl.updateAndGet(v -> new Double((double) (v + xldlfirst.get().getPointValueInDouble())));
+                }
+            }
+            Optional<PointData> xlydlfirst = fdlList.stream().filter(res -> res.getEdnaId().equals(linepointmap.get(l).get(Contant.YFDLB).getCode())).findFirst();
+            if (xlydlfirst.isPresent()){
+                if (l.equals(line.getId())){
+                    xlydl.set(xlydlfirst.get().getPointValueInDouble());
+                    xlzydl.updateAndGet(v -> new Double((double) (v + xlydlfirst.get().getPointValueInDouble())));
+                }else{
+                    xlzydl.updateAndGet(v -> new Double((double) (v + xlydlfirst.get().getPointValueInDouble())));
+                }
+            }
+            Optional<PointData> xlndlfirst = fdlList.stream().filter(res -> res.getEdnaId().equals(linepointmap.get(l).get(Contant.NFDLB).getCode())).findFirst();
+            if (xlndlfirst.isPresent()){
+                if (l.equals(line.getId())){
+                    xlndl.set(xlndlfirst.get().getPointValueInDouble());
+                    xlzndl.updateAndGet(v -> new Double((double) (v + xlndlfirst.get().getPointValueInDouble())));
+                }else{
+                    xlzndl.updateAndGet(v -> new Double((double) (v + xlndlfirst.get().getPointValueInDouble())));
+                }
+            }
+        });
+        //电量百分比
+        double percentage = xlzdl.get() != 0 ? xldl.get() / xlzdl.get() * 100 : 0;
+        percentageMap.put("percentage",percentage);
+        double ypercentage = xlzydl.get() != 0 ? xlydl.get() / xlzydl.get() * 100 : 0;
+        percentageMap.put("ypercentage",ypercentage);
+        double npercentage = xlzndl.get() != 0 ? xlndl.get() / xlzndl.get() * 100 : 0;
+        percentageMap.put("npercentage",npercentage);
+        return percentageMap;
+    }
+    private void lineOrtherdl(List<PointData> fdlList,Date tomorrow,List<PointData> resultList, Map<String, Map<String, Windpowerstationpointnew>> linepointmap, Date samedayZero, Date monthFirstZero, Date yearFirstZero, Date currentDate, AtomicReference<Double> qcrswdl, AtomicReference<Double> qcyswdl, AtomicReference<Double> qcnswdl, Line line, Map<String, Windpowerstationpointnew> linemap, Optional<Meterpoint> optionalMeterpoint,String rcode,String ycode,String ncode) {
+        if (optionalMeterpoint.isPresent()){
+            Meterpoint swdlMeterpoint = optionalMeterpoint.get();
+            //获取电量百分比,算其他电量
+            Map<String, Double> percentageMap = getPercentage(fdlList,swdlMeterpoint, resultList, linepointmap, line);
+
+            String pointid = swdlMeterpoint.getId();
+            Double real = 0.0;
+            Double sameday = 0.0;
+            Double month = 0.0;
+            Double year = 0.0;
+            try {
+                real = edosUtil.getSectionData(pointid,tomorrow.getTime()).getPointValueInDouble();
+                sameday = edosUtil.getSectionData(pointid,samedayZero.getTime()).getPointValueInDouble();
+                month = edosUtil.getSectionData(pointid,monthFirstZero.getTime()).getPointValueInDouble();
+                year = edosUtil.getSectionData(pointid,yearFirstZero.getTime()).getPointValueInDouble();
+
+                Double magnification = optionalMeterpoint.get().getMagnification();
+                Double xs = optionalMeterpoint.get().getXs();
+
+                double xlswdl = (real - sameday) * magnification / xs * percentageMap.get("percentage");
+                qcrswdl.updateAndGet(v -> new Double((double) (v + xlswdl)));
+                //线路上网电量
+                PointData r = new PointData();
+                r.setPointTime(currentDate.getTime());
+                r.setPointValue(String.valueOf(xlswdl));
+                r.setPointValueInDouble(xlswdl);
+                r.setEdnaId(linemap.get(rcode).getCode());
+                r.setPointName(linemap.get(rcode).getName());
+                resultList.add(r);
+                //线路月上网发电量
+                double xlyswdl = (real - month) * magnification / xs * percentageMap.get("ypercentage");
+                qcyswdl.updateAndGet(v -> new Double((double) (v + xlyswdl)));
+                PointData y = new PointData();
+                y.setPointTime(currentDate.getTime());
+                y.setPointValue(String.valueOf(xlyswdl));
+                y.setPointValueInDouble(xlyswdl);
+                y.setEdnaId(linemap.get(ycode).getCode());
+                y.setPointName(linemap.get(ycode).getName());
+                resultList.add(y);
+                //线路年上网发电量
+                double xlnswfdl = (real - year) * magnification / xs * percentageMap.get("npercentage");
+                qcnswdl.updateAndGet(v -> new Double((double) (v + xlnswfdl)));
+                PointData n = new PointData();
+                n.setPointTime(currentDate.getTime());
+                n.setPointValue(String.valueOf(xlnswfdl));
+                n.setPointValueInDouble(xlnswfdl);
+                n.setEdnaId(linemap.get(ncode).getCode());
+                n.setPointName(linemap.get(ncode).getName());
+                resultList.add(n);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+    private void computeFdl(List<PointData> fdlList, Date tomorrow,Date samedayZero, Date monthFirstZero, Date yearFirstZero, Date currentDate, Map<String, Windpowerstationpointnew> linemap, Optional<Meterpoint> fdlOptional) {
+        if (fdlOptional.isPresent()){
+            String pointid = fdlOptional.get().getId();
+            Double real = 0.0;
+            Double sameday = 0.0;
+            Double month = 0.0;
+            Double year = 0.0;
+            try {
+                real = edosUtil.getSectionData(pointid,tomorrow.getTime()).getPointValueInDouble();
+                sameday = edosUtil.getSectionData(pointid,samedayZero.getTime()).getPointValueInDouble();
+                month = edosUtil.getSectionData(pointid,monthFirstZero.getTime()).getPointValueInDouble();
+                year = edosUtil.getSectionData(pointid,yearFirstZero.getTime()).getPointValueInDouble();
+
+                Double magnification = fdlOptional.get().getMagnification();
+                Double xs = fdlOptional.get().getXs();
+                double xlrfdl = (real - sameday) * magnification / xs;
+                //线路日发电量
+                PointData r = new PointData();
+                r.setPointTime(currentDate.getTime());
+                r.setPointValue(String.valueOf(xlrfdl));
+                r.setPointValueInDouble(xlrfdl);
+                r.setEdnaId(linemap.get(Contant.RFDLB).getCode());
+                r.setPointName(linemap.get(Contant.RFDLB).getName());
+                fdlList.add(r);
+                //线路月发电量
+                double xlyfdl = (real - month) * magnification / xs;
+                PointData y = new PointData();
+                y.setPointTime(currentDate.getTime());
+                y.setPointValue(String.valueOf(xlyfdl));
+                y.setPointValueInDouble(xlyfdl);
+                y.setEdnaId(linemap.get(Contant.YFDLB).getCode());
+                y.setPointName(linemap.get(Contant.YFDLB).getName());
+                fdlList.add(y);
+                //线路年发电量
+                double xlnfdl = (real - year) * magnification / xs;
+                PointData n = new PointData();
+                n.setPointTime(currentDate.getTime());
+                n.setPointValue(String.valueOf(xlnfdl));
+                n.setPointValueInDouble(xlnfdl);
+                n.setEdnaId(linemap.get(Contant.NFDLB).getCode());
+                n.setPointName(linemap.get(Contant.NFDLB).getName());
+                fdlList.add(n);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    private void lineFdl(List<PointData> resultList, Date tomorrow,Date samedayZero, Date monthFirstZero, Date yearFirstZero, Date currentDate, AtomicReference<Double> qcrfdl, AtomicReference<Double> qcyfdl, AtomicReference<Double> qcnfdl, Map<String, Windpowerstationpointnew> linemap, Optional<Meterpoint> optionalMeterpoint) {
+        if (optionalMeterpoint.isPresent()){
+            String pointid = optionalMeterpoint.get().getId();
+            Double real = 0.0;
+            Double sameday = 0.0;
+            Double month = 0.0;
+            Double year = 0.0;
+            try {
+                real = edosUtil.getSectionData(pointid,tomorrow.getTime()).getPointValueInDouble();
+                sameday = edosUtil.getSectionData(pointid,samedayZero.getTime()).getPointValueInDouble();
+                month = edosUtil.getSectionData(pointid,monthFirstZero.getTime()).getPointValueInDouble();
+                year = edosUtil.getSectionData(pointid,yearFirstZero.getTime()).getPointValueInDouble();
+
+                Double magnification = optionalMeterpoint.get().getMagnification();
+                Double xs = optionalMeterpoint.get().getXs();
+                double xlrfdl = (real - sameday) * magnification / xs;
+                qcrfdl.updateAndGet(v -> new Double((double) (v + xlrfdl)));
+                //线路日发电量
+                PointData r = new PointData();
+                r.setPointTime(currentDate.getTime());
+                r.setPointValue(String.valueOf(xlrfdl));
+                r.setPointValueInDouble(xlrfdl);
+                r.setEdnaId(linemap.get(Contant.RFDLB).getCode());
+                r.setPointName(linemap.get(Contant.RFDLB).getName());
+                resultList.add(r);
+                //线路月发电量
+                double xlyfdl = (real - month) * magnification / xs;
+                qcyfdl.updateAndGet(v -> new Double((double) (v + xlyfdl)));
+                PointData y = new PointData();
+                y.setPointTime(currentDate.getTime());
+                y.setPointValue(String.valueOf(xlyfdl));
+                y.setPointValueInDouble(xlyfdl);
+                y.setEdnaId(linemap.get(Contant.YFDLB).getCode());
+                y.setPointName(linemap.get(Contant.YFDLB).getName());
+                resultList.add(y);
+                //线路年发电量
+                double xlnfdl = (real - year) * magnification / xs;
+                qcnfdl.updateAndGet(v -> new Double((double) (v + xlnfdl)));
+                PointData n = new PointData();
+                n.setPointTime(currentDate.getTime());
+                n.setPointValue(String.valueOf(xlnfdl));
+                n.setPointValueInDouble(xlnfdl);
+                n.setEdnaId(linemap.get(Contant.NFDLB).getCode());
+                n.setPointName(linemap.get(Contant.NFDLB).getName());
+                resultList.add(n);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+
+
+    private void windpowerFdl(List<PointData> resultList, Date currentDate, Map<String, Windpowerstationpointnew> wpmap, AtomicReference<Double> fcrswdl, AtomicReference<Double> fcyswdl, AtomicReference<Double> fcnswdl,String rcode,String ycode,String ncode) {
+        //风场日上网发电量
+        PointData r = new PointData();
+        r.setPointTime(currentDate.getTime());
+        r.setPointValue(String.valueOf(fcrswdl.get()));
+        r.setPointValueInDouble(fcrswdl.get());
+        r.setEdnaId(wpmap.get(rcode).getCode());
+        r.setPointName(wpmap.get(rcode).getName());
+        resultList.add(r);
+        //风场月上网发电量
+        PointData y = new PointData();
+        y.setPointTime(currentDate.getTime());
+        y.setPointValue(String.valueOf(fcyswdl.get()));
+        y.setPointValueInDouble(fcyswdl.get());
+        y.setEdnaId(wpmap.get(ycode).getCode());
+        y.setPointName(wpmap.get(ycode).getName());
+        resultList.add(y);
+        //风场年上网发电量
+        PointData n = new PointData();
+        n.setPointTime(currentDate.getTime());
+        n.setPointValue(String.valueOf(fcnswdl.get()));
+        n.setPointValueInDouble(fcnswdl.get());
+        n.setEdnaId(wpmap.get(ncode).getCode());
+        n.setPointName(wpmap.get(ncode).getName());
+        resultList.add(n);
+    }
+
+    private void qygsFdl(List<PointData> resultList, Map<String, Map<String, Windpowerstationpointnew>> wppointmap, Date currentDate, Double gsrfdl, Double gsyfdl, Double gsnfdl, AtomicReference<Double> fdrfdl, AtomicReference<Double> fdyfdl, AtomicReference<Double> fdnfdl, AtomicReference<Double> gfrfdl, AtomicReference<Double> gfyfdl, AtomicReference<Double> gfnfdl, String rcode, String ycode, String ncode) {
+        if (StringUtils.isNotEmpty(wppointmap.get("-1"))){
+            PointData fdr = new PointData();
+            fdr.setPointTime(currentDate.getTime());
+            fdr.setPointValue(String.valueOf(fdrfdl.get()));
+            fdr.setPointValueInDouble(fdrfdl.get());
+            fdr.setEdnaId(wppointmap.get("-1").get(rcode).getCode());
+            fdr.setPointName(wppointmap.get("-1").get(rcode).getName());
+            resultList.add(fdr);
+            //风电月发电量
+            PointData fdy = new PointData();
+            fdy.setPointTime(currentDate.getTime());
+            fdy.setPointValue(String.valueOf(fdyfdl.get()));
+            fdy.setPointValueInDouble(fdyfdl.get());
+            fdy.setEdnaId(wppointmap.get("-1").get(ycode).getCode());
+            fdy.setPointName(wppointmap.get("-1").get(ycode).getName());
+            resultList.add(fdy);
+            //风电年发电量
+            PointData fdn = new PointData();
+            fdn.setPointTime(currentDate.getTime());
+            fdn.setPointValue(String.valueOf(fdnfdl.get()));
+            fdn.setPointValueInDouble(fdnfdl.get());
+            fdn.setEdnaId(wppointmap.get("-1").get(ncode).getCode());
+            fdn.setPointName(wppointmap.get("-1").get(ncode).getName());
+            resultList.add(fdn);
+        }
+        if (StringUtils.isNotEmpty(wppointmap.get("-2"))){
+            //光伏日发电量
+            PointData gfr = new PointData();
+            gfr.setPointTime(currentDate.getTime());
+            gfr.setPointValue(String.valueOf(gfrfdl.get()));
+            gfr.setPointValueInDouble(gfrfdl.get());
+            gfr.setEdnaId(wppointmap.get("-2").get(rcode).getCode());
+            gfr.setPointName(wppointmap.get("-2").get(rcode).getName());
+            resultList.add(gfr);
+            //光伏月发电量
+            PointData gfy = new PointData();
+            gfy.setPointTime(currentDate.getTime());
+            gfy.setPointValue(String.valueOf(gfyfdl.get()));
+            gfy.setPointValueInDouble(gfyfdl.get());
+            gfy.setEdnaId(wppointmap.get("-2").get(ycode).getCode());
+            gfy.setPointName(wppointmap.get("-2").get(ycode).getName());
+            resultList.add(gfy);
+            //光伏年发电量
+            PointData gfn = new PointData();
+            gfn.setPointTime(currentDate.getTime());
+            gfn.setPointValue(String.valueOf(gfnfdl.get()));
+            gfn.setPointValueInDouble(gfnfdl.get());
+            gfn.setEdnaId(wppointmap.get("-2").get(ncode).getCode());
+            gfn.setPointName(wppointmap.get("-2").get(ncode).getName());
+            resultList.add(gfn);
+        }
+
+        //风场日发电量
+        gsrfdl = fdrfdl.get()+gfrfdl.get();
+        gsyfdl = fdyfdl.get()+gfyfdl.get();
+        gsnfdl = fdnfdl.get()+gfnfdl.get();
+        PointData r = new PointData();
+        r.setPointTime(currentDate.getTime());
+        r.setPointValue(String.valueOf(gsrfdl));
+        r.setPointValueInDouble(gsrfdl);
+        r.setEdnaId(wppointmap.get("0").get(rcode).getCode());
+        r.setPointName(wppointmap.get("0").get(rcode).getName());
+        resultList.add(r);
+        //风场月发电量
+        PointData y = new PointData();
+        y.setPointTime(currentDate.getTime());
+        y.setPointValue(String.valueOf(gsyfdl));
+        y.setPointValueInDouble(gsyfdl);
+        y.setEdnaId(wppointmap.get("0").get(ycode).getCode());
+        y.setPointName(wppointmap.get("0").get(ycode).getName());
+        resultList.add(y);
+        //风场年发电量
+        PointData n = new PointData();
+        n.setPointTime(currentDate.getTime());
+        n.setPointValue(String.valueOf(gsnfdl));
+        n.setPointValueInDouble(gsnfdl);
+        n.setEdnaId(wppointmap.get("0").get(ncode).getCode());
+        n.setPointName(wppointmap.get("0").get(ncode).getName());
+        resultList.add(n);
+    }
+
+
+
+
+    private void projectOrther(List<PointData> resultList, Date currentDate, AtomicReference<Double> fcrswdl, AtomicReference<Double> fcyswdl, AtomicReference<Double> fcnswdl, Map<String, Windpowerstationpointnew> projectmap, AtomicReference<Double> qcrswdl, AtomicReference<Double> qcyswdl, AtomicReference<Double> qcnswdl,String rcode,String ycode,String ncode) {
+        //-------------------------------------------期次上网电量
+        fcrswdl.updateAndGet(v -> new Double((double) (v + qcrswdl.get())));
+        //期次日上网发电量
+        PointData r = new PointData();
+        r.setPointTime(currentDate.getTime());
+        r.setPointValue(String.valueOf(qcrswdl.get()));
+        r.setPointValueInDouble(qcrswdl.get());
+        r.setEdnaId(projectmap.get(rcode).getCode());
+        r.setPointName(projectmap.get(rcode).getName());
+        resultList.add(r);
+        fcyswdl.updateAndGet(v -> new Double((double) (v + qcyswdl.get())));
+        //期次月上网发电量
+        PointData y = new PointData();
+        y.setPointTime(currentDate.getTime());
+        y.setPointValue(String.valueOf(qcyswdl.get()));
+        y.setPointValueInDouble(qcyswdl.get());
+        y.setEdnaId(projectmap.get(ycode).getCode());
+        y.setPointName(projectmap.get(ycode).getName());
+        resultList.add(y);
+        fcnswdl.updateAndGet(v -> new Double((double) (v + qcnswdl.get())));
+        //期次年上网发电量
+        PointData n = new PointData();
+        n.setPointTime(currentDate.getTime());
+        n.setPointValue(String.valueOf(qcnswdl.get()));
+        n.setPointValueInDouble(qcnswdl.get());
+        n.setEdnaId(projectmap.get(ncode).getCode());
+        n.setPointName(projectmap.get(ncode).getName());
+        resultList.add(n);
+    }
+
+    private void projectFdl(List<PointData> resultList, Date currentDate, AtomicReference<Double> fcrfdl, AtomicReference<Double> fcyfdl, AtomicReference<Double> fcnfdl, Map<String, Windpowerstationpointnew> projectmap, AtomicReference<Double> qcrfdl, AtomicReference<Double> qcyfdl, AtomicReference<Double> qcnfdl) {
+        //-------------------------------------------期次发电量
+        fcrfdl.updateAndGet(v -> new Double((double) (v + qcrfdl.get())));
+        //期次日发电量
+        PointData r = new PointData();
+        r.setPointTime(currentDate.getTime());
+        r.setPointValue(String.valueOf(qcrfdl.get()));
+        r.setPointValueInDouble(qcrfdl.get());
+        r.setEdnaId(projectmap.get(Contant.RFDLB).getCode());
+        r.setPointName(projectmap.get(Contant.RFDLB).getName());
+        resultList.add(r);
+        fcyfdl.updateAndGet(v -> new Double((double) (v + qcyfdl.get())));
+        //期次月发电量
+        PointData y = new PointData();
+        y.setPointTime(currentDate.getTime());
+        y.setPointValue(String.valueOf(qcyfdl.get()));
+        y.setPointValueInDouble(qcyfdl.get());
+        y.setEdnaId(projectmap.get(Contant.YFDLB).getCode());
+        y.setPointName(projectmap.get(Contant.YFDLB).getName());
+        resultList.add(y);
+        fcnfdl.updateAndGet(v -> new Double((double) (v + qcnfdl.get())));
+        //期次年发电量
+        PointData n = new PointData();
+        n.setPointTime(currentDate.getTime());
+        n.setPointValue(String.valueOf(qcnfdl.get()));
+        n.setPointValueInDouble(qcnfdl.get());
+        n.setEdnaId(projectmap.get(Contant.NFDLB).getCode());
+        n.setPointName(projectmap.get(Contant.NFDLB).getName());
+        resultList.add(n);
+    }
+
+
+
+}

+ 151 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/RealtimeSpeedPowerService.java

@@ -0,0 +1,151 @@
+package com.gyee.generation.service;
+
+import com.gyee.common.contant.Contant;
+import com.gyee.common.model.PointData;
+import com.gyee.common.util.DateUtils;
+import com.gyee.generation.init.CacheContext;
+import com.gyee.generation.model.auto.*;
+import com.gyee.generation.util.realtimesource.IEdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
+
+/**
+ * @ClassName : RealtimeSpeedPowerService
+ * @Author : xieshengjie
+ * @Date: 2022/4/24 8:49
+ * @Description : 场站实时风速,实时功率
+ */
+@Service
+public class RealtimeSpeedPowerService {
+    @Resource
+    private IEdosUtil edosUtil;
+    private List<Windpowerstation> wpls;
+    private Map<String, List<Project>> wppromap;
+    private Map<String, List<Line>> prolinemap;
+    private Map<String, List<Windturbine>> linewtmap;
+    private Date currentDate;
+    private Map<String, Map<String, Windpowerstationpointnew>> wppointmap;
+    private Map<String, Map<String, Windpowerstationpointnew>> linepointmap;
+    private Map<String, Map<String, Windpowerstationpointnew>> propointmap;
+    private Map<String, Map<String, Windturbinetestingpointnew>> wtpAimap;
+
+    private void init(){
+        wpls = CacheContext.wpls;
+        wppromap = CacheContext.wppromap;
+        prolinemap = CacheContext.prolinemap;
+        linewtmap = CacheContext.linewtmap;
+        wppointmap = CacheContext.wppointmap;
+        linepointmap = CacheContext.linepointmap;
+        propointmap = CacheContext.propointmap;
+        wtpAimap = CacheContext.wtpAimap;
+        currentDate = DateUtils.getCurrentDate();
+    }
+
+    /**
+     * 计算场站实时风速功率
+     */
+    public void calculateRealtimeSpeedPower() throws Exception {
+        init();
+        List<PointData> resultList = new ArrayList<>();
+
+        wpls.stream().forEach(wp->{
+            AtomicReference<Double> wpSpeed = new AtomicReference<>(0.0);
+            AtomicReference<Double> wpPower = new AtomicReference<>(0.0);
+            Map<String, Windpowerstationpointnew> wppointnewMap = wppointmap.get(wp.getId());
+            Windpowerstationpointnew wpspeedpointnew = wppointnewMap.get(Contant.SSFS);
+            Windpowerstationpointnew wppowerpointnew = wppointnewMap.get(Contant.SSZGL);
+            AtomicReference<Double> wpcount = new AtomicReference<>(0.0);
+            wppromap.get(wp.getId()).stream().forEach(project -> {
+                AtomicReference<Double> projectSpeed = new AtomicReference<>(0.0);
+                AtomicReference<Double> projectPower = new AtomicReference<>(0.0);
+                Map<String, Windpowerstationpointnew> propointnewMap = propointmap.get(project.getId());
+                Windpowerstationpointnew prospeedpointnew = propointnewMap.get(Contant.SSFS);
+                Windpowerstationpointnew propowerpointnew = propointnewMap.get(Contant.SSZGL);
+                AtomicReference<Double> procount = new AtomicReference<>(0.0);
+                prolinemap.get(project.getId()).stream().forEach(line->{
+                    AtomicReference<Double> lineSpeed = new AtomicReference<>(0.0);
+                    AtomicReference<Double> linePower = new AtomicReference<>(0.0);
+                    Map<String, Windpowerstationpointnew> linepointnewMap = linepointmap.get(line.getId());
+                    Windpowerstationpointnew linespeedpointnew = linepointnewMap.get(Contant.SSFS);
+                    Windpowerstationpointnew linepowerpointnew = linepointnewMap.get(Contant.SSZGL);
+                    AtomicReference<Double> count = new AtomicReference<>(0.0);
+                    linewtmap.get(line.getId()).stream().forEach(wt->{
+                        Map<String, Windturbinetestingpointnew> windturbinetestingpointnewMap = wtpAimap.get(wt.getId());
+                        Windturbinetestingpointnew speedpoint = windturbinetestingpointnewMap.get(Contant.AI022);
+                        Windturbinetestingpointnew powerpoint = windturbinetestingpointnewMap.get(Contant.AI130);
+                        Windturbinetestingpointnew ztpoint = windturbinetestingpointnewMap.get(Contant.ZTMX);
+                        Boolean isOffline = false;
+                        try {
+                            Double ztvalue  = edosUtil.getRealData(ztpoint).getPointValueInDouble();
+                            if (ztvalue == 12.0){
+                                isOffline = true;
+                            }
+                            if (! isOffline){
+                                count.getAndSet(count.get() + 1);
+                                procount.getAndSet(procount.get() + 1);
+                                wpcount.getAndSet(wpcount.get() + 1);
+                                Double wtspeed = 0.0;
+                                Double wtpower = 0.0;
+                                try {
+                                    wtspeed = edosUtil.getRealData(speedpoint).getPointValueInDouble();
+                                    Double finalWtspeed = wtspeed;
+                                    lineSpeed.updateAndGet(v -> new Double((double) (v + finalWtspeed)));
+                                    projectSpeed.updateAndGet(v -> new Double((double) (v + finalWtspeed)));
+                                    wpSpeed.updateAndGet(v -> new Double((double) (v + finalWtspeed)));
+
+                                    wtpower = edosUtil.getRealData(powerpoint).getPointValueInDouble();
+                                    Double finalWtpower = wtpower;
+                                    linePower.updateAndGet(v -> new Double((double) (v + finalWtpower)));
+                                    projectPower.updateAndGet(v -> new Double((double) (v + finalWtpower)));
+                                    wpPower.updateAndGet(v -> new Double((double) (v + finalWtpower)));
+                                } catch (Exception e) {
+                                    e.printStackTrace();
+                                }
+                            }
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+
+                    });
+                    Double linespeedvalue = count.get()!=0 ? lineSpeed.get()/count.get() : 0.0;
+                    PointData linespeedPointData = createWpPointData(linespeedpointnew, linespeedvalue);
+                    PointData linepowerPointData = createWpPointData(linepowerpointnew, linePower.get());
+                    resultList.add(linespeedPointData);
+                    resultList.add(linepowerPointData);
+                });
+
+                Double projectspeedvalue = procount.get()!=0 ? projectSpeed.get()/procount.get() : 0.0;
+                PointData projectspeedPointData = createWpPointData(prospeedpointnew, projectspeedvalue);
+                PointData projectpowerPointData = createWpPointData(propowerpointnew, projectPower.get());
+                resultList.add(projectspeedPointData);
+                resultList.add(projectpowerPointData);
+            });
+
+            Double wpspeedvalue = wpcount.get()!=0 ? wpSpeed.get()/wpcount.get() : 0.0;
+            PointData wpspeedPointData = createWpPointData(wpspeedpointnew, wpspeedvalue);
+            PointData wppowerPointData = createWpPointData(wppowerpointnew, wpPower.get());
+            resultList.add(wpspeedPointData);
+            resultList.add(wppowerPointData);
+
+        });
+        edosUtil.sendMultiPoint(resultList);
+
+
+    }
+
+    private PointData createWpPointData(Windpowerstationpointnew linepointnew, double linespeed) {
+        PointData pointData = new PointData();
+        pointData.setEdnaId(linepointnew.getCode());
+        pointData.setPointTime(currentDate.getTime());
+        pointData.setPointName(linepointnew.getName());
+        pointData.setPointValue(String.valueOf(linespeed));
+        pointData.setPointValueInDouble(linespeed);
+        return pointData;
+    }
+}

+ 82 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/SafetyService.java

@@ -0,0 +1,82 @@
+package com.gyee.generation.service;
+
+import com.gyee.common.contant.Contant;
+import com.gyee.common.model.PointData;
+import com.gyee.common.util.DateUtils;
+import com.gyee.generation.init.CacheContext;
+import com.gyee.generation.model.auto.Line;
+import com.gyee.generation.model.auto.Project;
+import com.gyee.generation.model.auto.Windpowerstation;
+import com.gyee.generation.model.auto.Windpowerstationpointnew;
+import com.gyee.generation.util.realtimesource.IEdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : SafetyService
+ * @Author : xieshengjie
+ * @Date: 2022/5/30 15:10
+ * @Description : 安全天数
+ */
+@Service
+public class SafetyService {
+    @Resource
+    private IEdosUtil edosUtil;
+
+    private Date currentDate;
+
+    public void safetyReatimel() throws Exception {
+        List<PointData> resultList = new ArrayList<>();
+        List<Windpowerstation> wpls = CacheContext.wpls;
+        Map<String, Map<String, Windpowerstationpointnew>> wppointmap = CacheContext.wppointmap;
+        Map<String, Map<String, Windpowerstationpointnew>> propointmap = CacheContext.propointmap;
+        Map<String, List<Project>> wppromap = CacheContext.wppromap;
+        Map<String, Map<String, Windpowerstationpointnew>> linepointmap = CacheContext.linepointmap;
+        Map<String, List<Line>> prolinemap = CacheContext.prolinemap;
+        wpls.stream().forEach(wp->{
+            Windpowerstationpointnew windpowerstationpointnew = wppointmap.get(wp.getId()).get(Contant.AQTS);
+            double aqts = 0;
+            try {
+                double doublevalue = edosUtil.getRealData(windpowerstationpointnew).getPointValueInDouble();
+                aqts = doublevalue+1;
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            PointData wpPointData = createWpPointData(windpowerstationpointnew, aqts);
+            resultList.add(wpPointData);
+            List<Project> projects = wppromap.get(wp.getId());
+            double finalAqts = aqts;
+            double finalAqts1 = aqts;
+            projects.stream().forEach(project -> {
+                Windpowerstationpointnew windpowerstationpointnew1 = propointmap.get(project.getId()).get(Contant.AQTS);
+                PointData proPointData = createWpPointData(windpowerstationpointnew1, finalAqts);
+                resultList.add(proPointData);
+                List<Line> lineList = prolinemap.get(project.getId());
+                lineList.stream().forEach(line -> {
+                    Windpowerstationpointnew windpowerstationpointnew2 = linepointmap.get(line.getId()).get(Contant.AQTS);
+                    PointData linePointData = createWpPointData(windpowerstationpointnew2, finalAqts1);
+                    resultList.add(linePointData);
+                });
+            });
+
+        });
+        edosUtil.sendMultiPoint(resultList);
+    }
+
+
+    private PointData createWpPointData(Windpowerstationpointnew linepointnew, double linespeed) {
+        currentDate = DateUtils.getSamedayZero();
+        PointData pointData = new PointData();
+        pointData.setEdnaId(linepointnew.getCode());
+        pointData.setPointTime(currentDate.getTime());
+        pointData.setPointName(linepointnew.getName());
+        pointData.setPointValue(String.valueOf(linespeed));
+        pointData.setPointValueInDouble(linespeed);
+        return pointData;
+    }
+}

+ 723 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/StatusService.java

@@ -0,0 +1,723 @@
+package com.gyee.generation.service;
+
+import com.gyee.common.contant.Contant;
+import com.gyee.common.model.PointData;
+import com.gyee.common.model.StringUtils;
+import com.gyee.common.util.DateUtils;
+import com.gyee.generation.init.CacheContext;
+import com.gyee.generation.model.auto.*;
+import com.gyee.generation.util.realtimesource.IEdosUtil;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.stream.Collectors;
+
+/**
+ * @ClassName : StatusService
+ * @Author : xieshengjie
+ * @Date: 2022/3/28 14:22
+ * @Description : 状态计算
+ */
+@Service
+public class StatusService {
+
+    private Map<String, List<Windturbinestatusdi>> statusMap;
+    private List<Windturbine> wtls;
+    private List<Project> projects;
+    private Map<String, Map<String, Windturbinetestingpointnew>> wtpAimap;
+    private Map<String,Map<String, Windpowerstationpointnew>> linepointmap;
+    private Map<String,Map<String, Windpowerstationpointnew>> propointmap;
+    private Map<String,Map<String, Windpowerstationpointnew>> wppointmap;
+    private Date currentDate;
+    private List<Windpowerstation> wpls;
+    private List<Line> lines;
+    private Map<String, Equipmentmodel> modelMap;
+
+    public static Map<String,List<Project>> wppromap;
+    public static Map<String,List<Line>> prolinemap;
+    public static Map<String,List<Windturbine>> linewtmap;
+    @Resource
+    private IEdosUtil edosUtil;
+//    @Resource
+//    private IEdosUtil edosUtilTd;
+    @Value("${clauStatus.ai}")
+    private String clauStatusAi;
+    @Value("${clauStatus.di}")
+    private String clauStatusDi;
+    @Value("${second}")
+    private String second;
+    @Value("${AI134}")
+    private String AI134;
+    @Value("${AI178}")
+    private String AI178;
+
+
+    public void init(){
+        statusMap = CacheContext.statusMap;
+        wtls = CacheContext.wtls;
+        wpls = CacheContext.wpls;
+        lines = CacheContext.lines;
+        projects = CacheContext.projects;
+        wtpAimap = CacheContext.wtpAimap;
+        linepointmap = CacheContext.linepointmap;
+        propointmap = CacheContext.propointmap;
+        wppointmap = CacheContext.wppointmap;
+        currentDate = DateUtils.getCurrentDate();
+        modelMap = CacheContext.modelMap;
+        wppromap = CacheContext.wppromap;
+        prolinemap = CacheContext.prolinemap;
+        linewtmap = CacheContext.linewtmap;
+    }
+
+    /**
+     * 计算状态
+     * @throws Exception
+     */
+    public void calculateStatus() throws Exception {
+        init();
+        List<PointData> resultList = new ArrayList<>();
+        projects.stream().forEach(project->{
+            wtls.stream().filter(i->i.getProjectid().equals(project.getId())).forEach(wt->{
+                Map<String, Windturbinetestingpointnew> stringWindturbinetestingpointnewMap = wtpAimap.get(wt.getId());
+                Windturbinetestingpointnew ztmxPoint = stringWindturbinetestingpointnewMap.get(Contant.ZTMX);
+                Windturbinetestingpointnew fj5tPoint = stringWindturbinetestingpointnewMap.get(Contant.FJ5T);
+                Windturbinetestingpointnew ai130 = stringWindturbinetestingpointnewMap.get(Contant.AI130);
+                String[] interruption = Contant.INTERRUPTION.split(",");
+                List<String> interruptionList = new ArrayList<>();
+                Arrays.stream(interruption).forEach(i->{
+                    Windturbinetestingpointnew windturbinetestingpointnew = stringWindturbinetestingpointnewMap.get(i);
+                    if (!windturbinetestingpointnew.getCode().equals("INITIAL")){
+                        interruptionList.add(windturbinetestingpointnew.getCode());
+                    }
+                });
+                Double status = 1.0;
+                Double mxstatus = 2.0;
+                try {
+                    if (StringUtils.isEmpty(interruptionList)){
+                        mxstatus = 12.0;
+                        status = 3.0;
+                    }
+                    else {
+                        List<PointData> interruptionRealData = edosUtil.getRealData(interruptionList);
+                        List<PointData> collect = interruptionRealData.stream().filter(i -> (currentDate.getTime() - i.getPointTime()) / 1000 > Integer.parseInt(second)).collect(Collectors.toList());
+                        if (collect.size()!=interruptionRealData.size()){
+                            Double ztmx = edosUtil.getRealData(ztmxPoint).getPointValueInDouble();
+                            if (ztmx == 7 || ztmx == 9 || ztmx == 10 || ztmx == 11 || ztmx == 4 || ztmx == 5 ){     //手打状态
+                                mxstatus = ztmx;
+                            }
+                            if (clauStatusAi.contains(wt.getProjectid())){
+                                //多状态根据一个点来判断
+                                Optional<Windturbinestatusdi> first = statusMap.get(wt.getId()).stream().filter(w -> w.getUniformcode().equals(Contant.AI422)).findFirst();
+                                if (first.isPresent()){
+                                    Windturbinestatusdi windturbinestatusdi = first.get();
+                                    if (wt.getModelid().equals("EN141/2.65") || wt.getModelid().equals("EN141/3.2")){
+                                        //远景
+                                        int pointValueInDouble = (int) edosUtil.getRealData(windturbinestatusdi.getId()).getPointValueInDouble();
+                                        switch (pointValueInDouble){
+                                            case 1:
+                                            case 4:
+                                                mxstatus = 1.0;
+                                                break;
+                                            case 2:
+                                                mxstatus = 6.0;
+                                                break;
+                                            case 3:
+                                                mxstatus = 11.0;
+                                                break;
+                                            case 5:
+                                            case 6:
+                                                mxstatus = 2.0;
+                                                break;
+                                            case 7:
+                                                mxstatus = 4.0;
+                                                break;
+                                            case 8:
+                                                mxstatus = 12.0;
+                                                break;
+                                            case 9:
+                                                mxstatus = 0.0;
+                                                break;
+                                            case 10:
+                                                mxstatus = 10.0;
+                                                break;
+                                            case 11:
+                                            case 12:
+                                                mxstatus = 8.0;
+                                                break;
+                                        }
+                                    }else {
+                                        //联合动力
+                                        double pointValueInDouble = edosUtil.getRealData(windturbinestatusdi.getId()).getPointValueInDouble();
+                                        switch ((int) pointValueInDouble){
+                                            case 0:
+                                                mxstatus = 12.0;
+                                                break;
+                                            case 1:
+                                                mxstatus = 6.0;
+                                                break;
+                                            case 2:
+                                                mxstatus = 8.0;
+                                                break;
+                                            case 3:
+                                                mxstatus = 0.0;
+                                                break;
+                                            case 4:
+                                            case 5:
+                                                mxstatus = 2.0;
+                                                break;
+                                            case 6:
+                                                mxstatus = 1.0;
+                                                break;
+                                            default:
+                                                mxstatus = 2.0;
+                                        }
+                                    }
+                                }
+                            }
+                            if (clauStatusDi.contains(wt.getProjectid())){
+                                //每个状态一个状态点
+                                List<Windturbinestatusdi> windturbinestatusdis = statusMap.get(wt.getId()).stream().filter(w -> w.getUniformcode().equals(Contant.MX000) || w.getUniformcode().equals(Contant.MX002) || w.getUniformcode().equals(Contant.MX004) || w.getUniformcode().equals(Contant.MX006) || w.getUniformcode().equals(Contant.MX008)).collect(Collectors.toList());
+                                for(Windturbinestatusdi w : windturbinestatusdis){
+                                    PointData realData = edosUtil.getRealData(w.getId());
+                                    if (realData.getPointValueInDouble()==1){
+                                        mxstatus = Double.parseDouble(w.getTypeid());
+                                        break;
+                                    }
+                                }
+                            }
+                            if (mxstatus == 2){
+                                boolean isJcl = isJcl(wt, stringWindturbinetestingpointnewMap);
+                                double power = edosUtil.getRealData(ai130).getPointValueInDouble();
+                                if (power<=0){
+                                    mxstatus=0.0;
+                                }else if (isJcl){
+                                    mxstatus = 3.0;
+                                }
+                            }
+                        }else{
+                            //离线
+                            mxstatus = 12.0;
+                        }
+                        if (mxstatus == 0 || mxstatus == 1){
+                            status = 0.0;
+                        }else if(mxstatus == 2 || mxstatus == 3){
+                            status = 1.0;
+                        }else if(mxstatus == 4 || mxstatus == 5){
+                            status = 5.0;
+                        }else if(mxstatus == 6 || mxstatus == 7){
+                            status = 2.0;
+                        }else if(mxstatus == 8 || mxstatus == 9){
+                            status = 4.0;
+                        }else if(mxstatus == 10 || mxstatus == 11){
+                            status = 6.0;
+                        }else if(mxstatus == 12){
+                            status = 3.0;
+                        }
+                    }
+
+                    PointData ztmx = createPointData(ztmxPoint, mxstatus);
+                    PointData fj5t = createPointData(fj5tPoint, status);
+                    resultList.add(ztmx);
+                    resultList.add(fj5t);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            });
+        });
+//        edosUtilTd.sendMultiPoint(resultList);
+        edosUtil.sendMultiPoint(resultList);
+    }
+
+    /**
+     * 计算状态台数
+     */
+    public void calculateStatusNumber() throws Exception {
+        init();
+        List<PointData> resultList = new ArrayList<>();
+        wpls.stream().forEach(wp->{
+            List<Project> projects = wppromap.get(wp.getId());
+            Map<String, Windpowerstationpointnew> wpmap = wppointmap.get(wp.getId());
+            AtomicInteger wpdjnum = new AtomicInteger();
+            AtomicInteger wptjnum = new AtomicInteger();
+            AtomicInteger wpfdnum = new AtomicInteger();
+            AtomicInteger wpfdjclnum = new AtomicInteger();
+            AtomicInteger wpxdjclnum = new AtomicInteger();
+            AtomicInteger wpxdtjnum = new AtomicInteger();
+            AtomicInteger wpgznum = new AtomicInteger();
+            AtomicInteger wpcngznum = new AtomicInteger();
+            AtomicInteger wpjxnum = new AtomicInteger();
+            AtomicInteger wpcnjxnum = new AtomicInteger();
+            AtomicInteger wpdwslnum = new AtomicInteger();
+            AtomicInteger wphjslnum = new AtomicInteger();
+            AtomicInteger wplxnum = new AtomicInteger();
+
+            //六种
+            AtomicInteger wpdjts = new AtomicInteger();
+            AtomicInteger wpgzts = new AtomicInteger();
+            AtomicInteger wptxzd = new AtomicInteger();
+            AtomicInteger wpwhtj = new AtomicInteger();
+            AtomicInteger wpxdts = new AtomicInteger();
+            AtomicInteger wpyxts = new AtomicInteger();
+            AtomicInteger wpslts = new AtomicInteger();
+            projects.stream().forEach(project->{
+                List<Line> lineList = prolinemap.get(project.getId());
+                Map<String, Windpowerstationpointnew> projectmap = propointmap.get(project.getId());
+                AtomicInteger prodjnum = new AtomicInteger();
+                AtomicInteger protjnum = new AtomicInteger();
+                AtomicInteger profdnum = new AtomicInteger();
+                AtomicInteger profdjclnum = new AtomicInteger();
+                AtomicInteger proxdjclnum = new AtomicInteger();
+                AtomicInteger proxdtjnum = new AtomicInteger();
+                AtomicInteger progznum = new AtomicInteger();
+                AtomicInteger procngznum = new AtomicInteger();
+                AtomicInteger projxnum = new AtomicInteger();
+                AtomicInteger procnjxnum = new AtomicInteger();
+                AtomicInteger prodwslnum = new AtomicInteger();
+                AtomicInteger prohjslnum = new AtomicInteger();
+                AtomicInteger prolxnum = new AtomicInteger();
+
+                //六种
+                AtomicInteger prodjts = new AtomicInteger();
+                AtomicInteger progzts = new AtomicInteger();
+                AtomicInteger protxzd = new AtomicInteger();
+                AtomicInteger prowhtj = new AtomicInteger();
+                AtomicInteger proxdts = new AtomicInteger();
+                AtomicInteger proyxts = new AtomicInteger();
+                AtomicInteger proslts = new AtomicInteger();
+
+                lineList.stream().forEach(line->{
+                    List<Windturbine> windturbines = linewtmap.get(line.getId());
+                    Map<String, Windpowerstationpointnew> linemap = linepointmap.get(line.getId());
+                    AtomicInteger djnum = new AtomicInteger();
+                    AtomicInteger tjnum = new AtomicInteger();
+                    AtomicInteger fdnum = new AtomicInteger();
+                    AtomicInteger fdjclnum = new AtomicInteger();
+                    AtomicInteger xdjclnum = new AtomicInteger();
+                    AtomicInteger xdtjnum = new AtomicInteger();
+                    AtomicInteger gznum = new AtomicInteger();
+                    AtomicInteger cngznum = new AtomicInteger();
+                    AtomicInteger jxnum = new AtomicInteger();
+                    AtomicInteger cnjxnum = new AtomicInteger();
+                    AtomicInteger dwslnum = new AtomicInteger();
+                    AtomicInteger hjslnum = new AtomicInteger();
+                    AtomicInteger lxnum = new AtomicInteger();
+                    //六种
+                    AtomicInteger djts = new AtomicInteger();
+                    AtomicInteger gzts = new AtomicInteger();
+                    AtomicInteger txzd = new AtomicInteger();
+                    AtomicInteger whtj = new AtomicInteger();
+                    AtomicInteger xdts = new AtomicInteger();
+                    AtomicInteger yxts = new AtomicInteger();
+                    AtomicInteger slts = new AtomicInteger();
+                    windturbines.stream().forEach(wt->{
+                        Windturbinetestingpointnew windturbinetestingpointnew = wtpAimap.get(wt.getId()).get(Contant.ZTMX);
+                        try {
+                            double valueInDouble = edosUtil.getRealData(windturbinetestingpointnew).getPointValueInDouble();
+                            switch ((int) valueInDouble){
+                                case 0:
+                                    djnum.getAndIncrement();
+                                    break;
+                                case 1:
+                                    tjnum.getAndIncrement();
+                                    break;
+                                case 2:
+                                    fdnum.getAndIncrement();
+                                    break;
+                                case 3:
+                                    fdjclnum.getAndIncrement();
+                                    break;
+                                case 4:
+                                    xdjclnum.getAndIncrement();
+                                    break;
+                                case 5:
+                                    xdtjnum.getAndIncrement();
+                                    break;
+                                case 6:
+                                    gznum.getAndIncrement();
+                                    break;
+                                case 7:
+                                    cngznum.getAndIncrement();
+                                    break;
+                                case 8:
+                                    jxnum.getAndIncrement();
+                                    break;
+                                case 9:
+                                    cnjxnum.getAndIncrement();
+                                    break;
+                                case 10:
+                                    dwslnum.getAndIncrement();
+                                    break;
+                                case 11:
+                                    hjslnum.getAndIncrement();
+                                    break;
+                                case 12:
+                                    lxnum.getAndIncrement();
+                                    break;
+                                default:
+                                    fdnum.getAndIncrement();
+                            }
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    });
+                    //待机台数0
+                    Windpowerstationpointnew djnumPointNew = linemap.get(Contant.DJNUM);
+                    PointData djnumPoint = createWpPoint(djnum, djnumPointNew);
+                    prodjnum.addAndGet(djnum.intValue());
+                    resultList.add(djnumPoint);
+                    //停机台数1
+                    Windpowerstationpointnew tjnumPointNew = linemap.get(Contant.TJNUM);
+                    PointData tjnumPoint = createWpPoint(tjnum, tjnumPointNew);
+                    protjnum.addAndGet(tjnum.intValue());
+                    resultList.add(tjnumPoint);
+                    //待机台数6-0
+                    djts.addAndGet(djnum.intValue()+tjnum.intValue());
+                    Windpowerstationpointnew djtsPointNew = linemap.get(Contant.DJTS);
+                    PointData djtsPoint = createWpPoint(djts, djtsPointNew);
+                    resultList.add(djtsPoint);
+                    //运行台数2
+                    Windpowerstationpointnew fdnumPointNew = linemap.get(Contant.FDNUM);
+                    PointData fdnumPoint = createWpPoint(fdnum, fdnumPointNew);
+                    profdnum.addAndGet(fdnum.intValue());
+                    resultList.add(fdnumPoint);
+                    //降出力台数3
+                    Windpowerstationpointnew fdjclnumPointNew = linemap.get(Contant.FDJCLNUM);
+                    PointData fdjclnumPoint = createWpPoint(fdjclnum, fdjclnumPointNew);
+                    profdjclnum.addAndGet(fdjclnum.intValue());
+                    resultList.add(fdjclnumPoint);
+                    //运行台数6-1
+                    yxts.addAndGet(fdnum.intValue()+fdjclnum.intValue());
+                    Windpowerstationpointnew yxtsPointNew = linemap.get(Contant.YXTS);
+                    PointData yxtsPoint = createWpPoint(yxts, yxtsPointNew);
+                    resultList.add(yxtsPoint);
+
+                    //限电降出力台数4
+                    Windpowerstationpointnew xdjclnumPointNew = linemap.get(Contant.XDJCLNUM);
+                    PointData xdjclnumPoint = createWpPoint(xdjclnum, xdjclnumPointNew);
+                    proxdjclnum.addAndGet(xdjclnum.intValue());
+                    resultList.add(xdjclnumPoint);
+                    //限电停机台数5
+                    Windpowerstationpointnew xdtjnumPointNew = linemap.get(Contant.XDTJNUM);
+                    PointData xdtjnumPoint = createWpPoint(xdtjnum, xdtjnumPointNew);
+                    proxdtjnum.addAndGet(xdtjnum.intValue());
+                    resultList.add(xdtjnumPoint);
+                    //限电台数6-5
+                    xdts.addAndGet(xdjclnum.intValue()+xdtjnum.intValue());
+                    Windpowerstationpointnew xdtsPointNew = linemap.get(Contant.XDTS);
+                    PointData xdtsPoint = createWpPoint(xdts, xdtsPointNew);
+                    resultList.add(xdtsPoint);
+
+                    //故障台数6
+                    Windpowerstationpointnew gznumPointNew = linemap.get(Contant.GZNUM);
+                    PointData gznumPoint = createWpPoint(gznum, gznumPointNew);
+                    progznum.addAndGet(gznum.intValue());
+                    resultList.add(gznumPoint);
+                    //故障受累台数7
+                    Windpowerstationpointnew cngznumPointNew = linemap.get(Contant.CNGZNUM);
+                    PointData cngznumPoint = createWpPoint(cngznum, cngznumPointNew);
+                    procngznum.addAndGet(cngznum.intValue());
+                    resultList.add(cngznumPoint);
+
+
+                    //检修台数8
+                    Windpowerstationpointnew jxnumPointNew = linemap.get(Contant.JXNUM);
+                    PointData jxnumPoint = createWpPoint(jxnum, jxnumPointNew);
+                    projxnum.addAndGet(jxnum.intValue());
+                    resultList.add(jxnumPoint);
+                    //检修受累台数9
+                    Windpowerstationpointnew cnjxnumPointNew = linemap.get(Contant.CNJXNUM);
+                    PointData cnjxnumPoint = createWpPoint(cnjxnum, cnjxnumPointNew);
+                    procnjxnum.addAndGet(cnjxnum.intValue());
+                    resultList.add(cnjxnumPoint);
+
+                    //检修台数6-4
+                    whtj.addAndGet(jxnum.intValue()+cnjxnum.intValue());
+                    Windpowerstationpointnew whtjPointNew = linemap.get(Contant.WHTJ);
+                    PointData whtjPoint = createWpPoint(whtj, whtjPointNew);
+                    resultList.add(whtjPoint);
+                    //电网受累台数10
+                    Windpowerstationpointnew dwslnumPointNew = linemap.get(Contant.DWSLNUM);
+                    PointData dwslnumPoint = createWpPoint(dwslnum, dwslnumPointNew);
+                    prodwslnum.addAndGet(dwslnum.intValue());
+                    resultList.add(dwslnumPoint);
+                    //环境受累台数11
+                    Windpowerstationpointnew hjslnumPointNew = linemap.get(Contant.HJSLNUM);
+                    PointData hjslnumPoint = createWpPoint(hjslnum, hjslnumPointNew);
+                    prohjslnum.addAndGet(hjslnum.intValue());
+                    resultList.add(hjslnumPoint);
+
+                    //故障台数6-2
+                    gzts.addAndGet(gznum.intValue()+cngznum.intValue());
+                    Windpowerstationpointnew gztsPointNew = linemap.get(Contant.GZTJ);
+                    PointData gztjPoint = createWpPoint(gzts, gztsPointNew);
+                    resultList.add(gztjPoint);
+                    //受累台数6-6
+                    slts.addAndGet(dwslnum.intValue()+hjslnum.intValue());
+                    Windpowerstationpointnew sltsPointNew = linemap.get(Contant.SLTS);
+                    PointData sltjPoint = createWpPoint(slts, sltsPointNew);
+                    resultList.add(sltjPoint);
+
+                    //离线台数12
+                    Windpowerstationpointnew lxnumPointNew = linemap.get(Contant.LXNUM);
+                    Windpowerstationpointnew txzdPointNew = linemap.get(Contant.TXZD);
+                    PointData lxnumPoint = createWpPoint(lxnum, lxnumPointNew);
+                    PointData txzdPoint = createWpPoint(lxnum, txzdPointNew);
+                    prolxnum.addAndGet(lxnum.intValue());
+                    resultList.add(lxnumPoint);
+                    resultList.add(txzdPoint);
+                });
+                //待机台数0
+                Windpowerstationpointnew djnumPointNew = projectmap.get(Contant.DJNUM);
+                PointData djnumPoint = createWpPoint(prodjnum, djnumPointNew);
+                wpdjnum.addAndGet(prodjnum.intValue());
+                resultList.add(djnumPoint);
+                //停机台数1
+                Windpowerstationpointnew tjnumPointNew = projectmap.get(Contant.TJNUM);
+                PointData tjnumPoint = createWpPoint(protjnum, tjnumPointNew);
+                wptjnum.addAndGet(protjnum.intValue());
+                resultList.add(tjnumPoint);
+                //待机台数6-0
+                Windpowerstationpointnew djtsPointNew = projectmap.get(Contant.DJTS);
+                prodjts.addAndGet(prodjnum.intValue()+protjnum.intValue());
+                PointData djtsPoint = createWpPoint(prodjts, djtsPointNew);
+                resultList.add(djtsPoint);
+
+                //运行台数2
+                Windpowerstationpointnew fdnumPointNew = projectmap.get(Contant.FDNUM);
+                PointData fdnumPoint = createWpPoint(profdnum, fdnumPointNew);
+                wpfdnum.addAndGet(profdnum.intValue());
+                resultList.add(fdnumPoint);
+                //降出力台数3
+                Windpowerstationpointnew fdjclnumPointNew = projectmap.get(Contant.FDJCLNUM);
+                PointData fdjclnumPoint = createWpPoint(profdjclnum, fdjclnumPointNew);
+                wpfdjclnum.addAndGet(profdjclnum.intValue());
+                resultList.add(fdjclnumPoint);
+                //运行台数6-1
+                Windpowerstationpointnew yxtsPointNew = projectmap.get(Contant.YXTS);
+                proyxts.addAndGet(profdnum.intValue()+profdjclnum.intValue());
+                PointData yxtsPoint = createWpPoint(proyxts, yxtsPointNew);
+                resultList.add(yxtsPoint);
+
+                //限电降出力台数4
+                Windpowerstationpointnew xdjclnumPointNew = projectmap.get(Contant.XDJCLNUM);
+                PointData xdjclnumPoint = createWpPoint(proxdjclnum, xdjclnumPointNew);
+                wpxdjclnum.addAndGet(proxdjclnum.intValue());
+                resultList.add(xdjclnumPoint);
+                //限电停机台数5
+                Windpowerstationpointnew xdtjnumPointNew = projectmap.get(Contant.XDTJNUM);
+                PointData xdtjnumPoint = createWpPoint(proxdtjnum, xdtjnumPointNew);
+                wpxdtjnum.addAndGet(proxdtjnum.intValue());
+                resultList.add(xdtjnumPoint);
+                //限电台数6-5
+                Windpowerstationpointnew xdtsPointNew = projectmap.get(Contant.XDTS);
+                proxdts.addAndGet(proxdjclnum.intValue()+proxdtjnum.intValue());
+                PointData xdtsPoint = createWpPoint(proxdts, xdtsPointNew);
+                resultList.add(xdtsPoint);
+
+                //故障台数6
+                Windpowerstationpointnew gznumPointNew = projectmap.get(Contant.GZNUM);
+                PointData gznumPoint = createWpPoint(progznum, gznumPointNew);
+                wpgznum.addAndGet(progznum.intValue());
+                resultList.add(gznumPoint);
+                //故障受累台数7
+                Windpowerstationpointnew cngznumPointNew = projectmap.get(Contant.CNGZNUM);
+                PointData cngznumPoint = createWpPoint(procngznum, cngznumPointNew);
+                wpcngznum.addAndGet(procngznum.intValue());
+                resultList.add(cngznumPoint);
+
+
+                //检修台数8
+                Windpowerstationpointnew jxnumPointNew = projectmap.get(Contant.JXNUM);
+                PointData jxnumPoint = createWpPoint(projxnum, jxnumPointNew);
+                wpjxnum.addAndGet(projxnum.intValue());
+                resultList.add(jxnumPoint);
+                //检修受累台数9
+                Windpowerstationpointnew cnjxnumPointNew = projectmap.get(Contant.CNJXNUM);
+                PointData cnjxnumPoint = createWpPoint(procnjxnum, cnjxnumPointNew);
+                wpcnjxnum.addAndGet(procnjxnum.intValue());
+                resultList.add(cnjxnumPoint);
+
+                //检修台数6-4
+                Windpowerstationpointnew jxtsPointNew = projectmap.get(Contant.WHTJ);
+                prowhtj.addAndGet(projxnum.intValue()+procnjxnum.intValue());
+                PointData jxtsPoint = createWpPoint(prowhtj, jxtsPointNew);
+                resultList.add(jxtsPoint);
+                //电网受累台数10
+                Windpowerstationpointnew dwslnumPointNew = projectmap.get(Contant.DWSLNUM);
+                PointData dwslnumPoint = createWpPoint(prodwslnum, dwslnumPointNew);
+                wpdwslnum.addAndGet(prodwslnum.intValue());
+                resultList.add(dwslnumPoint);
+                //环境受累台数11
+                Windpowerstationpointnew hjslnumPointNew = projectmap.get(Contant.HJSLNUM);
+                PointData hjslnumPoint = createWpPoint(prohjslnum, hjslnumPointNew);
+                wphjslnum.addAndGet(prohjslnum.intValue());
+                resultList.add(hjslnumPoint);
+                //故障台数6-2
+                Windpowerstationpointnew gztsPointNew = projectmap.get(Contant.GZTJ);
+                progzts.addAndGet(progznum.intValue()+procngznum.intValue());
+                PointData gztsPoint = createWpPoint(progzts, gztsPointNew);
+                resultList.add(gztsPoint);
+                //受累台数6-6
+                Windpowerstationpointnew sltsPointNew = projectmap.get(Contant.SLTS);
+                proslts.addAndGet(prodwslnum.intValue()+prohjslnum.intValue());
+                PointData sltsPoint = createWpPoint(proslts, sltsPointNew);
+                resultList.add(sltsPoint);
+                //离线台数12
+                Windpowerstationpointnew lxnumPointNew = projectmap.get(Contant.LXNUM);
+                Windpowerstationpointnew txzdPointNew = projectmap.get(Contant.TXZD);
+                PointData lxnumPoint = createWpPoint(prolxnum, lxnumPointNew);
+                PointData txzdPoint = createWpPoint(prolxnum, txzdPointNew);
+                wplxnum.addAndGet(prolxnum.intValue());
+                resultList.add(lxnumPoint);
+                resultList.add(txzdPoint);
+            });
+            //待机台数0
+            Windpowerstationpointnew djnumPointNew = wpmap.get(Contant.DJNUM);
+            PointData djnumPoint = createWpPoint(wpdjnum, djnumPointNew);
+            resultList.add(djnumPoint);
+            //停机台数1
+            Windpowerstationpointnew tjnumPointNew = wpmap.get(Contant.TJNUM);
+            PointData tjnumPoint = createWpPoint(wptjnum, tjnumPointNew);
+            resultList.add(tjnumPoint);
+
+            //待机台数6-0
+            Windpowerstationpointnew djtsPointNew = wpmap.get(Contant.DJTS);
+            wpdjts.addAndGet(wpdjnum.intValue()+wptjnum.intValue());
+            PointData djtsPoint = createWpPoint(wpdjts, djtsPointNew);
+            resultList.add(djtsPoint);
+            //运行台数2
+            Windpowerstationpointnew fdnumPointNew = wpmap.get(Contant.FDNUM);
+            PointData fdnumPoint = createWpPoint(wpfdnum, fdnumPointNew);
+            resultList.add(fdnumPoint);
+            //降出力台数3
+            Windpowerstationpointnew fdjclnumPointNew = wpmap.get(Contant.FDJCLNUM);
+            PointData fdjclnumPoint = createWpPoint(wpfdjclnum, fdjclnumPointNew);
+            resultList.add(fdjclnumPoint);
+
+            //运行台数6-1
+            Windpowerstationpointnew yxtsPointNew = wpmap.get(Contant.YXTS);
+            wpyxts.addAndGet(wpfdnum.intValue()+wpfdjclnum.intValue());
+            PointData yxtsPoint = createWpPoint(wpyxts, yxtsPointNew);
+            resultList.add(yxtsPoint);
+            //限电降出力台数4
+            Windpowerstationpointnew xdjclnumPointNew = wpmap.get(Contant.XDJCLNUM);
+            PointData xdjclnumPoint = createWpPoint(wpxdjclnum, xdjclnumPointNew);
+            resultList.add(xdjclnumPoint);
+            //限电停机台数5
+            Windpowerstationpointnew xdtjnumPointNew = wpmap.get(Contant.XDTJNUM);
+            PointData xdtjnumPoint = createWpPoint(wpxdtjnum, xdtjnumPointNew);
+            resultList.add(xdtjnumPoint);
+
+            //限电台数6-5
+            Windpowerstationpointnew xdtsPointNew = wpmap.get(Contant.XDTS);
+            wpxdts.addAndGet(wpxdjclnum.intValue()+wpxdtjnum.intValue());
+            PointData xdtsPoint = createWpPoint(wpxdts, xdtsPointNew);
+            resultList.add(xdtsPoint);
+            //故障台数6
+            Windpowerstationpointnew gznumPointNew = wpmap.get(Contant.GZNUM);
+            PointData gznumPoint = createWpPoint(wpgznum, gznumPointNew);
+            resultList.add(gznumPoint);
+            //故障受累台数7
+            Windpowerstationpointnew cngznumPointNew = wpmap.get(Contant.CNGZNUM);
+            PointData cngznumPoint = createWpPoint(wpcngznum, cngznumPointNew);
+            resultList.add(cngznumPoint);
+
+
+            //检修台数8
+            Windpowerstationpointnew jxnumPointNew = wpmap.get(Contant.JXNUM);
+            PointData jxnumPoint = createWpPoint(wpjxnum, jxnumPointNew);
+            resultList.add(jxnumPoint);
+            //检修受累台数9
+            Windpowerstationpointnew cnjxnumPointNew = wpmap.get(Contant.CNJXNUM);
+            PointData cnjxnumPoint = createWpPoint(wpcnjxnum, cnjxnumPointNew);
+            resultList.add(cnjxnumPoint);
+            //检修台数6-4
+            Windpowerstationpointnew jxtsPointNew = wpmap.get(Contant.WHTJ);
+            wpwhtj.addAndGet(wpjxnum.intValue()+wpcnjxnum.intValue());
+            PointData jxtsPoint = createWpPoint(wpwhtj, jxtsPointNew);
+            resultList.add(jxtsPoint);
+            //电网受累台数10
+            Windpowerstationpointnew dwslnumPointNew = wpmap.get(Contant.DWSLNUM);
+            PointData dwslnumPoint = createWpPoint(wpdwslnum, dwslnumPointNew);
+            resultList.add(dwslnumPoint);
+            //环境受累台数11
+            Windpowerstationpointnew hjslnumPointNew = wpmap.get(Contant.HJSLNUM);
+            PointData hjslnumPoint = createWpPoint(wphjslnum, hjslnumPointNew);
+            resultList.add(hjslnumPoint);
+            //故障台数6-2
+            Windpowerstationpointnew gztsPointNew = wpmap.get(Contant.GZTJ);
+            wpgzts.addAndGet(wpgznum.intValue()+wpcngznum.intValue());
+            PointData gztsPoint = createWpPoint(wpgzts, gztsPointNew);
+            resultList.add(gztsPoint);
+            //受累台数6-6
+            Windpowerstationpointnew sltsPointNew = wpmap.get(Contant.SLTS);
+            wpslts.addAndGet(wpdwslnum.intValue()+wphjslnum.intValue());
+            PointData sltsPoint = createWpPoint(wpslts, sltsPointNew);
+            resultList.add(sltsPoint);
+            //离线台数12
+            Windpowerstationpointnew lxnumPointNew = wpmap.get(Contant.LXNUM);
+            Windpowerstationpointnew txzdPointNew = wpmap.get(Contant.TXZD);
+            PointData lxnumPoint = createWpPoint(wplxnum, lxnumPointNew);
+            PointData txzdPoint = createWpPoint(wplxnum, txzdPointNew);
+            resultList.add(lxnumPoint);
+            resultList.add(txzdPoint);
+        });
+        edosUtil.sendMultiPoint(resultList);
+    }
+
+    private PointData createWpPoint(AtomicInteger tjnum, Windpowerstationpointnew tjnumPoint) {
+        PointData pointData = new PointData();
+        pointData.setEdnaId(tjnumPoint.getCode());
+        pointData.setPointName(tjnumPoint.getName());
+        pointData.setPointTime(currentDate.getTime());
+        pointData.setPointValue(String.valueOf(tjnum.doubleValue()));
+        pointData.setPointValueInDouble(tjnum.doubleValue());
+        return pointData;
+    }
+
+    /**
+     * 判断是否降出力
+     * @param wt
+     * @param stringWindturbinetestingpointnewMap
+     * @return
+     * @throws Exception
+     */
+    private boolean isJcl(Windturbine wt, Map<String, Windturbinetestingpointnew> stringWindturbinetestingpointnewMap) throws Exception {
+        boolean isJcl = false;
+        Windturbinetestingpointnew ai134point = stringWindturbinetestingpointnewMap.get(Contant.AI134);
+        Windturbinetestingpointnew ai178point = stringWindturbinetestingpointnewMap.get(Contant.AI178);
+        Windturbinetestingpointnew ai443point = stringWindturbinetestingpointnewMap.get(Contant.AI443);
+        if (!ai134point.getCode().equals("INITIAL")){
+            Double realData = edosUtil.getRealData(ai134point).getPointValueInDouble();
+            if (realData<Double.parseDouble(AI134)){
+                isJcl = true;
+            }
+        }
+        if (!ai178point.getCode().equals("INITIAL")){
+            Double realData = edosUtil.getRealData(ai178point).getPointValueInDouble();
+            if (realData<Double.parseDouble(AI178)){
+                isJcl = true;
+            }
+        }
+        if (!ai443point.getCode().equals("INITIAL")){
+            Double realData = edosUtil.getRealData(ai443point).getPointValueInDouble();
+            if (realData<modelMap.get(wt.getModelid()).getPowerproduction()){
+                isJcl = true;
+            }
+        }
+        return isJcl;
+    }
+
+    private PointData createPointData(Windturbinetestingpointnew ztmxPoint, Double mxstatus) {
+        PointData pointData = new PointData();
+        pointData.setEdnaId(ztmxPoint.getCode());
+        pointData.setPointName(ztmxPoint.getName());
+        pointData.setPointTime(currentDate.getTime());
+        pointData.setPointValue(String.valueOf(mxstatus));
+        pointData.setPointValueInDouble(mxstatus);
+        return pointData;
+    }
+}

+ 245 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/TheorypowerService.java

@@ -0,0 +1,245 @@
+package com.gyee.generation.service;
+
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.gyee.common.contant.Contant;
+import com.gyee.common.model.PointData;
+import com.gyee.common.model.algorithm.PointVo;
+import com.gyee.common.util.CommonUtils;
+import com.gyee.common.util.DateUtils;
+import com.gyee.common.util.DoubleUtils;
+import com.gyee.common.util.algorithm.LineBuild;
+import com.gyee.generation.init.CacheContext;
+import com.gyee.generation.model.auto.*;
+import com.gyee.generation.service.auto.IWindturbinepowerService;
+import com.gyee.generation.util.realtimesource.IEdosUtil;
+import com.gyee.generation.util.redis.RedisService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.stream.Collectors;
+
+/**
+ * @ClassName : TheorypowerService
+ * @Author : xieshengjie
+ * @Date: 2022/4/26 10:37
+ * @Description : 理论功率,保证功率
+ */
+@Service
+public class TheorypowerService {
+    @Resource
+    private IEdosUtil edosUtil;
+    @Resource
+    private RedisService redisService;
+    @Resource
+    private IWindturbinepowerService windturbinepowerService;
+    private List<Windpowerstation> wpls;
+    private Map<String, List<Project>> wppromap;
+    private Map<String, List<Line>> prolinemap;
+    private Map<String, List<Windturbine>> linewtmap;
+    private Date currentDate;
+    private Map<String, Map<String, Windpowerstationpointnew>> wppointmap;
+    private Map<String, Map<String, Windpowerstationpointnew>> linepointmap;
+    private Map<String, Map<String, Windpowerstationpointnew>> propointmap;
+    private Map<String, Map<String, Windturbinetestingpointnew>> wtpAimap;
+
+    private void init(){
+        wpls = CacheContext.wpls;
+        wppromap = CacheContext.wppromap;
+        prolinemap = CacheContext.prolinemap;
+        linewtmap = CacheContext.linewtmap;
+        wppointmap = CacheContext.wppointmap;
+        linepointmap = CacheContext.linepointmap;
+        propointmap = CacheContext.propointmap;
+        wtpAimap = CacheContext.wtpAimap;
+        currentDate = DateUtils.getCurrentDate();
+    }
+
+    /**
+     * 理论功率,保证功率
+     */
+    public void theropower() throws Exception {
+        init();
+        Map<String, Map<Double, Double>> zbzglMap = CacheContext.zbzglMap;
+        Map<String, Map<Double, Double>> zzsglMap = CacheContext.zzsglMap;
+        List<PointData> resultList = new ArrayList<>();
+        wpls.stream().forEach(wp->{
+            Map<String, Windpowerstationpointnew> wppointnewMap = wppointmap.get(wp.getId());
+            Windpowerstationpointnew wpbzglpoint = wppointnewMap.get(Contant.ZBZGL);
+            Windpowerstationpointnew wpzsglpoint = wppointnewMap.get(Contant.ZZSGL);
+            AtomicReference<Double> wpbzgl = new AtomicReference<>(0.0);
+            AtomicReference<Double> wpzsgl = new AtomicReference<>(0.0);
+            wppromap.get(wp.getId()).stream().forEach(project -> {
+                Map<String, Windpowerstationpointnew> projectpointnewMap = propointmap.get(project.getId());
+                Windpowerstationpointnew projectbzglpoint = projectpointnewMap.get(Contant.ZBZGL);
+                Windpowerstationpointnew projectzsglpoint = projectpointnewMap.get(Contant.ZZSGL);
+                AtomicReference<Double> projectbzgl = new AtomicReference<>(0.0);
+                AtomicReference<Double> projectzsgl = new AtomicReference<>(0.0);
+                prolinemap.get(project.getId()).stream().forEach(line -> {
+                    AtomicReference<Double> linebzgl = new AtomicReference<>(0.0);
+                    AtomicReference<Double> linezsgl = new AtomicReference<>(0.0);
+                    Map<String, Windpowerstationpointnew> linepointnewMap = linepointmap.get(line.getId());
+                    Windpowerstationpointnew linebzglpoint = linepointnewMap.get(Contant.ZBZGL);
+                    Windpowerstationpointnew linezsglpoint = linepointnewMap.get(Contant.ZZSGL);
+                    linewtmap.get(line.getId()).stream().forEach(wt->{
+                        String zzsglString = redisService.get("ZZSGL");
+                        Map<String,Map<Double, Double>> zszglMap = JSONObject.parseObject(zzsglString, new TypeReference<Map<String,Map<Double,Double>>>() {
+                        });
+                        Map<Double, Double> zsglMap = zszglMap.get(wt.getId());
+                        Map<String, Windturbinetestingpointnew> windturbinetestingpointnewMap = wtpAimap.get(wt.getId());
+                        Windturbinetestingpointnew speedPointnew = windturbinetestingpointnewMap.get(Contant.AI022);
+                        Windturbinetestingpointnew ztmxPointnew = windturbinetestingpointnewMap.get(Contant.FJ5T);
+                        Windturbinetestingpointnew wtzsgl = windturbinetestingpointnewMap.get(Contant.ZSGL);
+                        Windturbinetestingpointnew wtbzgl = windturbinetestingpointnewMap.get(Contant.BZGL);
+                        Double zzsgl = 0.0;
+                        Double zbzgl = 0.0;
+                        try {
+                            Double wtztmx = DoubleUtils.keepPrecision(edosUtil.getRealData(ztmxPointnew).getPointValueInDouble(),2);
+                            Double wtspeed = DoubleUtils.keepPrecision(edosUtil.getRealData(speedPointnew).getPointValueInDouble(),2);
+                            if (wtztmx==2 || wtztmx==4 || wtztmx==0 || wtztmx==3){
+                                zbzgl = 0.0;
+                                zzsgl = 0.0;
+                            }else {
+                                if (zbzglMap.containsKey(wt.getModelid())){
+                                    Map<Double, Double> doubleDoubleMap = zbzglMap.get(wt.getModelid());
+                                    if(doubleDoubleMap.containsKey(wtspeed)){
+                                        zbzgl = doubleDoubleMap.get(wtspeed);
+                                    }
+                                }
+                                if (zsglMap.containsKey(wtspeed)){
+                                    zzsgl = zsglMap.get(wtspeed);
+                                }
+                            }
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                        Double finalZbzgl = zbzgl;
+                        linebzgl.updateAndGet(v -> v + finalZbzgl);
+                        Double finalZzsgl = zzsgl;
+                        linezsgl.updateAndGet(v -> v + finalZzsgl);
+                        PointData wtbzglpoint = createPointData(wtbzgl, zbzgl);
+                        resultList.add(wtbzglpoint);
+                        PointData wtzsglpoint = createPointData(wtzsgl, zzsgl);
+                        resultList.add(wtzsglpoint);
+                    });
+                    PointData linebzglpointdata = createWpPointData(linebzglpoint, linebzgl.get());
+                    resultList.add(linebzglpointdata);
+                    PointData linezsglpointdata = createWpPointData(linezsglpoint, linezsgl.get());
+                    resultList.add(linezsglpointdata);
+                    Double finallineZbzgl = linebzgl.get();
+                    projectbzgl.updateAndGet(v -> v + finallineZbzgl);
+                    Double finallineZzsgl = linezsgl.get();
+                    projectzsgl.updateAndGet(v -> v + finallineZzsgl);
+                });
+                PointData projectbzglpointdata = createWpPointData(projectbzglpoint, projectbzgl.get());
+                resultList.add(projectbzglpointdata);
+                PointData projectzsglpointdata = createWpPointData(projectzsglpoint, projectzsgl.get());
+                resultList.add(projectzsglpointdata);
+                Double finalprojectZbzgl = projectbzgl.get();
+                wpbzgl.updateAndGet(v -> v + finalprojectZbzgl);
+                Double finalprojectZzsgl = projectzsgl.get();
+                wpzsgl.updateAndGet(v -> v + finalprojectZzsgl);
+            });
+            PointData wpbzglpointdata = createWpPointData(wpbzglpoint, wpbzgl.get());
+            resultList.add(wpbzglpointdata);
+            PointData wpzsglpointdata = createWpPointData(wpzsglpoint, wpzsgl.get());
+            resultList.add(wpzsglpointdata);
+        });
+        edosUtil.sendMultiPoint(resultList);
+    }
+
+
+    /**
+     * 拟合功率曲线,存储到redis
+     */
+    public void fittingPower(){
+        init();
+        List<Windturbinepower> resultList = new ArrayList<>();
+        List<Windturbine> wtls = CacheContext.wtls;
+        Date date = new Date();
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(date);
+        cal.add(Calendar.MONTH, -1);
+        Date begin = cal.getTime();
+
+        wtls.stream().forEach(wt->{
+            QueryWrapper<Windturbinepower> deleteqw = new QueryWrapper<>();
+            deleteqw.eq("windturbineid",wt.getId());
+            windturbinepowerService.remove(deleteqw);
+
+            Map<String, Windturbinetestingpointnew> windturbinetestingpointnewMap = wtpAimap.get(wt.getId());
+            Windturbinetestingpointnew speedPoint = windturbinetestingpointnewMap.get(Contant.AI022);
+            Windturbinetestingpointnew powerPoint = windturbinetestingpointnewMap.get(Contant.AI130);
+            Windturbinetestingpointnew fjztPoint = windturbinetestingpointnewMap.get(Contant.FJ5T);
+            List<PointVo> pointVoList = new ArrayList<>();
+            List<PointVo> tempList = new ArrayList<>();
+            try {
+                List<PointData> speedpoints =  edosUtil.getHistoryDatasSnap(speedPoint, begin.getTime()/1000 , date.getTime()/1000 , null, 3600l);
+                List<PointData> powerpoints = edosUtil.getHistoryDatasSnap(powerPoint, begin.getTime()/1000 , date.getTime()/1000 , null, 3600l);
+                List<PointData> fjztpoints = edosUtil.getHistoryDatasSnap(fjztPoint, begin.getTime()/1000 , date.getTime()/1000 , null, 3600l);
+                for (int x = 0;x<speedpoints.size();x++){
+                    if (fjztpoints.get(x).getPointValueInDouble()==1){
+                        PointVo vo = new PointVo();
+                        vo.setX(speedpoints.get(x).getPointValueInDouble());
+                        vo.setY(powerpoints.get(x).getPointValueInDouble());
+                        tempList.add(vo);
+                    }
+                }
+                List<PointVo> collect = tempList.stream().filter(i -> i.getY() >= 0 && i.getY() <= (CacheContext.modelpower.get(wt.getId())*1.5) && i.getX()>=0 && i.getX()<=25).collect(Collectors.toList());
+                Collections.sort(collect, Comparator.comparing(PointVo::getY));
+                double[] speeds = collect.stream().map(i -> i.getX()).mapToDouble(Double::doubleValue).toArray();
+                double[] powers = collect.stream().map(i -> i.getY()).mapToDouble(Double::doubleValue).toArray();
+                pointVoList = LineBuild.buildLine(speeds, powers, speeds.length, 20, 0.01);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            pointVoList.stream().forEach(pointVo -> {
+                Windturbinepower windturbinepower = new Windturbinepower();
+                windturbinepower.setId(CommonUtils.getUUID());
+                windturbinepower.setWindturbineid(wt.getId());
+                windturbinepower.setWindpowerstationid(wt.getWindpowerstationid());
+                windturbinepower.setSpeed(pointVo.getX());
+                windturbinepower.setTheorypower(pointVo.getY());
+                resultList.add(windturbinepower);
+            });
+        });
+        windturbinepowerService.saveBatch(resultList);
+        Map<String,Map<Double,Double>> zzsglMap = new HashMap<>();
+        wtls.stream().forEach(wt->{
+            List<Windturbinepower> windturbinepowers = resultList.stream().filter(p -> p.getWindturbineid().equals(wt.getId())).collect(Collectors.toList());
+            Map<Double,Double> doubleMap = new HashMap<>();
+            windturbinepowers.stream().forEach(w->{
+                doubleMap.put(w.getSpeed(),w.getTheorypower());
+            });
+            zzsglMap.put(wt.getId(),doubleMap);
+        });
+        redisService.set("ZZSGL", JSONObject.toJSONString(zzsglMap));
+
+    }
+
+
+
+
+    private PointData createPointData(Windturbinetestingpointnew fjfdl, Double rfdl) {
+        PointData pointData = new PointData();
+        pointData.setEdnaId(fjfdl.getCode());
+        pointData.setPointName(fjfdl.getName());
+        pointData.setPointTime(currentDate.getTime());
+        pointData.setPointValueInDouble(rfdl);
+        pointData.setPointValue(String.valueOf(rfdl));
+        return pointData;
+    }
+
+    private PointData createWpPointData(Windpowerstationpointnew linepointnew, double linespeed) {
+        PointData pointData = new PointData();
+        pointData.setEdnaId(linepointnew.getCode());
+        pointData.setPointTime(currentDate.getTime());
+        pointData.setPointName(linepointnew.getName());
+        pointData.setPointValue(String.valueOf(linespeed));
+        pointData.setPointValueInDouble(linespeed);
+        return pointData;
+    }
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IEquipmentmodelService.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.Equipmentmodel;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-28
+ */
+public interface IEquipmentmodelService extends IService<Equipmentmodel> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/ILineService.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.Line;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface ILineService extends IService<Line> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IMeterpointService.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.Meterpoint;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface IMeterpointService extends IService<Meterpoint> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IMeterpointvalueService.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.Meterpointvalue;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-21
+ */
+public interface IMeterpointvalueService extends IService<Meterpointvalue> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IProjectService.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.Project;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface IProjectService extends IService<Project> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IShutdowneventService.java

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

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindpowerstationService.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.Windpowerstation;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface IWindpowerstationService extends IService<Windpowerstation> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindpowerstationpointnewService.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.Windpowerstationpointnew;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-02
+ */
+public interface IWindpowerstationpointnewService extends IService<Windpowerstationpointnew> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindpowerstationstandardpointService.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.Windpowerstationstandardpoint;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface IWindpowerstationstandardpointService extends IService<Windpowerstationstandardpoint> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindpowerstationtestingpointService.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.Windpowerstationtestingpoint;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface IWindpowerstationtestingpointService extends IService<Windpowerstationtestingpoint> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindturbineService.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.Windturbine;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface IWindturbineService extends IService<Windturbine> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindturbinepowerService.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.Windturbinepower;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-04-26
+ */
+public interface IWindturbinepowerService extends IService<Windturbinepower> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindturbinestandardpointService.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.Windturbinestandardpoint;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface IWindturbinestandardpointService extends IService<Windturbinestandardpoint> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindturbinestatusdiService.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.Windturbinestatusdi;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-28
+ */
+public interface IWindturbinestatusdiService extends IService<Windturbinestatusdi> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindturbinetestingpointaiService.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.Windturbinetestingpointai;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+public interface IWindturbinetestingpointaiService extends IService<Windturbinetestingpointai> {
+
+}

+ 16 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/IWindturbinetestingpointnewService.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.Windturbinetestingpointnew;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-02
+ */
+public interface IWindturbinetestingpointnewService extends IService<Windturbinetestingpointnew> {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/EquipmentmodelServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.Equipmentmodel;
+import com.gyee.generation.mapper.auto.EquipmentmodelMapper;
+import com.gyee.generation.service.auto.IEquipmentmodelService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-28
+ */
+@Service
+public class EquipmentmodelServiceImpl extends ServiceImpl<EquipmentmodelMapper, Equipmentmodel> implements IEquipmentmodelService {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/LineServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.Line;
+import com.gyee.generation.mapper.auto.LineMapper;
+import com.gyee.generation.service.auto.ILineService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Service
+public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements ILineService {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/MeterpointServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.Meterpoint;
+import com.gyee.generation.mapper.auto.MeterpointMapper;
+import com.gyee.generation.service.auto.IMeterpointService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Service
+public class MeterpointServiceImpl extends ServiceImpl<MeterpointMapper, Meterpoint> implements IMeterpointService {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/MeterpointvalueServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.Meterpointvalue;
+import com.gyee.generation.mapper.auto.MeterpointvalueMapper;
+import com.gyee.generation.service.auto.IMeterpointvalueService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-21
+ */
+@Service
+public class MeterpointvalueServiceImpl extends ServiceImpl<MeterpointvalueMapper, Meterpointvalue> implements IMeterpointvalueService {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/ProjectServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.Project;
+import com.gyee.generation.mapper.auto.ProjectMapper;
+import com.gyee.generation.service.auto.IProjectService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Service
+public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> implements IProjectService {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/ShutdowneventServiceImpl.java

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

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindpowerstationServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.Windpowerstation;
+import com.gyee.generation.mapper.auto.WindpowerstationMapper;
+import com.gyee.generation.service.auto.IWindpowerstationService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Service
+public class WindpowerstationServiceImpl extends ServiceImpl<WindpowerstationMapper, Windpowerstation> implements IWindpowerstationService {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindpowerstationpointnewServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.Windpowerstationpointnew;
+import com.gyee.generation.mapper.auto.WindpowerstationpointnewMapper;
+import com.gyee.generation.service.auto.IWindpowerstationpointnewService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-02
+ */
+@Service
+public class WindpowerstationpointnewServiceImpl extends ServiceImpl<WindpowerstationpointnewMapper, Windpowerstationpointnew> implements IWindpowerstationpointnewService {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindpowerstationstandardpointServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.Windpowerstationstandardpoint;
+import com.gyee.generation.mapper.auto.WindpowerstationstandardpointMapper;
+import com.gyee.generation.service.auto.IWindpowerstationstandardpointService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Service
+public class WindpowerstationstandardpointServiceImpl extends ServiceImpl<WindpowerstationstandardpointMapper, Windpowerstationstandardpoint> implements IWindpowerstationstandardpointService {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindpowerstationtestingpointServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.Windpowerstationtestingpoint;
+import com.gyee.generation.mapper.auto.WindpowerstationtestingpointMapper;
+import com.gyee.generation.service.auto.IWindpowerstationtestingpointService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Service
+public class WindpowerstationtestingpointServiceImpl extends ServiceImpl<WindpowerstationtestingpointMapper, Windpowerstationtestingpoint> implements IWindpowerstationtestingpointService {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindturbineServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.Windturbine;
+import com.gyee.generation.mapper.auto.WindturbineMapper;
+import com.gyee.generation.service.auto.IWindturbineService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Service
+public class WindturbineServiceImpl extends ServiceImpl<WindturbineMapper, Windturbine> implements IWindturbineService {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindturbinepowerServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.Windturbinepower;
+import com.gyee.generation.mapper.auto.WindturbinepowerMapper;
+import com.gyee.generation.service.auto.IWindturbinepowerService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-04-26
+ */
+@Service
+public class WindturbinepowerServiceImpl extends ServiceImpl<WindturbinepowerMapper, Windturbinepower> implements IWindturbinepowerService {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindturbinestandardpointServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.Windturbinestandardpoint;
+import com.gyee.generation.mapper.auto.WindturbinestandardpointMapper;
+import com.gyee.generation.service.auto.IWindturbinestandardpointService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Service
+public class WindturbinestandardpointServiceImpl extends ServiceImpl<WindturbinestandardpointMapper, Windturbinestandardpoint> implements IWindturbinestandardpointService {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindturbinestatusdiServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.Windturbinestatusdi;
+import com.gyee.generation.mapper.auto.WindturbinestatusdiMapper;
+import com.gyee.generation.service.auto.IWindturbinestatusdiService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-28
+ */
+@Service
+public class WindturbinestatusdiServiceImpl extends ServiceImpl<WindturbinestatusdiMapper, Windturbinestatusdi> implements IWindturbinestatusdiService {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindturbinetestingpointaiServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.Windturbinetestingpointai;
+import com.gyee.generation.mapper.auto.WindturbinetestingpointaiMapper;
+import com.gyee.generation.service.auto.IWindturbinetestingpointaiService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-02-28
+ */
+@Service
+public class WindturbinetestingpointaiServiceImpl extends ServiceImpl<WindturbinetestingpointaiMapper, Windturbinetestingpointai> implements IWindturbinetestingpointaiService {
+
+}

+ 20 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/auto/impl/WindturbinetestingpointnewServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.Windturbinetestingpointnew;
+import com.gyee.generation.mapper.auto.WindturbinetestingpointnewMapper;
+import com.gyee.generation.service.auto.IWindturbinetestingpointnewService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-03-02
+ */
+@Service
+public class WindturbinetestingpointnewServiceImpl extends ServiceImpl<WindturbinetestingpointnewMapper, Windturbinetestingpointnew> implements IWindturbinetestingpointnewService {
+
+}

+ 201 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/task/SaticScheduleTask.java

@@ -0,0 +1,201 @@
+package com.gyee.generation.task;
+
+
+import com.gyee.common.util.DateUtils;
+import com.gyee.generation.service.*;
+import com.xxl.job.core.context.XxlJobHelper;
+import com.xxl.job.core.handler.annotation.XxlJob;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+
+/**
+ * @ClassName : SaticScheduleTask
+ * @Description : 调度
+ */
+
+
+@Component
+public class SaticScheduleTask {
+
+    private static Logger logger = LoggerFactory.getLogger(SaticScheduleTask.class);
+
+    @Resource
+    private GenerationService generationService;
+    @Resource
+    private StatusService statusService;
+    @Resource
+    private AverageAndGeneratingService averageAndGeneratingService;
+    @Resource
+    private RealtimeSpeedPowerService realtimeSpeedPowerService;
+    @Resource
+    private TheorypowerService theorypowerService;
+    @Resource
+    private FiveLossesService fiveLossesService;
+    @Resource
+    private SafetyService safetyService;
+    //3.添加定时任务
+    /**
+     * 电计量实时计算计算(电量,上网,购网,场用)
+     * 每15分钟执行一次
+     */
+    @XxlJob("electricityMetering7001-realtime")
+    public void electricityMetering()  {
+
+
+        XxlJobHelper.log("电计量实时调度程序执行开始!........");
+        try {
+            generationService.saveGenerationDatas();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        XxlJobHelper.log("电计量实时调度任务处理完成!........");
+    }
+
+    /**
+     * 存储meterpointvalue
+     * 每10分钟执行一次
+     */
+    @XxlJob("electricityMetering7001-history1")
+    public void history1()  {
+
+        XxlJobHelper.log("电计量历史1调度程序执行开始!........");
+        String date = DateUtils.toDate1(DateUtils.getCurrentDate());
+        try {
+            generationService.saveMeterpointValueRealtime(date,date);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        XxlJobHelper.log("电计量历史1调度任务处理完成!........");
+    }
+
+    /**
+     * 存储meterpointvalue(处理每天最后一个值,保证是第二天0点值)
+     * 每天0:30执行
+     */
+    @XxlJob("electricityMetering7001-history2")
+    public void history2()  {
+
+        XxlJobHelper.log("电计量历史2调度程序执行开始!........");
+        String yesterdayStr = DateUtils.getYesterdayStr("yyyy-MM-dd");
+        try {
+            generationService.saveMeterpointValueRealtime(yesterdayStr,yesterdayStr);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        XxlJobHelper.log("电计量历史2调度任务处理完成!........");
+    }
+
+    /**
+     * 实时状态计算
+     * 只执行一次(死循环)
+     * 2s
+     */
+    @XxlJob("status7001-realtime")
+    public void status() throws Exception {
+        while(true){
+            XxlJobHelper.log("实时状态调度程序执行开始!........");
+            statusService.calculateStatus();
+            statusService.calculateStatusNumber();
+            XxlJobHelper.log("实时状态调度程序执行完成!........");
+        }
+
+    }
+
+    /**
+     * 平均风速,平均功率,scada发电量计算
+     * 每10分钟一次
+     */
+    @XxlJob("averageandGenerating7001-realtime")
+    public void averageandGenerating() throws Exception {
+            XxlJobHelper.log("平均风速,功率,scada发电量调度程序执行开始!........");
+            averageAndGeneratingService.saveAvespeedAndAvepowerAndScada();
+            XxlJobHelper.log("平均风速,功率,scada发电量调度程序执行完成!........");
+    }
+
+    /**
+     * 实时风速功率
+     * 只执行一次(死循环)
+     * 2s
+     */
+    @XxlJob("speedAndPower7001-realtime")
+    public void speedAndPower() throws Exception {
+        while (true){
+            XxlJobHelper.log("实时风速,实时功率调度程序执行开始!........");
+            realtimeSpeedPowerService.calculateRealtimeSpeedPower();
+            XxlJobHelper.log("实时风速,实时功率调度程序执行完成!........");
+        }
+    }
+
+    /**
+     * 拟合功率曲线,存储到数据库中
+     * 一个月执行一次
+     * @throws Exception
+     */
+    @XxlJob("fittingpower7001-realtime")
+    public void fittingpower() throws Exception {
+        XxlJobHelper.log("拟合功率曲线调度程序执行开始!........");
+        theorypowerService.fittingPower();
+        XxlJobHelper.log("拟合功率曲线调度程序执行完成!........");
+    }
+
+
+    /**
+     * 计算理论功率,保证功率
+     * 死循环
+     * 10min
+     * @throws Exception
+     */
+    @XxlJob("theropower7001-realtime")
+    public void theropower() throws Exception {
+        while (true){
+            XxlJobHelper.log("理论保证功率调度程序执行开始!........");
+            theorypowerService.theropower();
+            XxlJobHelper.log("理论保证功率调度程序执行完成!........");
+        }
+
+    }
+
+    /**
+     * 计算损失电量
+     * 1小时一次(*:20)
+     * 30min
+     * @throws Exception
+     */
+    @XxlJob("losses7001-realtime")
+    public void losses() throws Exception {
+            XxlJobHelper.log("损失电量调度程序执行开始!........");
+            fiveLossesService.lossesReal();
+            XxlJobHelper.log("损失电量调度程序执行完成!........");
+    }
+
+    /**
+     * 安全天数
+     * 每日0点
+     * @throws Exception
+     */
+    @XxlJob("safe7001-realtime")
+    public void safety() throws Exception {
+        XxlJobHelper.log("安全天数调度程序执行开始!........");
+        safetyService.safetyReatimel();
+        XxlJobHelper.log("安全天数调度程序执行完成!........");
+    }
+
+    /**
+     * 保存shutdownevent
+     * 2分钟执行一次
+     */
+    @XxlJob("shutdownevent7001-realtime")
+    public void shutdownevent(){
+        XxlJobHelper.log("故障事件调度程序执行开始!........");
+        fiveLossesService.saveShutdownevent();
+        XxlJobHelper.log("故障事件调度程序执行完成!........");
+    }
+
+
+
+}

+ 48 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/util/realtimesource/ApiGolden.java

@@ -0,0 +1,48 @@
+/** 
+ * Project Name:nxfd2 
+ * File Name:ApiEdos.java 
+ * Package Name:com.gyee.frame.util
+ * Date:2016-7-25下午12:26:14 
+ * Copyright (c) 2016, chenzhou1025@126.com All Rights Reserved. 
+ * 
+ */
+
+package com.gyee.generation.util.realtimesource;
+
+import org.springframework.web.client.RestTemplate;
+
+/**
+ * ClassName:ApiEdos <br/>
+ * Function: TODO ADD FUNCTION. <br/>
+ * Reason: TODO ADD REASON. <br/>
+ * Date: 2016-7-25 下午12:26:14 <br/>
+ * 
+ * @author 石林
+ * @version
+ * @since JDK 1.6
+ * @see
+ */
+public class ApiGolden {
+
+    private static RestTemplate restTemplate = null;
+
+  
+    private ApiGolden() {
+
+    }
+
+    public static RestTemplate getInstance() {
+    	
+    	
+
+        if (restTemplate == null) {
+        	
+        	restTemplate = new RestTemplate();
+
+        }
+
+        return restTemplate;
+
+    }
+
+}

File diff suppressed because it is too large
+ 1316 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/util/realtimesource/EdosUtil.java


File diff suppressed because it is too large
+ 1316 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/util/realtimesource/EdosUtilTd.java


+ 27 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/util/realtimesource/GoldenConfig.java

@@ -0,0 +1,27 @@
+package com.gyee.generation.util.realtimesource;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * 读取项目相关配置
+ * 
+ * @author gyee
+ */
+
+@Configuration
+@ConfigurationProperties(prefix = "golden")
+public class GoldenConfig
+{
+    private static String baseURL;
+
+    public static String getBaseurl() {
+        return baseURL;
+    }
+
+    public  void setBaseurl(String baseURL) {
+        GoldenConfig.baseURL = baseURL;
+    }
+}
+
+

+ 262 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/util/realtimesource/IEdosUtil.java

@@ -0,0 +1,262 @@
+package com.gyee.generation.util.realtimesource;
+
+
+import com.gyee.common.model.DNAStatVal;
+import com.gyee.common.model.DNAVal;
+import com.gyee.common.model.PointData;
+import com.gyee.generation.model.auto.Windpowerstationpointnew;
+import com.gyee.generation.model.auto.Windturbinetestingpointnew;
+
+import java.util.List;
+import java.util.Map;
+
+
+public interface IEdosUtil {
+
+	/**
+	 * 通过风场测点获得测点实时数据
+	 * @param point 只是用了code字段,作为唯一标识
+	 * @return
+	 * @throws Exception
+	 */
+    public PointData getRealData(Windpowerstationpointnew point) throws Exception;
+
+
+    /**
+     * 通过风场测点获得测点切面数据
+     * @param point 只是用了code字段,作为唯一标识
+     * @param date 时间
+     * @return
+     * @throws Exception
+     */
+    public PointData getSectionData(String point,Long date) throws Exception;
+
+
+    /**
+     * 通过风场测点获得测点切面数据
+     * @param point 只是用了code字段,作为唯一标识
+     * @param date 时间
+     * @return
+     * @throws Exception
+     */
+    public PointData getSectionData(Windpowerstationpointnew point,Long date) throws Exception;
+
+    /**
+     * 通过风机测点获得测点切面数据
+     * @param point 只是用了code字段,作为唯一标识
+     * @param date 时间
+     * @return
+     * @throws Exception
+     */
+    public PointData getSectionData(Windturbinetestingpointnew point,Long date) throws Exception;
+
+    /**
+     * 通过风场测点获得测点历史快照数据
+     * @param point 只是用了code字段,作为唯一标识
+     * @param beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @param count  点数
+     * @param pried  时间间隔
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistoryDatasSnap(Windpowerstationpointnew point, Long beginDate, Long endDate, Long count, Long pried) throws Exception;
+
+    /**
+     * 通过风场测点获得测点历史存储数据,存多少取多少
+     * @param point 只是用了code字段,作为唯一标识
+     * @param beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistoryDatasRaw(Windpowerstationpointnew point, Long beginDate, Long endDate) throws Exception;
+
+    /**
+     * 通过风机测点获得测点实时数据
+     * @param point 只是用了id字段,作为唯一标识
+     * @return
+     * @throws Exception
+     */
+    public PointData getRealData(Windturbinetestingpointnew point) throws Exception;
+
+    /**
+     * 通过风机测点获得历史快照
+     * @param point  只是用了id字段,作为唯一标识
+     * @param  beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @param count  点数
+     * @param pried  时间间隔
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistoryDatasSnap(Windturbinetestingpointnew point, Long beginDate, Long endDate, Long count, Long pried) throws Exception;
+
+    /**
+     * 通过风机测点获得测点历史存储数据,存多少取多少
+     * @param point 只是用了id字段,作为唯一标识
+     * @param  beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistoryDatasRaw(Windturbinetestingpointnew point, Long beginDate, Long endDate) throws Exception;
+
+
+    /**
+     * 通过风机测点获得测点实时数据
+     * @param pointid 测点编号
+     * @return
+     * @throws Exception
+     */
+    public PointData getRealData(String pointid) throws Exception;
+
+    /**
+     * 通过全局点名获得测点实时数据 读取多个点
+     * @param pointids 测点的数组
+     * @return 列表集合
+     * @throws Exception
+     */
+    public List<PointData> getRealData(String... pointids) throws Exception;
+    /**
+     * 通过全局点名获得测点实时数据 读取多个点
+     * @param pointids 测点的列表
+     * @return 列表集合
+     * @throws Exception
+     */
+    public List<PointData> getRealData(List<String> pointids) throws Exception;
+    /**
+     * 通过全局点名获得测点实时数据 读取多个点
+     * @param pointids 测点的数组
+     * @return Map集合
+     * @throws Exception
+     */
+    public Map<String,Double> getRealDataMap(String... pointids) throws Exception;
+
+    /**
+     * 通过全局点名获得历史数据快照
+     * @param pointid  全局点名
+     * @param beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @param count  点数
+     * @param pried  时间间隔
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistoryDatasSnap(String pointid, Long beginDate, Long endDate, Long count, Long pried) throws Exception;
+
+    /**
+     * 通过风机测点获得测点历史存储数据,存多少取多少
+     * @param pointid 全局点名
+     * @param  beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistoryDatasRaw(String pointid, Long beginDate, Long endDate) throws Exception;
+
+
+    /**
+     * 通过风机测点获得测点指定时间周期的统计数据
+     * @param point 只是用了id字段,作为唯一标识
+     * @param  beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @param count  点数
+     * @param pried  时间间隔
+     * @type 0、最大值。1、最小值。、平均值
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistStat(Windturbinetestingpointnew point, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception;
+
+    /**
+     * 通过风场测点获得测点指定时间周期的统计数据
+     * @param point 只是用了code字段,作为唯一标识
+     * @param  beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @param count  点数
+     * @param pried  时间间隔
+     * @type 0、最大值。1、最小值。、平均值
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistStat(Windpowerstationpointnew point, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception;
+
+    /**
+     * 通过全局点名获得测点指定时间周期的统计数据
+     * @param pointid 全局点名
+     * @param  beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @param count  点数
+     * @param pried  时间间隔
+     * @type 0、最大值。1、最小值。、平均值
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistStat(String pointid, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception;
+
+    /**
+     * 通过全局点名获得测点指定时间周期的统计数据 同时返回max、min、avg数据
+     * @param point 全局点名
+     * @param  beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @param pried  时间间隔
+     * @return
+     * @throws Exception
+     */
+    public DNAStatVal[] getHistStat(String point, Long beginDate, Long endDate, Integer pried) throws Exception;
+    /**
+     * 补录单点历史数据
+     * @param point 测点对象
+     * @return
+     * @throws Exception
+     */
+    public void updatePoint(PointData point) throws Exception;
+
+    /**
+     * 批量查询实时数据
+     * @param tagNames 测点字符串数组
+     * @return
+     * @throws Exception
+     */
+
+    public DNAVal[] getRealtimeTagValues(String... tagNames) throws Exception;
+
+    /**
+     * 批量插入历史数据
+     * @param pointls 测点对象集合
+     * @throws Exception
+     */
+    public void updatePoint(List<PointData> pointls) throws Exception;
+
+    /**
+     * 单点写入实时数据
+     * @param point 测点对象
+     * @throws Exception
+     */
+    public void sendSinglePoint(PointData point) throws Exception ;
+    /**
+     * 批量写入实时数据
+     * @param pointls 测点对象列表
+     * @throws Exception
+     */
+    public void sendMultiPoint(List<PointData> pointls) throws Exception ;
+
+    /**
+     * 通过两个字符串数组对象批量写入实时数据
+     * @param realvalue 插入值字符串数组
+     * @param pointls 存储对象数组对象
+     * @throws Exception
+     */
+
+    public void sendMultiPoint(String[] realvalue,DNAVal[] pointls) throws Exception;
+    /**
+     *
+     * @param nameList 测点名称列表集合
+     * @param tTime  时间点(秒级)
+     * @return
+     * @throws Exception
+     */
+    public DNAVal[] getHistMatrix(String[] nameList, int tTime) throws Exception;
+
+}

+ 0 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/util/realtimesource/StringUtil.java


Some files were not shown because too many files changed in this diff