Browse Source

修改配置

xieshengjie 3 years ago
parent
commit
f45890166f
16 changed files with 312 additions and 105 deletions
  1. 8 2
      common/src/main/java/com/gyee/common/contant/Contant.java
  2. BIN
      common/target/classes/com/gyee/common/contant/Contant.class
  3. 2 2
      histroy/benchmarking-histroy-new/src/main/resources/application-jn.yml
  4. 2 2
      histroy/benchmarking-histroy-new/src/main/resources/application.yml
  5. 91 0
      histroy/benchmarking-histroy-new/target/classes/application-hb.yml
  6. 88 0
      histroy/benchmarking-histroy-new/target/classes/application-jn.yml
  7. 3 90
      histroy/benchmarking-histroy-new/target/classes/application.yml
  8. BIN
      histroy/benchmarking-histroy-new/target/classes/com/gyee/benchmarkinghistroy/init/CacheContext.class
  9. BIN
      histroy/benchmarking-histroy-new/target/classes/com/gyee/benchmarkinghistroy/service/benchmarking/BenchmarkingHistroyService.class
  10. BIN
      histroy/benchmarking-histroy-new/target/classes/com/gyee/benchmarkinghistroy/service/specific/SpecificService.class
  11. 114 5
      realtime/generation-service/src/main/java/com/gyee/generation/service/GenerationService.java
  12. 2 2
      realtime/meteorologicalcollection/src/main/resources/application.yml
  13. 2 2
      realtime/meteorologicalcollection/target/classes/application.yml
  14. BIN
      realtime/meteorologicalcollection/target/classes/com/gyee/meteorological/service/collection/CollectionService.class
  15. BIN
      realtime/meteorologicalcollection/target/meteorologicalcollection-1.0-SNAPSHOT.jar
  16. BIN
      realtime/meteorologicalcollection/target/meteorologicalcollection-1.0-SNAPSHOT.jar.original

+ 8 - 2
common/src/main/java/com/gyee/common/contant/Contant.java

@@ -17,7 +17,13 @@ public class Contant {
 
     public static String RFDLB = "RFDLB"; //日发电量(升压站)
 
-    public static String YFDLB = "";//月发电量(升压站)
+    public static String YFDLB = "YFDLB";//月发电量(升压站)
 
-    public static String NFDLB = "";//年发电量(升压站)
+    public static String NFDLB = "NFDLB";//年发电量(升压站)
+
+    public static String SWDLB = "SWDLB"; //日上网发电量
+
+    public static String SWDLY = "SWDLY"; //月上网发电量
+
+    public static String SWDLN = "SWDLN"; //年上网发电量
 }

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


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

@@ -9,7 +9,7 @@ spring:
     allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
   #redis集群
   redis:
-    host: 10.8.3.155
+    host: 10.81.3.155
     port: 6379
     timeout: 100000
     #    集群环境打开下面注释,单机不需要打开
@@ -33,7 +33,7 @@ spring:
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
     driver-class-name: org.postgresql.Driver
-    url: jdbc:postgresql://10.8.3.151:5432/wisdom
+    url: jdbc:postgresql://10.81.3.151:5432/wisdom
     username: postgres
     password:
     oracle-schema=:

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

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

+ 91 - 0
histroy/benchmarking-histroy-new/target/classes/application-hb.yml

@@ -0,0 +1,91 @@
+server:
+  port: 8091
+  servlet:
+    context-path: /
+
+
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  #redis集群
+  redis:
+    host: 192.168.2.202
+#    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:@192.168.2.215:1521:gdsj
+    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://192.168.2.205:8011/ts
+

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

@@ -0,0 +1,88 @@
+server:
+  port: 8091
+  servlet:
+    context-path: /
+
+
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  #redis集群
+  redis:
+    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: 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: org.postgresql.Driver
+    url: jdbc:postgresql://10.81.3.151:5432/wisdom
+    username: postgres
+    password:
+    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://192.168.2.205:8011/ts
+

+ 3 - 90
histroy/benchmarking-histroy-new/target/classes/application.yml

@@ -1,91 +1,4 @@
-server:
-  port: 8091
-  servlet:
-    context-path: /
-
-
 spring:
-  main:
-    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
-  #redis集群
-  redis:
-    host: 192.168.2.202
-#    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:@192.168.2.215:1521:gdsj
-    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://192.168.2.205:8011/ts
-
+  profiles:
+    active: jn
+#    active: test

BIN
histroy/benchmarking-histroy-new/target/classes/com/gyee/benchmarkinghistroy/init/CacheContext.class


BIN
histroy/benchmarking-histroy-new/target/classes/com/gyee/benchmarkinghistroy/service/benchmarking/BenchmarkingHistroyService.class


BIN
histroy/benchmarking-histroy-new/target/classes/com/gyee/benchmarkinghistroy/service/specific/SpecificService.class


+ 114 - 5
realtime/generation-service/src/main/java/com/gyee/generation/service/GenerationService.java

@@ -23,7 +23,8 @@ public class GenerationService {
 
     private IEdosUtil edosUtil = new EdosUtil();
 
-    public void saveGenerationDatas(){
+    public void saveGenerationDatas() throws Exception {
+        List<PointData> resultList = new ArrayList<>();
         List<Windpowerstation> wpls = CacheContext.wpls;
         Map<String, List<Project>> wppromap = CacheContext.wppromap;
         Map<String, List<Line>> prolinemap = CacheContext.prolinemap;
@@ -35,6 +36,15 @@ public class GenerationService {
         Date monthFirstZero = DateUtils.getMonthFirstZero();
         Date yearFirstZero = DateUtils.getYearFirstZero();
         Date currentDate = DateUtils.getCurrentDate();
+        AtomicReference<Double> fdrfdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> fdyfdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> fdnfdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> gfrfdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> gfyfdl = new AtomicReference<>(0.0);
+        AtomicReference<Double> gfnfdl = new AtomicReference<>(0.0);
+        Double gsrfdl = 0.0;
+        Double gsyfdl = 0.0;
+        Double gsnfdl = 0.0;
         wpls.stream().forEach(wp->{
             Map<String, Windpowerstationpointnew> wpmap = wppointmap.get(wp.getId());
             AtomicReference<Double> fcrfdl = new AtomicReference<>((double) 0);
@@ -78,6 +88,7 @@ public class GenerationService {
                             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)));
@@ -87,6 +98,7 @@ public class GenerationService {
                             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)));
@@ -96,55 +108,152 @@ public class GenerationService {
                             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();
                         }
                     }
                 });
                 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);
             });
+            //风场日发电量
             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);
+            //给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());
+            }else if (wp.getId().endsWith("GDC")){
+                gfrfdl.updateAndGet(v -> v + fcrfdl.get());
+                gfyfdl.updateAndGet(v -> v + fcyfdl.get());
+                gfnfdl.updateAndGet(v -> v + fcnfdl.get());
+            }
         });
+        //风电日发电量
+        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);
+        //风场日发电量
+        gsrfdl = fdrfdl.get()+gfrfdl.get();
+        gsyfdl = fdyfdl.get()+gfyfdl.get();
+        gsnfdl = fdnfdl.get()+gfnfdl.get();
+        PointData r = new PointData();
+        r.setPointTime(currentDate.getTime());
+        r.setPointValue(String.valueOf(gsrfdl));
+        r.setPointValueInDouble(gsrfdl);
+        r.setEdnaId(wppointmap.get("0").get(Contant.RFDLB).getCode());
+        r.setPointName(wppointmap.get("0").get(Contant.RFDLB).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());
+        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());
+        resultList.add(n);
+
+        edosUtil.sendMultiPoint(resultList);
     }
+
 }

+ 2 - 2
realtime/meteorologicalcollection/src/main/resources/application.yml

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

+ 2 - 2
realtime/meteorologicalcollection/target/classes/application.yml

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

BIN
realtime/meteorologicalcollection/target/classes/com/gyee/meteorological/service/collection/CollectionService.class


BIN
realtime/meteorologicalcollection/target/meteorologicalcollection-1.0-SNAPSHOT.jar


BIN
realtime/meteorologicalcollection/target/meteorologicalcollection-1.0-SNAPSHOT.jar.original