xieshengjie il y a 3 ans
Parent
commit
15fd8e1656
97 fichiers modifiés avec 1182 ajouts et 502 suppressions
  1. 4 0
      cache/pom.xml
  2. 92 0
      cache/src/main/resources/application-hb.yml
  3. 89 0
      cache/src/main/resources/application-jn.yml
  4. 3 91
      cache/src/main/resources/application.yml
  5. BIN
      cache/target/cache-1.0-SNAPSHOT.jar
  6. BIN
      cache/target/cache-1.0-SNAPSHOT.jar.original
  7. 92 0
      cache/target/classes/application-hb.yml
  8. 89 0
      cache/target/classes/application-jn.yml
  9. 3 91
      cache/target/classes/application.yml
  10. 5 0
      cache/target/maven-archiver/pom.properties
  11. 0 0
      cache/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  12. 63 0
      cache/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  13. 12 4
      common/src/main/java/com/gyee/common/contant/Contant.java
  14. 2 0
      common/src/main/java/com/gyee/common/util/DateUtils.java
  15. BIN
      common/target/classes/com/gyee/common/contant/Contant.class
  16. BIN
      common/target/classes/com/gyee/common/util/DateUtils.class
  17. BIN
      common/target/common-1.0-SNAPSHOT.jar
  18. 2 2
      histroy/benchmarking-histroy-new/src/main/resources/application-jn.yml
  19. 2 2
      histroy/benchmarking-histroy-new/src/main/resources/application.yml
  20. 2 2
      histroy/benchmarking-histroy-new/target/classes/application-jn.yml
  21. 1 1
      histroy/benchmarking-histroy-new/target/classes/application.yml
  22. 2 0
      realtime/generation-service/src/main/java/com/gyee/generation/GenerationMain.java
  23. 0 44
      realtime/generation-service/src/main/java/com/gyee/generation/config/RedisAutoConfiguration.java
  24. 0 46
      realtime/generation-service/src/main/java/com/gyee/generation/config/RedisConfig.java
  25. 2 3
      realtime/generation-service/src/main/java/com/gyee/generation/init/CacheContext.java
  26. 577 165
      realtime/generation-service/src/main/java/com/gyee/generation/service/GenerationService.java
  27. 0 51
      realtime/generation-service/src/main/java/com/gyee/generation/util/PageUtil.java
  28. 29 0
      realtime/generation-service/src/test/java/com/gyee/generation/GenerationTest.java
  29. BIN
      realtime/generation-service/target/classes/com/gyee/generation/GenerationMain.class
  30. BIN
      realtime/generation-service/target/classes/com/gyee/generation/config/RedisAutoConfiguration.class
  31. BIN
      realtime/generation-service/target/classes/com/gyee/generation/config/RedisConfig.class
  32. BIN
      realtime/generation-service/target/classes/com/gyee/generation/controller/WindpowerstationpointnewController.class
  33. BIN
      realtime/generation-service/target/classes/com/gyee/generation/controller/WindturbinetestingpointnewController.class
  34. BIN
      realtime/generation-service/target/classes/com/gyee/generation/init/CacheContext$1.class
  35. BIN
      realtime/generation-service/target/classes/com/gyee/generation/init/CacheContext$2.class
  36. BIN
      realtime/generation-service/target/classes/com/gyee/generation/init/CacheContext$3.class
  37. BIN
      realtime/generation-service/target/classes/com/gyee/generation/init/CacheContext$4.class
  38. BIN
      realtime/generation-service/target/classes/com/gyee/generation/init/CacheContext.class
  39. BIN
      realtime/generation-service/target/classes/com/gyee/generation/mapper/auto/WindpowerstationpointnewMapper.class
  40. BIN
      realtime/generation-service/target/classes/com/gyee/generation/mapper/auto/WindturbinetestingpointnewMapper.class
  41. BIN
      realtime/generation-service/target/classes/com/gyee/generation/model/auto/Windpowerstationpointnew.class
  42. BIN
      realtime/generation-service/target/classes/com/gyee/generation/model/auto/Windturbinetestingpointnew.class
  43. BIN
      realtime/generation-service/target/classes/com/gyee/generation/service/GenerationService.class
  44. BIN
      realtime/generation-service/target/classes/com/gyee/generation/service/auto/IWindpowerstationpointnewService.class
  45. BIN
      realtime/generation-service/target/classes/com/gyee/generation/service/auto/IWindturbinetestingpointnewService.class
  46. BIN
      realtime/generation-service/target/classes/com/gyee/generation/service/auto/impl/WindpowerstationpointnewServiceImpl.class
  47. BIN
      realtime/generation-service/target/classes/com/gyee/generation/service/auto/impl/WindturbinetestingpointnewServiceImpl.class
  48. BIN
      realtime/generation-service/target/classes/com/gyee/generation/util/PageUtil.class
  49. BIN
      realtime/generation-service/target/test-classes/com/gyee/generation/GenerationTest.class
  50. 15 0
      web/adapter-td-hb/pom.xml
  51. 96 0
      web/adapter-td-hb/target/classes/application.yml
  52. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/AdapterMain8029.class
  53. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/common/config/HiveConfiguration.class
  54. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/common/config/MongodbConfiguration.class
  55. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/common/config/OracleConfiguration.class
  56. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/common/config/TaosConfiguration.class
  57. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/common/config/ThreadPoolTaskConfig.class
  58. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/common/constant/Constant.class
  59. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/common/constant/Interpolation.class
  60. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/common/exception/AdviceException.class
  61. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/common/exception/CustomException.class
  62. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/common/exception/WisdomException.class
  63. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/common/result/JsonResult.class
  64. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/common/result/ResultCode.class
  65. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/common/util/DataUtil.class
  66. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/common/util/TDengineUtil.class
  67. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/common/util/TaosCovertUtil.class
  68. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/controller/TsDataController.class
  69. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/dao/TaosHistoryDao.class
  70. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/dao/TaosLatestDao.class
  71. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/dao/TaskCallable.class
  72. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/TsPointEntity.class
  73. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/BaseTsQuery.class
  74. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/BasicTsData.class
  75. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/BasicTsPoint.class
  76. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/BooleanTsData.class
  77. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/DoubleStatData.class
  78. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/DoubleTsData.class
  79. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/GeneralTsData.class
  80. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/IntegerTsData.class
  81. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/LongTsData.class
  82. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/StringTsData.class
  83. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/ToData.class
  84. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/TsData.class
  85. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/TsDataType.class
  86. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/TsPoint.class
  87. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/TsPointData.class
  88. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/TsPointDataList.class
  89. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/TsQuery.class
  90. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/server/taos/ThingsPointService.class
  91. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/server/taos/TsDataService.class
  92. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/server/taos/TsPointService.class
  93. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/timeseries/TaosDao.class
  94. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/timeseries/dao/IDataChangeDao.class
  95. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/timeseries/dao/IHistoryDao.class
  96. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/timeseries/dao/ILatestDao.class
  97. BIN
      web/adapter-td-hb/target/classes/com/gyee/adapter/timeseries/dao/IThingsPointDao.class

+ 4 - 0
cache/pom.xml

@@ -75,6 +75,10 @@
             <version>1.0-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+        </dependency>
 
     </dependencies>
     <build>

+ 92 - 0
cache/src/main/resources/application-hb.yml

@@ -0,0 +1,92 @@
+server:
+  port: 8044
+  servlet:
+    context-path: /
+
+
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  #redis集群
+  redis:
+#    host: 49.4.50.80
+    host: 10.83.68.94
+    port: 6379
+    timeout: 100000
+    #    集群环境打开下面注释,单机不需要打开
+    #    cluster:
+    #      集群信息
+    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
+    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
+    #      maxRedirects: 3
+    password:
+    application:
+      name: test
+    jedis:
+      pool:
+        max-active: 8
+        min-idle: 0
+        max-idle: 8
+        max-wait: -1
+    database: 19
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: oracle.jdbc.OracleDriver
+    #外网
+    url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
+#    url: jdbc:oracle:thin:@49.4.50.80:1521:gdnxfd
+    #    url: jdbc:oracle:thin:@172.168.1.14:1521:gdnxfd
+    username: gdprod
+    password: gd123
+    oracle-schema=:
+    #    type: com.alibaba.druid.pool.DruidDataSource
+    #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
+    #    username: root
+    #    password: root
+    #    driver-class-name: com.mysql.jdbc.Driver
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+logging:
+  level:
+    root: info
+    com.example: debug
+
+
+golden:
+  baseURL: http://10.155.32.4:8011/ts
+

+ 89 - 0
cache/src/main/resources/application-jn.yml

@@ -0,0 +1,89 @@
+server:
+  port: 8044
+  servlet:
+    context-path: /
+
+
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  #redis集群
+  redis:
+#    host: 49.4.50.80
+    host: 10.81.3.155
+    port: 6379
+    timeout: 100000
+    #    集群环境打开下面注释,单机不需要打开
+    #    cluster:
+    #      集群信息
+    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
+    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
+    #      maxRedirects: 3
+    password:
+    application:
+      name: test
+    jedis:
+      pool:
+        max-active: 8
+        min-idle: 0
+        max-idle: 8
+        max-wait: -1
+    database: 0
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: org.postgresql.Driver
+    url: jdbc:postgresql://10.81.3.151:5432/wisdom
+    username: gdprod
+    password: gd123
+    oracle-schema=:
+    #    type: com.alibaba.druid.pool.DruidDataSource
+    #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
+    #    username: root
+    #    password: root
+    #    driver-class-name: com.mysql.jdbc.Driver
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+logging:
+  level:
+    root: info
+    com.example: debug
+
+
+golden:
+  baseURL: http://10.155.32.4:8011/ts
+

+ 3 - 91
cache/src/main/resources/application.yml

@@ -1,92 +1,4 @@
-server:
-  port: 8044
-  servlet:
-    context-path: /
-
-
 spring:
-  main:
-    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
-  #redis集群
-  redis:
-#    host: 49.4.50.80
-    host: 10.83.68.94
-    port: 6379
-    timeout: 100000
-    #    集群环境打开下面注释,单机不需要打开
-    #    cluster:
-    #      集群信息
-    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
-    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
-    #      maxRedirects: 3
-    password:
-    application:
-      name: test
-    jedis:
-      pool:
-        max-active: 8
-        min-idle: 0
-        max-idle: 8
-        max-wait: -1
-    database: 19
-  autoconfigure:
-    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
-  datasource:
-    type: com.alibaba.druid.pool.DruidDataSource
-    driver-class-name: oracle.jdbc.OracleDriver
-    #外网
-    url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
-#    url: jdbc:oracle:thin:@49.4.50.80:1521:gdnxfd
-    #    url: jdbc:oracle:thin:@172.168.1.14:1521:gdnxfd
-    username: gdprod
-    password: gd123
-    oracle-schema=:
-    #    type: com.alibaba.druid.pool.DruidDataSource
-    #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
-    #    username: root
-    #    password: root
-    #    driver-class-name: com.mysql.jdbc.Driver
-    druid:
-      max-active: 20
-      initial-size: 1
-      min-idle: 3
-      max-wait: 60000
-      time-between-eviction-runs-millis: 60000
-      min-evictable-idle-time-millis: 300000
-      test-while-idle: true
-      test-on-borrow: false
-      test-on-return: false
-  servlet:
-    multipart:
-      # 开启 multipart 上传功能
-      enabled: true
-      # 文件写入磁盘的阈值
-      file-size-threshold: 2KB
-      # 最大文件大小
-      max-file-size: 200MB
-      # 最大请求大小
-      max-request-size: 215MB
-
-mybatis-plus:
-  configuration:
-    map-underscore-to-camel-case: true
-    auto-mapping-behavior: full
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-  mapper-locations: classpath*:mapper/**/*Mapper.xml
-  global-config:
-    # 逻辑删除配置
-    db-config:
-      id-type: auto
-      # 删除前
-      logic-not-delete-value: 1
-      # 删除后
-      logic-delete-value: 0
-logging:
-  level:
-    root: info
-    com.example: debug
-
-
-golden:
-  baseURL: http://10.155.32.4:8011/ts
-
+  profiles:
+    active: jn
+#    active: test

BIN
cache/target/cache-1.0-SNAPSHOT.jar


BIN
cache/target/cache-1.0-SNAPSHOT.jar.original


+ 92 - 0
cache/target/classes/application-hb.yml

@@ -0,0 +1,92 @@
+server:
+  port: 8044
+  servlet:
+    context-path: /
+
+
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  #redis集群
+  redis:
+#    host: 49.4.50.80
+    host: 10.83.68.94
+    port: 6379
+    timeout: 100000
+    #    集群环境打开下面注释,单机不需要打开
+    #    cluster:
+    #      集群信息
+    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
+    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
+    #      maxRedirects: 3
+    password:
+    application:
+      name: test
+    jedis:
+      pool:
+        max-active: 8
+        min-idle: 0
+        max-idle: 8
+        max-wait: -1
+    database: 19
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: oracle.jdbc.OracleDriver
+    #外网
+    url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
+#    url: jdbc:oracle:thin:@49.4.50.80:1521:gdnxfd
+    #    url: jdbc:oracle:thin:@172.168.1.14:1521:gdnxfd
+    username: gdprod
+    password: gd123
+    oracle-schema=:
+    #    type: com.alibaba.druid.pool.DruidDataSource
+    #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
+    #    username: root
+    #    password: root
+    #    driver-class-name: com.mysql.jdbc.Driver
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+logging:
+  level:
+    root: info
+    com.example: debug
+
+
+golden:
+  baseURL: http://10.155.32.4:8011/ts
+

+ 89 - 0
cache/target/classes/application-jn.yml

@@ -0,0 +1,89 @@
+server:
+  port: 8044
+  servlet:
+    context-path: /
+
+
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  #redis集群
+  redis:
+#    host: 49.4.50.80
+    host: 10.81.3.155
+    port: 6379
+    timeout: 100000
+    #    集群环境打开下面注释,单机不需要打开
+    #    cluster:
+    #      集群信息
+    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
+    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
+    #      maxRedirects: 3
+    password:
+    application:
+      name: test
+    jedis:
+      pool:
+        max-active: 8
+        min-idle: 0
+        max-idle: 8
+        max-wait: -1
+    database: 0
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: org.postgresql.Driver
+    url: jdbc:postgresql://10.81.3.151:5432/wisdom
+    username: gdprod
+    password: gd123
+    oracle-schema=:
+    #    type: com.alibaba.druid.pool.DruidDataSource
+    #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
+    #    username: root
+    #    password: root
+    #    driver-class-name: com.mysql.jdbc.Driver
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+logging:
+  level:
+    root: info
+    com.example: debug
+
+
+golden:
+  baseURL: http://10.155.32.4:8011/ts
+

+ 3 - 91
cache/target/classes/application.yml

@@ -1,92 +1,4 @@
-server:
-  port: 8044
-  servlet:
-    context-path: /
-
-
 spring:
-  main:
-    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
-  #redis集群
-  redis:
-#    host: 49.4.50.80
-    host: 10.83.68.94
-    port: 6379
-    timeout: 100000
-    #    集群环境打开下面注释,单机不需要打开
-    #    cluster:
-    #      集群信息
-    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
-    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
-    #      maxRedirects: 3
-    password:
-    application:
-      name: test
-    jedis:
-      pool:
-        max-active: 8
-        min-idle: 0
-        max-idle: 8
-        max-wait: -1
-    database: 19
-  autoconfigure:
-    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
-  datasource:
-    type: com.alibaba.druid.pool.DruidDataSource
-    driver-class-name: oracle.jdbc.OracleDriver
-    #外网
-    url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
-#    url: jdbc:oracle:thin:@49.4.50.80:1521:gdnxfd
-    #    url: jdbc:oracle:thin:@172.168.1.14:1521:gdnxfd
-    username: gdprod
-    password: gd123
-    oracle-schema=:
-    #    type: com.alibaba.druid.pool.DruidDataSource
-    #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
-    #    username: root
-    #    password: root
-    #    driver-class-name: com.mysql.jdbc.Driver
-    druid:
-      max-active: 20
-      initial-size: 1
-      min-idle: 3
-      max-wait: 60000
-      time-between-eviction-runs-millis: 60000
-      min-evictable-idle-time-millis: 300000
-      test-while-idle: true
-      test-on-borrow: false
-      test-on-return: false
-  servlet:
-    multipart:
-      # 开启 multipart 上传功能
-      enabled: true
-      # 文件写入磁盘的阈值
-      file-size-threshold: 2KB
-      # 最大文件大小
-      max-file-size: 200MB
-      # 最大请求大小
-      max-request-size: 215MB
-
-mybatis-plus:
-  configuration:
-    map-underscore-to-camel-case: true
-    auto-mapping-behavior: full
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-  mapper-locations: classpath*:mapper/**/*Mapper.xml
-  global-config:
-    # 逻辑删除配置
-    db-config:
-      id-type: auto
-      # 删除前
-      logic-not-delete-value: 1
-      # 删除后
-      logic-delete-value: 0
-logging:
-  level:
-    root: info
-    com.example: debug
-
-
-golden:
-  baseURL: http://10.155.32.4:8011/ts
-
+  profiles:
+    active: jn
+#    active: test

+ 5 - 0
cache/target/maven-archiver/pom.properties

@@ -0,0 +1,5 @@
+#Generated by Maven
+#Tue Mar 08 16:45:36 CST 2022
+version=1.0-SNAPSHOT
+groupId=com.gyee
+artifactId=cache

+ 0 - 0
cache/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst


+ 63 - 0
cache/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -0,0 +1,63 @@
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\IDatacenterpointService.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\controller\LineController.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\config\GeneratorCodeConfig.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\controller\ModelpowerrdController.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\controller\DatacenterpointController.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\mapper\auto\DatacenterpointMapper.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\controller\WindturbinetestingpointnewController.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\model\auto\Line.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\impl\ProjectServiceImpl.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\impl\WindpowerstationServiceImpl.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\IModelpowerrdService.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\impl\WindpowerstationpointnewServiceImpl.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\controller\WindpowerstationtestingpointController.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\IDatacenterService.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\mapper\auto\WindpowerstationpointnewMapper.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\mapper\auto\WindturbinetestingpointaiMapper.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\impl\DatacenterpointServiceImpl.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\mapper\auto\ProjectMapper.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\IWindturbinetestingpointnewService.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\model\auto\Windpowerstationpointnew.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\impl\DatacenterServiceImpl.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\model\auto\Windturbinetestingpointai.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\impl\WindpowerstationtestingpointServiceImpl.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\impl\RedisServiceImpl.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\CacheMain.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\mapper\auto\WindturbineMapper.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\IWindturbineService.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\IWindpowerstationpointnewService.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\model\auto\Datacenter.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\impl\WindturbineServiceImpl.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\init\CacheContext.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\controller\WindturbineController.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\RedisService.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\mapper\auto\WindpowerstationMapper.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\model\auto\Windturbine.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\impl\ModelpowerrdServiceImpl.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\IProjectService.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\controller\ProjectController.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\mapper\auto\WindturbinetestingpointnewMapper.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\IWindturbinetestingpointaiService.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\config\MybatisPlusConfig.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\model\auto\Windturbinetestingpointnew.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\config\RedisConfig.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\ILineService.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\controller\DatacenterController.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\model\auto\Datacenterpoint.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\mapper\auto\DatacenterMapper.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\mapper\auto\WindpowerstationtestingpointMapper.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\model\auto\Windpowerstationtestingpoint.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\IWindpowerstationtestingpointService.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\impl\WindturbinetestingpointnewServiceImpl.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\model\auto\Modelpowerrd.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\controller\WindpowerstationController.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\controller\WindpowerstationpointnewController.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\mapper\auto\LineMapper.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\model\auto\Project.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\controller\WindturbinetestingpointaiController.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\model\auto\Windpowerstation.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\config\RedisAutoConfiguration.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\impl\LineServiceImpl.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\mapper\auto\ModelpowerrdMapper.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\IWindpowerstationService.java
+D:\work\ideawork\sis\sis\cache\src\main\java\com\gyee\cache\service\auto\impl\WindturbinetestingpointaiServiceImpl.java

+ 12 - 4
common/src/main/java/com/gyee/common/contant/Contant.java

@@ -16,14 +16,22 @@ public class Contant {
     public static String benchPoints = "RSDJZSDL,RSSTZSDL,RXNZSDL,RSQXZSDL,RGZZSDL,RSZZSDL,RJXZSDL,RLZZSDL,RQFZSDL,RXDZSDL,RWZZSDL,RTZZSDL";
 
     public static String RFDLB = "RFDLB"; //日发电量(升压站)
-
     public static String YFDLB = "YFDLB";//月发电量(升压站)
-
     public static String NFDLB = "NFDLB";//年发电量(升压站)
 
     public static String SWDLB = "SWDLB"; //日上网发电量
-
     public static String SWDLY = "SWDLY"; //月上网发电量
-
     public static String SWDLN = "SWDLN"; //年上网发电量
+
+    public static String GWGWB="GWGWB";//工网电量
+    public static String GWGWY="GWGWY";//月工网电量
+    public static String GWGWN="GWGWN";//年工网电量
+
+    public static String NWGWB="NWGWB";//农网电量
+    public static String NWGWY="NWGWY";//月农网电量
+    public static String NWGWN="NWGWN";//年农网电量
+
+    public static String CYDLB="CYDLB";//场用电量
+    public static String CYDLY="CYDLY";//月场用电量
+    public static String CYDLN="CYDLN";//年场用电量
 }

+ 2 - 0
common/src/main/java/com/gyee/common/util/DateUtils.java

@@ -1017,6 +1017,8 @@ public class DateUtils  {
         Calendar calendar = Calendar.getInstance();
         int year = calendar.get(Calendar.YEAR);
         calendar.set(Calendar.YEAR, year);
+        calendar.set(Calendar.MONTH,0);
+        calendar.set(Calendar.DAY_OF_MONTH,1);
         calendar.set(Calendar.HOUR_OF_DAY, 0);
         calendar.set(Calendar.MINUTE, 0);
         calendar.set(Calendar.SECOND, 0);

BIN
common/target/classes/com/gyee/common/contant/Contant.class


BIN
common/target/classes/com/gyee/common/util/DateUtils.class


BIN
common/target/common-1.0-SNAPSHOT.jar


+ 2 - 2
histroy/benchmarking-histroy-new/src/main/resources/application-jn.yml

@@ -34,8 +34,8 @@ spring:
     type: com.alibaba.druid.pool.DruidDataSource
     driver-class-name: org.postgresql.Driver
     url: jdbc:postgresql://10.81.3.151:5432/wisdom
-    username: postgres
-    password:
+    username: gdprod
+    password: gd123
     oracle-schema=:
     #    type: com.alibaba.druid.pool.DruidDataSource
     #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC

+ 2 - 2
histroy/benchmarking-histroy-new/src/main/resources/application.yml

@@ -1,4 +1,4 @@
 spring:
   profiles:
-#    active: jn
-    active: hb
+    active: jn
+#    active: hb

+ 2 - 2
histroy/benchmarking-histroy-new/target/classes/application-jn.yml

@@ -34,8 +34,8 @@ spring:
     type: com.alibaba.druid.pool.DruidDataSource
     driver-class-name: org.postgresql.Driver
     url: jdbc:postgresql://10.81.3.151:5432/wisdom
-    username: postgres
-    password:
+    username: gdprod
+    password: gd123
     oracle-schema=:
     #    type: com.alibaba.druid.pool.DruidDataSource
     #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC

+ 1 - 1
histroy/benchmarking-histroy-new/target/classes/application.yml

@@ -1,4 +1,4 @@
 spring:
   profiles:
     active: jn
-#    active: test
+#    active: hb

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

@@ -1,5 +1,6 @@
 package com.gyee.generation;
 
+import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 
@@ -10,6 +11,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
  * @Description :
  */
 @SpringBootApplication
+@MapperScan("com.gyee.generation.mapper")
 public class GenerationMain {
     public static void main(String[] args) {
         SpringApplication.run(GenerationMain.class,args);

+ 0 - 44
realtime/generation-service/src/main/java/com/gyee/generation/config/RedisAutoConfiguration.java

@@ -1,44 +0,0 @@
-package com.gyee.generation.config;
-
-import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.connection.RedisConnectionFactory;
-import org.springframework.data.redis.core.RedisOperations;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.data.redis.core.StringRedisTemplate;
-
-import java.net.UnknownHostException;
-
-@Configuration
-@ConditionalOnClass(RedisOperations.class)
-@EnableConfigurationProperties(RedisProperties.class)
-public class RedisAutoConfiguration {
-
-
-    @Bean
-    @ConditionalOnMissingBean(name = "redisTemplate")
-    public RedisTemplate<Object, Object> redisTemplate(
-            RedisConnectionFactory redisConnectionFactory) throws UnknownHostException {
-        RedisTemplate<Object, Object> template = new RedisTemplate<>();
-        template.setConnectionFactory(redisConnectionFactory);
-        return template;
-
-    }
-
-
-    @Bean
-    @ConditionalOnMissingBean
-    public StringRedisTemplate stringRedisTemplate(
-            RedisConnectionFactory redisConnectionFactory) throws UnknownHostException {
-        StringRedisTemplate template = new StringRedisTemplate();
-        template.setConnectionFactory(redisConnectionFactory);
-        return template;
-
-    }
-
-
-}

+ 0 - 46
realtime/generation-service/src/main/java/com/gyee/generation/config/RedisConfig.java

@@ -1,46 +0,0 @@
-package com.gyee.generation.config;
-
-import com.fasterxml.jackson.annotation.JsonAutoDetect;
-import com.fasterxml.jackson.annotation.PropertyAccessor;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.connection.RedisConnectionFactory;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
-import org.springframework.data.redis.serializer.StringRedisSerializer;
-
-/**
-
-/**
- *@ClassName RedisConfig
- *@Description TODO
- *@Author 谢生杰
- *@Date 2020/9/14 10:42
- *@Version 1.0
- **/
-@Configuration
-public class RedisConfig {
-    @Bean
-    @SuppressWarnings("all")
-    public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory) {
-        RedisTemplate<String, Object> template = new RedisTemplate<String, Object>();
-        template.setConnectionFactory(factory);
-        Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
-        ObjectMapper om = new ObjectMapper();
-        om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
-        om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
-        jackson2JsonRedisSerializer.setObjectMapper(om);
-        StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
-        // key采用String的序列化方式
-        template.setKeySerializer(stringRedisSerializer);
-        // hash的key也采用String的序列化方式
-        template.setHashKeySerializer(stringRedisSerializer);
-        // value序列化方式采用jackson
-        template.setValueSerializer(jackson2JsonRedisSerializer);
-        // hash的value序列化方式采用jackson
-        template.setHashValueSerializer(jackson2JsonRedisSerializer);
-        template.afterPropertiesSet();
-        return template;
-    }
-}

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

@@ -1,7 +1,6 @@
 package com.gyee.generation.init;
 
 
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.TypeReference;
 import com.gyee.generation.model.auto.*;
@@ -83,10 +82,10 @@ public class CacheContext implements CommandLineRunner {
         String wpString = redisService.get("PRODUCT-WP");
         wppointmap = JSONObject.parseObject(wpString, new TypeReference<Map<String, Map<String, Windpowerstationpointnew>>>() {
         });
-        String pjString = JSON.toJSONString(redisService.get("PRODUCT-PJ"));
+        String pjString = redisService.get("PRODUCT-PJ");
         propointmap = JSONObject.parseObject(pjString, new TypeReference<Map<String, Map<String, Windpowerstationpointnew>>>() {
         });
-        String lnString = JSON.toJSONString(redisService.get("PRODUCT-LN"));
+        String lnString = redisService.get("PRODUCT-LN");
         linepointmap = JSONObject.parseObject(lnString, new TypeReference<Map<String, Map<String, Windpowerstationpointnew>>>() {
         });
 

+ 577 - 165
realtime/generation-service/src/main/java/com/gyee/generation/service/GenerationService.java

@@ -2,11 +2,14 @@ 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.EdosUtil;
 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 java.util.*;
@@ -21,11 +24,19 @@ import java.util.concurrent.atomic.AtomicReference;
 @Service
 public class GenerationService {
 
+   private Log log = LogFactory.getLog(GenerationService.class);
+
     private IEdosUtil edosUtil = new EdosUtil();
 
+    /**
+     * 保存电计量电量,场用电量,购网电量,上网电量
+     * @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;
@@ -42,189 +53,525 @@ public class GenerationService {
         AtomicReference<Double> gfrfdl = new AtomicReference<>(0.0);
         AtomicReference<Double> gfyfdl = new AtomicReference<>(0.0);
         AtomicReference<Double> gfnfdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> fdrswdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> fdyswdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> fdnswdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> gfrswdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> gfyswdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> gfnswdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> fdrgwdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> fdygwdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> fdngwdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> gfrgwdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> gfygwdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> gfngwdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> gfrcydl = new AtomicReference<>(0.0);
+        AtomicReference<Double> gfycydl = new AtomicReference<>(0.0);
+        AtomicReference<Double> gfncydl = new AtomicReference<>(0.0);
+        AtomicReference<Double> fdrcydl = new AtomicReference<>(0.0);
+        AtomicReference<Double> fdycydl = new AtomicReference<>(0.0);
+        AtomicReference<Double> fdncydl = new AtomicReference<>(0.0);
+
         Double gsrfdl = 0.0;
         Double gsyfdl = 0.0;
         Double gsnfdl = 0.0;
-        wpls.stream().forEach(wp->{
+        lines.parallelStream().forEach(line->{
+            Map<String, Windpowerstationpointnew> linemap = linepointmap.get(line.getId());
+            //线路发电量
+            Optional<Meterpoint> fdlOptional = meterpoints.stream().filter(me -> me.getUniformcode().equals("ZXYG") && me.getMetertype().equals("进线") && me.getMetersort().equals("主")).findFirst();
+            computeFdl(fdlList, samedayZero, monthFirstZero, yearFirstZero, currentDate, linemap, fdlOptional);
+        });
+        wpls.parallelStream().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);
-            wppromap.get(wp.getId()).stream().forEach(project -> {
+            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()).parallelStream().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);
-                prolinemap.get(project.getId()).stream().forEach(line -> {
+                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()).parallelStream().forEach(line -> {
                     Map<String, Windpowerstationpointnew> linemap = linepointmap.get(line.getId());
-                    Optional<Meterpoint> optionalMeterpoint = meterpoints.stream().filter(me -> me.getUniformcode().equals("ZXYG") && me.getMetertype().equals("进线") && me.getMetersort().equals("主")).findFirst();
-                    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.getRealData(pointid).getPointValueInDouble();
-                            Optional<PointData> dayFirst = edosUtil.getHistoryDatasSnap(pointid, samedayZero.getTime() / 1000, samedayZero.getTime() / 1000, 1l, null).stream().findFirst();
-                            if (dayFirst.isPresent()){
-                                sameday = dayFirst.get().getPointValueInDouble();
-                            }
-                            Optional<PointData> monthFirst = edosUtil.getHistoryDatasSnap(pointid, monthFirstZero.getTime() / 1000, monthFirstZero.getTime() / 1000, 1l, null).stream().findFirst();
-                            if (monthFirst.isPresent()){
-                                month = monthFirst.get().getPointValueInDouble();
-                            }
-                            Optional<PointData> yearFirst = edosUtil.getHistoryDatasSnap(pointid, yearFirstZero.getTime() / 1000, yearFirstZero.getTime() / 1000, 1l, null).stream().findFirst();
-                            if (yearFirst.isPresent()){
-                                year = yearFirst.get().getPointValueInDouble();
-                            }
-                            Double magnification = optionalMeterpoint.get().getMagnification();
-                            double xlrfdl = (real - sameday) * magnification;
-                            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;
-                            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;
-                            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();
-                        }
-                    }
+                    //线路发电量
+                    Optional<Meterpoint> fdlOptional = meterpoints.stream().filter(me -> me.getUniformcode().equals("ZXYG") && me.getMetertype().equals("进线") && me.getMetersort().equals("主")).findFirst();
+                    lineFdl(resultList, samedayZero, monthFirstZero, yearFirstZero, currentDate, qcrfdl, qcyfdl, qcnfdl, linemap, fdlOptional);
+                    log.info(line.getName()+"电计量电量计算完毕!");
+                    //线路上网电量
+                    Optional<Meterpoint> swdlOptional = meterpoints.stream().filter(me -> me.getUniformcode().equals("ZXYG") && me.getMetertype().equals("出线") && me.getMetersort().equals("主") && me.getLineid().contains(line.getId())).findFirst();
+                    lineOrtherdl(fdlList,resultList, linepointmap, samedayZero, monthFirstZero, yearFirstZero, currentDate, qcrswdl, qcyswdl, qcnswdl, line, linemap, swdlOptional,Contant.SWDLB,Contant.SWDLY,Contant.SWDLN);
+                    log.info(line.getName()+"上网电量计算完毕!");
+                    //线路购网电量
+                    Optional<Meterpoint> gwdlOptional = meterpoints.stream().filter(me -> me.getUniformcode().equals("FXYG") && me.getMetertype().equals("出线") && me.getMetersort().equals("主") && me.getLineid().contains(line.getId())).findFirst();
+                    lineOrtherdl(fdlList,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,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()+"农网购网电量计算完毕!");
                 });
-                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);
+                //期次发电量
+                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()+"农网电量计算完毕!");
+
             });
-            //风场日发电量
-            PointData r = new PointData();
-            r.setPointTime(currentDate.getTime());
-            r.setPointValue(String.valueOf(fcrfdl.get()));
-            r.setPointValueInDouble(fcrfdl.get());
-            r.setEdnaId(wpmap.get(Contant.RFDLB).getCode());
-            r.setPointName(wpmap.get(Contant.RFDLB).getName());
-            resultList.add(r);
-            //风场月发电量
-            PointData y = new PointData();
-            y.setPointTime(currentDate.getTime());
-            y.setPointValue(String.valueOf(fcyfdl.get()));
-            y.setPointValueInDouble(fcyfdl.get());
-            y.setEdnaId(wpmap.get(Contant.YFDLB).getCode());
-            y.setPointName(wpmap.get(Contant.YFDLB).getName());
-            resultList.add(y);
-            //风场年发电量
-            PointData n = new PointData();
-            n.setPointTime(currentDate.getTime());
-            n.setPointValue(String.valueOf(fcnfdl.get()));
-            n.setPointValueInDouble(fcnfdl.get());
-            n.setEdnaId(wpmap.get(Contant.NFDLB).getCode());
-            n.setPointName(wpmap.get(Contant.NFDLB).getName());
-            resultList.add(n);
+            //场站发电量
+            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()+"农网购网电量计算完毕!");
+
             //给0,-1,-2赋值
             if (wp.getId().endsWith("FDC")){
                 fdrfdl.updateAndGet(v -> v + fcrfdl.get());
                 fdyfdl.updateAndGet(v -> v + fcyfdl.get());
                 fdnfdl.updateAndGet(v -> v + fcnfdl.get());
+                fdrswdl.updateAndGet(v -> v + fcrswdl.get());
+                fdyswdl.updateAndGet(v -> v + fcyswdl.get());
+                fdnswdl.updateAndGet(v -> v + fcnswdl.get());
+                fdrgwdl.updateAndGet(v -> v + fcrgwdl.get());
+                fdygwdl.updateAndGet(v -> v + fcygwdl.get());
+                fdngwdl.updateAndGet(v -> v + fcngwdl.get());
+                fdrcydl.updateAndGet(v -> v + fcrcydl.get());
+                fdycydl.updateAndGet(v -> v + fcycydl.get());
+                fdncydl.updateAndGet(v -> v + fcncydl.get());
             }else if (wp.getId().endsWith("GDC")){
                 gfrfdl.updateAndGet(v -> v + fcrfdl.get());
                 gfyfdl.updateAndGet(v -> v + fcyfdl.get());
                 gfnfdl.updateAndGet(v -> v + fcnfdl.get());
+                gfrswdl.updateAndGet(v -> v + fcrswdl.get());
+                gfyswdl.updateAndGet(v -> v + fcyswdl.get());
+                gfnswdl.updateAndGet(v -> v + fcnswdl.get());
+                gfrgwdl.updateAndGet(v -> v + fcrgwdl.get());
+                gfygwdl.updateAndGet(v -> v + fcygwdl.get());
+                gfngwdl.updateAndGet(v -> v + fcngwdl.get());
+                gfrcydl.updateAndGet(v -> v + fcrcydl.get());
+                gfycydl.updateAndGet(v -> v + fcycydl.get());
+                gfncydl.updateAndGet(v -> v + fcncydl.get());
+            }
+        });
+        //0,-1,-2公司发电量
+        qygsFdl(resultList, wppointmap, currentDate, gsrfdl,gsyfdl,gsnfdl,fdrfdl, fdyfdl, fdnfdl, gfrfdl, gfyfdl, gfnfdl,Contant.RFDLB,Contant.YFDLB,Contant.NFDLB);
+        log.info("公司发电量计算完毕!");
+        //0,-1,-2公司上网电量
+        qygsFdl(resultList, wppointmap, currentDate, gsrfdl,gsyfdl,gsnfdl,fdrswdl, fdyswdl, fdnswdl, gfrswdl, gfyswdl, gfnswdl,Contant.SWDLB,Contant.SWDLY,Contant.SWDLN);
+        log.info("公司上网电量计算完毕!");
+        //0,-1,-2公司购网电量
+        qygsFdl(resultList, wppointmap, currentDate, gsrfdl,gsyfdl,gsnfdl,fdrgwdl, fdygwdl, fdngwdl, gfrgwdl, gfygwdl, gfngwdl,Contant.GWGWB,Contant.GWGWY,Contant.GWGWN);
+        log.info("公司工网购网电量计算完毕!");
+        //0,-1,-2公司场用电量
+        qygsFdl(resultList, wppointmap, currentDate, gsrfdl,gsyfdl,gsnfdl,fdrcydl, fdycydl, fdncydl, gfrcydl, gfycydl, gfncydl,Contant.CYDLB,Contant.CYDLY,Contant.CYDLN);
+        log.info("公司场用电量计算完毕!");
+        //0,-1,-2公司农网电量
+        setGsZero(resultList,currentDate,wppointmap,"-1",Contant.NWGWB,Contant.NWGWY,Contant.NWGWN);
+        setGsZero(resultList,currentDate,wppointmap,"-2",Contant.NWGWB,Contant.NWGWY,Contant.NWGWN);
+        setGsZero(resultList,currentDate,wppointmap,"-0",Contant.NWGWB,Contant.NWGWY,Contant.NWGWN);
+        log.info("公司农网购网电量计算完毕!");
+        edosUtil.sendMultiPoint(resultList);
+    }
+
+
+    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())));
+                }
             }
         });
-        //风电日发电量
-        PointData fdr = new PointData();
-        fdr.setPointTime(currentDate.getTime());
-        fdr.setPointValue(String.valueOf(fdrfdl.get()));
-        fdr.setPointValueInDouble(fdrfdl.get());
-        fdr.setEdnaId(wppointmap.get("-1").get(Contant.RFDLB).getCode());
-        fdr.setPointName(wppointmap.get("-1").get(Contant.RFDLB).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(Contant.YFDLB).getCode());
-        fdy.setPointName(wppointmap.get("-1").get(Contant.YFDLB).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(Contant.NFDLB).getCode());
-        fdn.setPointName(wppointmap.get("-1").get(Contant.NFDLB).getName());
-        resultList.add(fdn);
-        //光伏日发电量
-        PointData gfr = new PointData();
-        gfr.setPointTime(currentDate.getTime());
-        gfr.setPointValue(String.valueOf(gfrfdl.get()));
-        gfr.setPointValueInDouble(gfrfdl.get());
-        gfr.setEdnaId(wppointmap.get("-2").get(Contant.RFDLB).getCode());
-        gfr.setPointName(wppointmap.get("-2").get(Contant.RFDLB).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(Contant.YFDLB).getCode());
-        gfy.setPointName(wppointmap.get("-2").get(Contant.YFDLB).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(Contant.NFDLB).getCode());
-        gfn.setPointName(wppointmap.get("-2").get(Contant.NFDLB).getName());
-        resultList.add(gfn);
+        //电量百分比
+        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,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.getRealData(pointid).getPointValueInDouble();
+                Optional<PointData> dayFirst = edosUtil.getHistoryDatasSnap(pointid, samedayZero.getTime() / 1000, samedayZero.getTime() / 1000, 1l, null).stream().findFirst();
+                if (dayFirst.isPresent()){
+                    sameday = dayFirst.get().getPointValueInDouble();
+                }
+                Optional<PointData> monthFirst = edosUtil.getHistoryDatasSnap(pointid, monthFirstZero.getTime() / 1000, monthFirstZero.getTime() / 1000, 1l, null).stream().findFirst();
+                if (monthFirst.isPresent()){
+                    month = monthFirst.get().getPointValueInDouble();
+                }
+                Optional<PointData> yearFirst = edosUtil.getHistoryDatasSnap(pointid, yearFirstZero.getTime() / 1000, yearFirstZero.getTime() / 1000, 1l, null).stream().findFirst();
+                if (yearFirst.isPresent()){
+                    year = yearFirst.get().getPointValueInDouble();
+                }
+                Double magnification = optionalMeterpoint.get().getMagnification();
+
+                double xlswdl = (real - sameday) * magnification * 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 * 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 * 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 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.getRealData(pointid).getPointValueInDouble();
+                Optional<PointData> dayFirst = edosUtil.getHistoryDatasSnap(pointid, samedayZero.getTime() / 1000, samedayZero.getTime() / 1000, 1l, null).stream().findFirst();
+                if (dayFirst.isPresent()){
+                    sameday = dayFirst.get().getPointValueInDouble();
+                }
+                Optional<PointData> monthFirst = edosUtil.getHistoryDatasSnap(pointid, monthFirstZero.getTime() / 1000, monthFirstZero.getTime() / 1000, 1l, null).stream().findFirst();
+                if (monthFirst.isPresent()){
+                    month = monthFirst.get().getPointValueInDouble();
+                }
+                Optional<PointData> yearFirst = edosUtil.getHistoryDatasSnap(pointid, yearFirstZero.getTime() / 1000, yearFirstZero.getTime() / 1000, 1l, null).stream().findFirst();
+                if (yearFirst.isPresent()){
+                    year = yearFirst.get().getPointValueInDouble();
+                }
+                Double magnification = fdlOptional.get().getMagnification();
+                double xlrfdl = (real - sameday) * magnification;
+                //线路日发电量
+                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;
+                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;
+                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 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.getRealData(pointid).getPointValueInDouble();
+                Optional<PointData> dayFirst = edosUtil.getHistoryDatasSnap(pointid, samedayZero.getTime() / 1000, samedayZero.getTime() / 1000, 1l, null).stream().findFirst();
+                if (dayFirst.isPresent()){
+                    sameday = dayFirst.get().getPointValueInDouble();
+                }
+                Optional<PointData> monthFirst = edosUtil.getHistoryDatasSnap(pointid, monthFirstZero.getTime() / 1000, monthFirstZero.getTime() / 1000, 1l, null).stream().findFirst();
+                if (monthFirst.isPresent()){
+                    month = monthFirst.get().getPointValueInDouble();
+                }
+                Optional<PointData> yearFirst = edosUtil.getHistoryDatasSnap(pointid, yearFirstZero.getTime() / 1000, yearFirstZero.getTime() / 1000, 1l, null).stream().findFirst();
+                if (yearFirst.isPresent()){
+                    year = yearFirst.get().getPointValueInDouble();
+                }
+                Double magnification = optionalMeterpoint.get().getMagnification();
+                double xlrfdl = (real - sameday) * magnification;
+                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;
+                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;
+                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();
@@ -233,27 +580,92 @@ public class GenerationService {
         r.setPointTime(currentDate.getTime());
         r.setPointValue(String.valueOf(gsrfdl));
         r.setPointValueInDouble(gsrfdl);
-        r.setEdnaId(wppointmap.get("0").get(Contant.RFDLB).getCode());
-        r.setPointName(wppointmap.get("0").get(Contant.RFDLB).getName());
+        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(Contant.YFDLB).getCode());
-        y.setPointName(wppointmap.get("0").get(Contant.YFDLB).getName());
+        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(Contant.NFDLB).getCode());
-        n.setPointName(wppointmap.get("0").get(Contant.NFDLB).getName());
+        n.setEdnaId(wppointmap.get("0").get(ncode).getCode());
+        n.setPointName(wppointmap.get("0").get(ncode).getName());
         resultList.add(n);
+    }
 
-        edosUtil.sendMultiPoint(resultList);
+
+
+
+    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);
+    }
+
+
+
 }

+ 0 - 51
realtime/generation-service/src/main/java/com/gyee/generation/util/PageUtil.java

@@ -1,51 +0,0 @@
-package com.gyee.generation.util;
-
-import java.util.List;
-
-/**
- * @ClassName : PageUtil
- * @Author : xieshengjie
- * @Date: 2021/5/16 20:44
- * @Description : 分页工具
- */
-public class PageUtil {
-    /**
-     * 开始分页
-     * @param list
-     * @param pageNum 页码
-     * @param pageSize 每页多少条数据
-     * @return
-     */
-    public static List startPage(List list, Integer pageNum,
-                                 Integer pageSize) {
-        if (list == null) {
-            return null;
-        }
-        if (list.size() == 0) {
-            return null;
-        }
-
-        Integer count = list.size(); // 记录总数
-        Integer pageCount = 0; // 页数
-        if (count % pageSize == 0) {
-            pageCount = count / pageSize;
-        } else {
-            pageCount = count / pageSize + 1;
-        }
-
-        int fromIndex = 0; // 开始索引
-        int toIndex = 0; // 结束索引
-
-        if (pageNum != pageCount) {
-            fromIndex = (pageNum - 1) * pageSize;
-            toIndex = fromIndex + pageSize;
-        } else {
-            fromIndex = (pageNum - 1) * pageSize;
-            toIndex = count;
-        }
-
-        List pageList = list.subList(fromIndex, toIndex);
-
-        return pageList;
-    }
-}

+ 29 - 0
realtime/generation-service/src/test/java/com/gyee/generation/GenerationTest.java

@@ -0,0 +1,29 @@
+package com.gyee.generation;
+
+import com.gyee.generation.service.GenerationService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+
+/**
+ * @ClassName : GenerationTest
+ * @Author : xieshengjie
+ * @Date: 2022/3/8 9:17
+ * @Description :
+ */
+@SpringBootTest
+@RunWith(SpringRunner.class)
+@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
+public class GenerationTest {
+    @Resource
+    private GenerationService generationService;
+    @Test
+    public void test1() throws Exception {
+        generationService.saveGenerationDatas();
+    }
+}

BIN
realtime/generation-service/target/classes/com/gyee/generation/GenerationMain.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/config/RedisAutoConfiguration.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/config/RedisConfig.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/controller/WindpowerstationpointnewController.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/controller/WindturbinetestingpointnewController.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/init/CacheContext$1.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/init/CacheContext$2.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/init/CacheContext$3.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/init/CacheContext$4.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/init/CacheContext.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/mapper/auto/WindpowerstationpointnewMapper.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/mapper/auto/WindturbinetestingpointnewMapper.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/model/auto/Windpowerstationpointnew.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/model/auto/Windturbinetestingpointnew.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/service/GenerationService.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/service/auto/IWindpowerstationpointnewService.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/service/auto/IWindturbinetestingpointnewService.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/service/auto/impl/WindpowerstationpointnewServiceImpl.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/service/auto/impl/WindturbinetestingpointnewServiceImpl.class


BIN
realtime/generation-service/target/classes/com/gyee/generation/util/PageUtil.class


BIN
realtime/generation-service/target/test-classes/com/gyee/generation/GenerationTest.class


+ 15 - 0
web/adapter-td-hb/pom.xml

@@ -50,5 +50,20 @@
 
 
     </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>

+ 96 - 0
web/adapter-td-hb/target/classes/application.yml

@@ -0,0 +1,96 @@
+server:
+  port: 8029
+  netty:
+    connection-timeout: 8000
+
+spring:
+#  redis:
+#    #    host: 49.4.50.80
+#    host: 10.83.68.94
+#    port: 6379
+#    timeout: 100000
+#    #    集群环境打开下面注释,单机不需要打开
+#    #    cluster:
+#    #      集群信息
+#    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
+#    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
+#    #      maxRedirects: 3
+#    password:
+#    application:
+#      name: test
+#    jedis:
+#      pool:
+#        max-active: 8
+#        min-idle: 0
+#        max-idle: 8
+#        max-wait: -1
+#    database: 1
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: oracle.jdbc.OracleDriver
+    #外网
+    url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
+    #    url: jdbc:oracle:thin:@49.4.50.80:1521:gdnxfd
+    #    url: jdbc:oracle:thin:@172.168.1.14:1521:gdnxfd
+    username: gdprod
+    password: gd123
+    oracle-schema=:
+    #    type: com.alibaba.druid.pool.DruidDataSource
+    #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
+    #    username: root
+    #    password: root
+    #    driver-class-name: com.mysql.jdbc.Driver
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  #热启动
+  devtools:
+    restart:
+      enabled: true
+      additional-paths: src/main/java
+      exclude: test/**
+
+timeseries:
+  db-type: redis #"${DATABASE_TYPE:sql}" # cassandra/kairosDB/hbase/opentsDB/influxDB/TiDB
+
+#taos数据库
+taos:
+  server_ip: 10.83.68.154
+  server_port: 6030
+  user_name: root
+  password: taosdata
+  pool_size: 5
+  max_pool_size: 20
+  database: hebei
+
+##taos数据库
+#mongodb:
+#  mongodb_ip: 10.83.68.94
+#  mongodb_port: 27017
+#  mongodb_perHost: 200
+#  mongodb_threadsAllowed: 200
+#  mongodb_connectTimeout: 60000
+#  mongodb_maxWaitTime: 60000
+#  mongodb_socketTimeout: 60000
+
+
+
+#适配器测点表
+windturbine.point.table_name: view_tspoint
+
+#备注
+#1、安装taos数据库客户端
+#2、配置C:\TDengine\cfg\taos.cfg文件
+#3、配置hosts文件
+#4、修改pom.xml文件的涛思数据库版本
+#5、修改application.yaml文件hive、taos的ip、port等
+#6、涛思数据库的版本要与服务器保持一致
+#7、部署时在服务器安装taos数据库客户端
+

BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/AdapterMain8029.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/common/config/HiveConfiguration.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/common/config/MongodbConfiguration.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/common/config/OracleConfiguration.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/common/config/TaosConfiguration.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/common/config/ThreadPoolTaskConfig.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/common/constant/Constant.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/common/constant/Interpolation.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/common/exception/AdviceException.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/common/exception/CustomException.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/common/exception/WisdomException.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/common/result/JsonResult.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/common/result/ResultCode.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/common/util/DataUtil.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/common/util/TDengineUtil.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/common/util/TaosCovertUtil.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/controller/TsDataController.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/dao/TaosHistoryDao.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/dao/TaosLatestDao.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/dao/TaskCallable.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/TsPointEntity.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/BaseTsQuery.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/BasicTsData.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/BasicTsPoint.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/BooleanTsData.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/DoubleStatData.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/DoubleTsData.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/GeneralTsData.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/IntegerTsData.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/LongTsData.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/StringTsData.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/ToData.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/TsData.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/TsDataType.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/TsPoint.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/TsPointData.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/TsPointDataList.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/model/adapter/TsQuery.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/server/taos/ThingsPointService.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/server/taos/TsDataService.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/server/taos/TsPointService.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/timeseries/TaosDao.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/timeseries/dao/IDataChangeDao.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/timeseries/dao/IHistoryDao.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/timeseries/dao/ILatestDao.class


BIN
web/adapter-td-hb/target/classes/com/gyee/adapter/timeseries/dao/IThingsPointDao.class