Bläddra i källkod

和风程序修改。

xieshengjie 2 år sedan
förälder
incheckning
afbe74acd5

+ 87 - 0
histroy/healthmanagement-histroy-hb/src/main/resources/application-hb.yml

@@ -0,0 +1,87 @@
+server:
+  port: 8093
+  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
+    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
+
+

+ 87 - 0
histroy/healthmanagement-histroy-hb/src/main/resources/application-hf.yml

@@ -0,0 +1,87 @@
+server:
+  port: 8093
+  servlet:
+    context-path: /
+
+
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  #redis集群
+  redis:
+#    host: 49.4.50.80
+    host: 10.0.118.73
+    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: oracle.jdbc.OracleDriver
+    #外网
+    url: jdbc:oracle:thin:@10.0.118.71: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
+
+

+ 2 - 86
histroy/healthmanagement-histroy-hb/src/main/resources/application.yml

@@ -1,87 +1,3 @@
-server:
-  port: 8093
-  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
-    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
-
-
+  profiles:
+    active: hf

+ 19 - 0
web/benchmarking-web-hb/src/main/java/com/gyee/benchmarkingweb/controller/benching/BenchmarkingController.java

@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * @ClassName : BenchmarkingController
@@ -47,6 +48,24 @@ public class BenchmarkingController {
         }
     }
 
+    /**
+     * 和风场站列表
+     * @return
+     */
+    @GetMapping("/hfwplist")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R hfwplist(){
+        List<Windpowerstation> resultList = benchmarkingService.wplist().stream().filter(wp->wp.getId().equals("FS_FDC")).collect(Collectors.toList());
+
+        if (StringUtils.isNotNull(resultList)) {
+            SortUtils.sort(resultList,"ordernum",SortUtils.ASC);
+            return R.ok(resultList.size()).data(resultList);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
 
     /**
      * GF场站列表

+ 1 - 1
web/benchmarking-web-hb/src/main/resources/application.yml

@@ -1,5 +1,5 @@
 spring:
   profiles:
-    active: gd
+    active: hf
 #    active: dev
 #    active: hf

+ 7 - 0
web/consumer/src/main/java/com/gyee/consumer/api/benching/BenchmarkingApi.java

@@ -16,6 +16,13 @@ public interface BenchmarkingApi {
     @GetMapping("/wplist")
     public R wplist();
 
+    /**
+     * 和风场站列表
+     * @return
+     */
+    @GetMapping("/hfwplist")
+    public R hfwplist();
+
 
     /**
      * GF场站列表

+ 9 - 0
web/consumer/src/main/java/com/gyee/consumer/controller/benching/BenchmarkingController.java

@@ -27,6 +27,15 @@ public class BenchmarkingController {
     }
 
     /**
+     * 和风场站列表
+     * @return
+     */
+    @GetMapping(value = "/consumer/benchmarking/hfwplist")
+    public R hfwplist(){
+        return benchmarkingApi.hfwplist();
+    }
+
+    /**
      * 光伏场站列表
      * @return
      */

+ 1 - 1
web/consumer/src/main/resources/application.yml

@@ -1,5 +1,5 @@
 spring:
   profiles:
-    active: dev
+    active: hf
 #    active: jn
 #    active: dev

+ 1 - 2
web/healthmanagement-web-hb/src/main/resources/application.yml

@@ -1,4 +1,3 @@
 spring:
   profiles:
-#    active: jn
-    active: dev
+    active: hf

+ 99 - 0
web/knowledge-hb/src/main/resources/application-hf.yml

@@ -0,0 +1,99 @@
+server:
+  port: 8086
+  servlet:
+    context-path: /
+
+
+spring:
+  application:
+    name: knowledge-provider
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  cloud:
+    nacos:
+      discovery:
+        server-addr: 10.0.118.73:8848
+        #指定yaml格式的配置
+        file-extension: yaml
+        cluster-name: master
+      username: nacos
+      password: nacos
+  #redis集群
+  redis:
+#    host: 10.83.68.94
+    host: 10.0.118.73
+    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: oracle.jdbc.OracleDriver
+    #外网
+    url: jdbc:oracle:thin:@10.0.118.71:1521:gdsj
+#    url: jdbc:oracle:thin:@10.83.68.165: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
+
+

+ 1 - 1
web/knowledge-hb/src/main/resources/application.yml

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