Explorar o código

修改配置信息和多适配器切换

shilin %!s(int64=3) %!d(string=hai) anos
pai
achega
9053a60ed5

+ 1 - 1
web/alarm-hb/src/main/java/com/gyee/wisdom/alarm/sharding/controller/AlarmCountController.java

@@ -398,7 +398,7 @@ public class AlarmCountController {
      */
     @GetMapping(value = "/count/query/alltotal")
     public AjaxResult querynew1(
-            @RequestParam(value = "stationid", required = false) String stId
+            @RequestParam(value = "stId", required = false) String stId
     ) {
         try {
             if(null ==stId || "0".equals(stId.trim())){

+ 2 - 2
web/alarm-hb/src/main/java/com/gyee/wisdom/alarm/sharding/mapper/ShutdownEventMapper.java

@@ -18,9 +18,9 @@ public interface ShutdownEventMapper extends BaseMapper<ShutdownEvent> {
 
     List<ShutdownEvent> queryShutdownEventList(@Param("stId") String stId, @Param("startdate") Date startdate, @Param("edtend") Date edtend);
 
-    List<ShutdownEvent> queryShutdownEventCurrentDate(String stId, Date currentDate);
+    List<ShutdownEvent> queryShutdownEventCurrentDate(@Param("stId")String stId, @Param("currentDate")Date currentDate);
 
-    Map<String, String> queryTodayCount(Date currentDate);
+    Map<String, String> queryTodayCount(@Param("currentDate")Date currentDate);
 
 
 }

+ 101 - 0
web/alarm-hb/src/main/resources/application-hb.yml

@@ -0,0 +1,101 @@
+server:
+  port: 8176
+
+spring:
+  profiles:
+    active: dev
+  application:
+    name: alarm-hb-provider
+    cloud:
+      nacos:
+        discovery:
+          server-addr: 192.168.2.198:8848
+          #指定yaml格式的配置
+          file-extension: yaml
+          cluster-name: master
+        username: nacos
+        password: nacos
+    #引入其他配置文件,例如ftpHX 未配置文件application-ftpHX.yml
+    #include: ftpHX,ftpCloud
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: oracle.jdbc.OracleDriver
+    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
+  jackson:
+    date-format: yyyy-MM-dd HH:mm:ss
+    time-zone: GMT+8
+    default-property-inclusion: always
+
+
+mybatis-plus:
+  typeAliasesPackage: com.gyee.wisdom.alarm.sharding.entity
+  mapper-locations: classpath:mappers/*.xml
+  global-config:
+    #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+    id-type: 3
+    #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+    field-strategy: 2
+    #驼峰下划线转换
+    db-column-underline: true
+    #mp2.3+ 全局表前缀 mp_
+    #table-prefix: mp_
+    #刷新mapper 调试神器
+    #refresh-mapper: true
+    #数据库大写下划线转换
+    #capital-mode: true
+    # Sequence序列接口实现类配置
+    key-generator: com.baomidou.mybatisplus.incrementer.OracleKeyGenerator
+    #逻辑删除配置(下面3个配置)
+    logic-delete-value: 1
+    logic-not-delete-value: 0
+    #sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
+    #自定义填充策略接口实现
+    #meta-object-handler: com.baomidou.springboot.MyMetaObjectHandler
+  configuration:
+    #配置返回数据库(column下划线命名&&返回java实体是驼峰命名),自动匹配无需as(没开启这个,SQL需要写as: select user_id as userId)
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+    #配置JdbcTypeForNull, oracle数据库必须配置
+    jdbc-type-for-null: 'null'
+    callSettersOnNulls: true
+
+logging:
+  level:
+    com:
+      gyee:
+        wisdom:
+          alarm:
+            sharding:
+              mapper: debug
+              service: info
+
+sharding:
+  config:
+    #分表开始时间  格式:yyyy-MM-dd
+    startDate: 2018-01-01
+count:
+  custom: false
+  fault: true
+
+stationname:
+  MHS,NSS,QS,SBQ,XS,DWK,PL,XH,MCH,HZJ
+#tablespace: TS_GDSJ_DATA
+tablespace: TS_NXFD_DATA

+ 102 - 0
web/alarm-hb/src/main/resources/application-hf.yml

@@ -0,0 +1,102 @@
+server:
+  port: 8176
+
+spring:
+  profiles:
+    active: dev
+  application:
+    name: alarm-hb-provider
+    cloud:
+      nacos:
+        discovery:
+          server-addr: 10.0.118.76:8848
+          #指定yaml格式的配置
+          file-extension: yaml
+          cluster-name: master
+        username: nacos
+        password: nacos
+    #引入其他配置文件,例如ftpHX 未配置文件application-ftpHX.yml
+    #include: ftpHX,ftpCloud
+  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
+  jackson:
+    date-format: yyyy-MM-dd HH:mm:ss
+    time-zone: GMT+8
+    default-property-inclusion: always
+
+
+mybatis-plus:
+  typeAliasesPackage: com.gyee.wisdom.alarm.sharding.entity
+  mapper-locations: classpath:mappers/*.xml
+  global-config:
+    #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+    id-type: 3
+    #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+    field-strategy: 2
+    #驼峰下划线转换
+    db-column-underline: true
+    #mp2.3+ 全局表前缀 mp_
+    #table-prefix: mp_
+    #刷新mapper 调试神器
+    #refresh-mapper: true
+    #数据库大写下划线转换
+    #capital-mode: true
+    # Sequence序列接口实现类配置
+    key-generator: com.baomidou.mybatisplus.incrementer.OracleKeyGenerator
+    #逻辑删除配置(下面3个配置)
+    logic-delete-value: 1
+    logic-not-delete-value: 0
+    #sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
+    #自定义填充策略接口实现
+    #meta-object-handler: com.baomidou.springboot.MyMetaObjectHandler
+  configuration:
+    #配置返回数据库(column下划线命名&&返回java实体是驼峰命名),自动匹配无需as(没开启这个,SQL需要写as: select user_id as userId)
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+    #配置JdbcTypeForNull, oracle数据库必须配置
+    jdbc-type-for-null: 'null'
+    callSettersOnNulls: true
+
+logging:
+  level:
+    com:
+      gyee:
+        wisdom:
+          alarm:
+            sharding:
+              mapper: debug
+              service: info
+
+sharding:
+  config:
+    #分表开始时间  格式:yyyy-MM-dd
+    startDate: 2018-01-01
+count:
+  custom: false
+  fault: true
+
+stationname:
+  MHS,NSS,QS,SBQ,XS,DWK,PL,XH,MCH,HZJ
+#tablespace: TS_GDSJ_DATA
+tablespace: TS_NXFD_DATA

+ 101 - 0
web/alarm-hb/src/main/resources/application-hwy.yml

@@ -0,0 +1,101 @@
+server:
+  port: 8176
+
+spring:
+  profiles:
+    active: dev
+  application:
+    name: alarm-hb-provider
+    cloud:
+      nacos:
+        discovery:
+          server-addr: 123.60.213.70:8848
+          #指定yaml格式的配置
+          file-extension: yaml
+          cluster-name: master
+        username: nacos
+        password: nacos
+    #引入其他配置文件,例如ftpHX 未配置文件application-ftpHX.yml
+    #include: ftpHX,ftpCloud
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: oracle.jdbc.OracleDriver
+    url: jdbc:oracle:thin:@123.60.213.70:1521:gdnxfd
+    username: nxfdprod
+    password: gdnxfd123
+    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
+  jackson:
+    date-format: yyyy-MM-dd HH:mm:ss
+    time-zone: GMT+8
+    default-property-inclusion: always
+
+
+mybatis-plus:
+  typeAliasesPackage: com.gyee.wisdom.alarm.sharding.entity
+  mapper-locations: classpath:mappers/*.xml
+  global-config:
+    #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+    id-type: 3
+    #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+    field-strategy: 2
+    #驼峰下划线转换
+    db-column-underline: true
+    #mp2.3+ 全局表前缀 mp_
+    #table-prefix: mp_
+    #刷新mapper 调试神器
+    #refresh-mapper: true
+    #数据库大写下划线转换
+    #capital-mode: true
+    # Sequence序列接口实现类配置
+    key-generator: com.baomidou.mybatisplus.incrementer.OracleKeyGenerator
+    #逻辑删除配置(下面3个配置)
+    logic-delete-value: 1
+    logic-not-delete-value: 0
+    #sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
+    #自定义填充策略接口实现
+    #meta-object-handler: com.baomidou.springboot.MyMetaObjectHandler
+  configuration:
+    #配置返回数据库(column下划线命名&&返回java实体是驼峰命名),自动匹配无需as(没开启这个,SQL需要写as: select user_id as userId)
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+    #配置JdbcTypeForNull, oracle数据库必须配置
+    jdbc-type-for-null: 'null'
+    callSettersOnNulls: true
+
+logging:
+  level:
+    com:
+      gyee:
+        wisdom:
+          alarm:
+            sharding:
+              mapper: debug
+              service: info
+
+sharding:
+  config:
+    #分表开始时间  格式:yyyy-MM-dd
+    startDate: 2018-01-01
+count:
+  custom: false
+  fault: true
+
+stationname:
+  MHS,NSS,QS,SBQ,XS,DWK,PL,XH,MCH,HZJ
+#tablespace: TS_GDSJ_DATA
+tablespace: TS_NXFD_DATA

+ 95 - 0
web/alarm-hb/src/main/resources/application-jn.yml

@@ -0,0 +1,95 @@
+server:
+  port: 8176
+
+spring:
+  profiles:
+    active: dev
+  application:
+    name: alarm-hb-provider
+    cloud:
+      nacos:
+        discovery:
+          server-addr: 10.81.3.155:8848
+          #指定yaml格式的配置
+          file-extension: yaml
+          cluster-name: master
+        username: nacos
+        password: nacos
+    #引入其他配置文件,例如ftpHX 未配置文件application-ftpHX.yml
+    #include: ftpHX,ftpCloud
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    url: jdbc:postgresql://10.81.3.151:5432/wisdom
+    username: gdprod
+    password: gd123
+    driver-class-name: org.postgresql.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
+  jackson:
+    date-format: yyyy-MM-dd HH:mm:ss
+    time-zone: GMT+8
+    default-property-inclusion: always
+
+
+mybatis-plus:
+  typeAliasesPackage: com.gyee.wisdom.alarm.sharding.entity
+  mapper-locations: classpath:mappers/*.xml
+  global-config:
+    #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+    id-type: 3
+    #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+    field-strategy: 2
+    #驼峰下划线转换
+    db-column-underline: true
+    #mp2.3+ 全局表前缀 mp_
+    #table-prefix: mp_
+    #刷新mapper 调试神器
+    #refresh-mapper: true
+    #数据库大写下划线转换
+    #capital-mode: true
+    # Sequence序列接口实现类配置
+    key-generator: com.baomidou.mybatisplus.incrementer.OracleKeyGenerator
+    #逻辑删除配置(下面3个配置)
+    logic-delete-value: 1
+    logic-not-delete-value: 0
+    #sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
+    #自定义填充策略接口实现
+    #meta-object-handler: com.baomidou.springboot.MyMetaObjectHandler
+  configuration:
+    #配置返回数据库(column下划线命名&&返回java实体是驼峰命名),自动匹配无需as(没开启这个,SQL需要写as: select user_id as userId)
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+    #配置JdbcTypeForNull, oracle数据库必须配置
+    jdbc-type-for-null: 'null'
+    callSettersOnNulls: true
+
+logging:
+  level:
+    com:
+      gyee:
+        wisdom:
+          alarm:
+            sharding:
+              mapper: debug
+              service: info
+
+sharding:
+  config:
+    #分表开始时间  格式:yyyy-MM-dd
+    startDate: 2018-01-01
+count:
+  custom: false
+  fault: true
+
+stationname:
+  MHS,NSS,QS,SBQ,XS,DWK,PL,XH,MCH,HZJ
+#tablespace: TS_GDSJ_DATA
+tablespace: TS_NXFD_DATA

+ 1 - 105
web/alarm-hb/src/main/resources/application.yaml

@@ -1,107 +1,3 @@
-server:
-  port: 8176
-
 spring:
   profiles:
-    active: dev
-  application:
-    name: alarm-hb-provider
-    cloud:
-      nacos:
-        discovery:
-          #server-addr: 192.168.56.1:8848
-          server-addr: 192.168.2.216:8848
-          #server-addr: 10.83.68.97:8848
-          #指定yaml格式的配置
-          file-extension: yaml
-          cluster-name: master
-        username: nacos
-        password: nacos
-    #引入其他配置文件,例如ftpHX 未配置文件application-ftpHX.yml
-    #include: ftpHX,ftpCloud
-  datasource:
-    type: com.alibaba.druid.pool.DruidDataSource
-    driver-class-name: oracle.jdbc.OracleDriver
-    #外网
-#    url: jdbc:oracle:thin:@123.60.213.70:1521:gdnxfd
-#    username: nxfdprod
-#    password: gdnxfd123
-    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
-  jackson:
-    date-format: yyyy-MM-dd HH:mm:ss
-    time-zone: GMT+8
-    default-property-inclusion: always
-
-
-mybatis-plus:
-  typeAliasesPackage: com.gyee.wisdom.alarm.sharding.entity
-  mapper-locations: classpath:mappers/*.xml
-  global-config:
-    #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
-    id-type: 3
-    #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
-    field-strategy: 2
-    #驼峰下划线转换
-    db-column-underline: true
-    #mp2.3+ 全局表前缀 mp_
-    #table-prefix: mp_
-    #刷新mapper 调试神器
-    #refresh-mapper: true
-    #数据库大写下划线转换
-    #capital-mode: true
-    # Sequence序列接口实现类配置
-    key-generator: com.baomidou.mybatisplus.incrementer.OracleKeyGenerator
-    #逻辑删除配置(下面3个配置)
-    logic-delete-value: 1
-    logic-not-delete-value: 0
-    #sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
-    #自定义填充策略接口实现
-    #meta-object-handler: com.baomidou.springboot.MyMetaObjectHandler
-  configuration:
-    #配置返回数据库(column下划线命名&&返回java实体是驼峰命名),自动匹配无需as(没开启这个,SQL需要写as: select user_id as userId)
-    map-underscore-to-camel-case: true
-    cache-enabled: false
-    #配置JdbcTypeForNull, oracle数据库必须配置
-    jdbc-type-for-null: 'null'
-    callSettersOnNulls: true
-
-logging:
-  level:
-    com:
-      gyee:
-        wisdom:
-          alarm:
-            sharding:
-              mapper: debug
-              service: info
-
-sharding:
-  config:
-    #分表开始时间  格式:yyyy-MM-dd
-    startDate: 2018-01-01
-count:
-  custom: false
-  fault: true
-
-stationname:
-  MHS,NSS,QS,SBQ,XS,DWK,PL,XH,MCH,HZJ
-#tablespace: TS_GDSJ_DATA
-tablespace: TS_NXFD_DATA
+    active: hb