Browse Source

历史计算服务修正优化

shilin 2 years ago
parent
commit
ef30c8cbfe
18 changed files with 1009 additions and 0 deletions
  1. BIN
      realtime/healthmodel-server/lib/xxl-job-core-2.3.1-SNAPSHOT.jar
  2. 67 0
      realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/config/XxlJobConfig.java
  3. 20 0
      realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/controller/ProEconHealthReportMainController.java
  4. 20 0
      realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/controller/ProEconHealthReportTargetController.java
  5. 16 0
      realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/mapper/auto/ProEconHealthReportMainMapper.java
  6. 16 0
      realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/mapper/auto/ProEconHealthReportTargetMapper.java
  7. 164 0
      realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/model/auto/ProEconHealthReportMain.java
  8. 69 0
      realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/model/auto/ProEconHealthReportTarget.java
  9. 16 0
      realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/service/auto/IProEconHealthReportMainService.java
  10. 16 0
      realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/service/auto/IProEconHealthReportTargetService.java
  11. 20 0
      realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/service/auto/impl/ProEconHealthReportMainServiceImpl.java
  12. 20 0
      realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/service/auto/impl/ProEconHealthReportTargetServiceImpl.java
  13. 113 0
      realtime/healthmodel-server/src/main/resources/application-hb.yml
  14. 113 0
      realtime/healthmodel-server/src/main/resources/application-hbn.yml
  15. 112 0
      realtime/healthmodel-server/src/main/resources/application-hf.yml
  16. 113 0
      realtime/healthmodel-server/src/main/resources/application-hwy.yml
  17. 96 0
      realtime/healthmodel-server/src/main/resources/application-jn.yml
  18. 18 0
      realtime/healthmodel-server/src/main/resources/xxl-job-executor.properties

BIN
realtime/healthmodel-server/lib/xxl-job-core-2.3.1-SNAPSHOT.jar


+ 67 - 0
realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/config/XxlJobConfig.java

@@ -0,0 +1,67 @@
+package com.gyee.healthmodel.config;
+
+import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.EnvironmentAware;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.core.env.Environment;
+
+/**
+ * xxl-job config
+ *
+ * @author xuxueli 2017-04-28
+ */
+
+
+    @Configuration
+    @PropertySource("classpath:xxl-job-executor.properties")
+    public class XxlJobConfig implements EnvironmentAware {
+        private Environment env;
+
+        @Override
+        public void setEnvironment(Environment environment) {
+            this.env=environment;
+        }
+
+    private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
+
+
+
+    @Bean
+    public XxlJobSpringExecutor xxlJobExecutor() {
+        logger.info(">>>>>>>>>>> xxl-job config init.");
+        XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
+        xxlJobSpringExecutor.setAdminAddresses(env.getProperty("xxl.job.admin.addresses"));
+        xxlJobSpringExecutor.setAppname(env.getProperty("xxl.job.executor.appname"));
+        xxlJobSpringExecutor.setAddress(env.getProperty("xxl.job.executor.address"));
+        xxlJobSpringExecutor.setIp(env.getProperty("xxl.job.executor.ip"));
+        xxlJobSpringExecutor.setPort(Integer.parseInt(env.getProperty("xxl.job.executor.port")));
+        xxlJobSpringExecutor.setAccessToken(env.getProperty("xxl.job.accessToken"));
+        xxlJobSpringExecutor.setLogPath(env.getProperty("xxl.job.executor.logpath"));
+        xxlJobSpringExecutor.setLogRetentionDays(Integer.parseInt(env.getProperty("xxl.job.executor.logretentiondays")));
+
+        return xxlJobSpringExecutor;
+    }
+
+    /**
+     * 针对多网卡、容器内部署等情况,可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP;
+     *
+     *      1、引入依赖:
+     *          <dependency>
+     *             <groupId>org.springframework.cloud</groupId>
+     *             <artifactId>spring-cloud-commons</artifactId>
+     *             <version>${version}</version>
+     *         </dependency>
+     *
+     *      2、配置文件,或者容器启动变量
+     *          spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
+     *
+     *      3、获取IP
+     *          String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
+     */
+
+
+}

+ 20 - 0
realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/controller/ProEconHealthReportMainController.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmodel.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 健康报告主表 前端控制器
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+@RestController
+@RequestMapping("//pro-econ-health-report-main")
+public class ProEconHealthReportMainController {
+
+}

+ 20 - 0
realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/controller/ProEconHealthReportTargetController.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmodel.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 健康报告指标 前端控制器
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+@RestController
+@RequestMapping("//pro-econ-health-report-target")
+public class ProEconHealthReportTargetController {
+
+}

+ 16 - 0
realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/mapper/auto/ProEconHealthReportMainMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmodel.mapper.auto;
+
+import com.gyee.healthmodel.model.auto.ProEconHealthReportMain;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 健康报告主表 Mapper 接口
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+public interface ProEconHealthReportMainMapper extends BaseMapper<ProEconHealthReportMain> {
+
+}

+ 16 - 0
realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/mapper/auto/ProEconHealthReportTargetMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmodel.mapper.auto;
+
+import com.gyee.healthmodel.model.auto.ProEconHealthReportTarget;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 健康报告指标 Mapper 接口
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+public interface ProEconHealthReportTargetMapper extends BaseMapper<ProEconHealthReportTarget> {
+
+}

+ 164 - 0
realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/model/auto/ProEconHealthReportMain.java

@@ -0,0 +1,164 @@
+package com.gyee.healthmodel.model.auto;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * <p>
+ * 健康报告主表
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ProEconHealthReportMain extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编码
+     */
+    private String id;
+
+    /**
+     * 风场编号
+     */
+    private String wpId;
+
+    /**
+     * 风机编号
+     */
+    private String wtId;
+
+    /**
+     * 日期
+     */
+    private Date recordDate;
+
+    /**
+     * 评级结果
+     */
+    private String ratingResults;
+
+    /**
+     * 评级展望
+     */
+    private String ratingOutlook;
+
+    /**
+     * 评级有效期
+     */
+    private Date ratingValidityPeriod;
+
+    /**
+     * 首次并网时间
+     */
+    private Date firstIntegratedTime;
+
+    /**
+     * 运行天数
+     */
+    private Integer runningDays;
+
+    /**
+     * 月累加发电量
+     */
+    private Double monthFdl;
+
+    /**
+     * 月风能利用率
+     */
+    private Double yfnlyl;
+
+    /**
+     * 月利用小时
+     */
+    private Double ylyxs;
+
+    /**
+     * 月风能利用率环比
+     */
+    private Double yfnlylhb;
+
+    /**
+     * 月利用小时环比
+     */
+    private Double ylyxshb;
+
+    /**
+     * 月MTBF
+     */
+    private Double ymtbf;
+
+    /**
+     * 月MTTR
+     */
+    private Double ymttr;
+
+    /**
+     * 月MTTF
+     */
+    private Double ymttf;
+
+    /**
+     * 月故障次数
+     */
+    private Double ygzcs;
+
+    /**
+     * 检修间隔时长(月)
+     */
+    private Double jxjgsc;
+
+    /**
+     * 故障出现频次第1名
+     */
+    private String gztop1;
+
+    /**
+     * 故障出现频次第2名
+     */
+    private String gztop2;
+
+    /**
+     * 故障出现频次第3名
+     */
+    private String gztop3;
+
+    /**
+     * 报告生成日期
+     */
+    private Date reportCreatedate;
+
+    /**
+     * 月曲线偏差率保证实际
+     */
+    private Double yqxpcbbzsj;
+
+    /**
+     * 月曲线偏差率环比
+     */
+    private Double yqxpcbhb;
+
+    /**
+     * 月3-5米曲线偏差率
+     */
+    private Double y35mqxpcl;
+
+    /**
+     * 月5-11米曲线偏差率
+     */
+    private Double y511mqxpcl;
+
+    /**
+     * 月11米以上曲线偏差率
+     */
+    private Double y11mycqxpcl;
+
+
+}

+ 69 - 0
realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/model/auto/ProEconHealthReportTarget.java

@@ -0,0 +1,69 @@
+package com.gyee.healthmodel.model.auto;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * <p>
+ * 健康报告指标
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ProEconHealthReportTarget extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编码
+     */
+    private String id;
+
+    /**
+     * 主表编号
+     */
+    private String hid;
+
+    /**
+     * 风场编号
+     */
+    private String wpId;
+
+    /**
+     * 风机编号
+     */
+    private String wtId;
+
+    /**
+     * 日期
+     */
+    private Date recordDate;
+
+    /**
+     * 指标名称
+     */
+    private String name;
+
+    /**
+     * 当月值
+     */
+    private Double monthValue;
+
+    /**
+     * 上月值
+     */
+    private Double lastMonth1Value;
+
+    /**
+     * 前两月值
+     */
+    private Double lastMonth2Value;
+
+
+}

+ 16 - 0
realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/service/auto/IProEconHealthReportMainService.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmodel.service.auto;
+
+import com.gyee.healthmodel.model.auto.ProEconHealthReportMain;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 健康报告主表 服务类
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+public interface IProEconHealthReportMainService extends IService<ProEconHealthReportMain> {
+
+}

+ 16 - 0
realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/service/auto/IProEconHealthReportTargetService.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmodel.service.auto;
+
+import com.gyee.healthmodel.model.auto.ProEconHealthReportTarget;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 健康报告指标 服务类
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+public interface IProEconHealthReportTargetService extends IService<ProEconHealthReportTarget> {
+
+}

+ 20 - 0
realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/service/auto/impl/ProEconHealthReportMainServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmodel.service.auto.impl;
+
+import com.gyee.healthmodel.model.auto.ProEconHealthReportMain;
+import com.gyee.healthmodel.mapper.auto.ProEconHealthReportMainMapper;
+import com.gyee.healthmodel.service.auto.IProEconHealthReportMainService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 健康报告主表 服务实现类
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+@Service
+public class ProEconHealthReportMainServiceImpl extends ServiceImpl<ProEconHealthReportMainMapper, ProEconHealthReportMain> implements IProEconHealthReportMainService {
+
+}

+ 20 - 0
realtime/healthmodel-server/src/main/java/com/gyee/healthmodel/service/auto/impl/ProEconHealthReportTargetServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmodel.service.auto.impl;
+
+import com.gyee.healthmodel.model.auto.ProEconHealthReportTarget;
+import com.gyee.healthmodel.mapper.auto.ProEconHealthReportTargetMapper;
+import com.gyee.healthmodel.service.auto.IProEconHealthReportTargetService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 健康报告指标 服务实现类
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+@Service
+public class ProEconHealthReportTargetServiceImpl extends ServiceImpl<ProEconHealthReportTargetMapper, ProEconHealthReportTarget> implements IProEconHealthReportTargetService {
+
+}

+ 113 - 0
realtime/healthmodel-server/src/main/resources/application-hb.yml

@@ -0,0 +1,113 @@
+# 项目相关配置
+gyee:
+  #实时数据库Url
+  baseurl: http://192.168.2.198:8011/ts
+  healthurl: http://192.168.2.198:8012/ts
+  #实时数据库选择
+  realtimedataBase: mongodb #数据查询模式 golden、hwy
+  initialcode: INITIAL
+server:
+  port: 8162
+  servlet:
+    context-path: /
+
+management:
+  health:
+    redis:
+      enabled: false
+
+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
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    #    driverClassName: com.mysql.jdbc.Driver
+    #druid连接池配置
+    druid:
+      #主库数据源
+      master:
+
+        url: jdbc:oracle:thin:@192.168.2.215:1521:gdsj
+        username: gdprod
+        password: gd123
+        driver-class-name: oracle.jdbc.driver.OracleDriver
+      #备数据源 #关闭
+      slave:
+        enabled: false
+        url: jdbc:mysql://localhost:3306/mysql?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
+        username: root
+        password: 123456
+        #两票数据源
+      ticket:
+        url: jdbc:sqlserver://192.168.2.200:1434;DatabaseName=fdeamnew
+        username: sa
+        password: ibs
+        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+        #配置初始化连接数大小
+      initial-size: 10
+      # 最大连接数
+      max-active: 50
+      #最小连接数
+      min-idle: 10
+      #获取连接等待超时时间
+      max-wait: 5000
+      pool-prepared-statements: true #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。
+      max-pool-prepared-statement-per-connection-size: 20
+      validation-query: SELECT 1 FROM DUAL
+      validation-query-timeout: 20000
+      test-on-borrow: false #申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-on-return: false #归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-while-idle: true #建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
+      time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      min-evictable-idle-time-millis: 300000  #一个连接在池中最小生存的时间,单位是毫秒
+      #StatViewServlet配置。(因为暴露的监控信息比较敏感,支持密码加密和访问ip限定)
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        #可以增加访问账号密码【去掉注释就可以】
+        #login-username: admin
+        #login-password: admin
+      filter:
+        stat:
+          log-slow-sql: true
+          slow-sql-millis: 1000
+          merge-sql: false
+        wall:
+          config:
+            multi-statement-allow: true
+
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+
+logging:
+  level:
+    root: info
+    com.example: debug
+
+edos:
+  baseURL: http://10.0.118.73:8011/ts

+ 113 - 0
realtime/healthmodel-server/src/main/resources/application-hbn.yml

@@ -0,0 +1,113 @@
+# 项目相关配置
+gyee:
+  #实时数据库Url
+  baseurl: http://10.83.68.96:8011/ts
+  healthurl: http://10.83.68.96:8012/ts
+  #实时数据库选择
+  realtimedataBase: mongodb #数据查询模式 golden、hwy
+  initialcode: INITIAL
+server:
+  port: 8162
+  servlet:
+    context-path: /
+
+management:
+  health:
+    redis:
+      enabled: false
+
+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
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    #    driverClassName: com.mysql.jdbc.Driver
+    #druid连接池配置
+    druid:
+      #主库数据源
+      master:
+
+        url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
+        username: gdprod
+        password: gd123
+        driver-class-name: oracle.jdbc.driver.OracleDriver
+      #备数据源 #关闭
+      slave:
+        enabled: false
+        url: jdbc:mysql://localhost:3306/mysql?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
+        username: root
+        password: 123456
+        #两票数据源
+      ticket:
+        url: jdbc:sqlserver://10.83.68.98:1434;DatabaseName=fdeamnew
+        username: sa
+        password: ibs
+        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+        #配置初始化连接数大小
+      initial-size: 10
+      # 最大连接数
+      max-active: 50
+      #最小连接数
+      min-idle: 10
+      #获取连接等待超时时间
+      max-wait: 5000
+      pool-prepared-statements: true #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。
+      max-pool-prepared-statement-per-connection-size: 20
+      validation-query: SELECT 1 FROM DUAL
+      validation-query-timeout: 20000
+      test-on-borrow: false #申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-on-return: false #归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-while-idle: true #建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
+      time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      min-evictable-idle-time-millis: 300000  #一个连接在池中最小生存的时间,单位是毫秒
+      #StatViewServlet配置。(因为暴露的监控信息比较敏感,支持密码加密和访问ip限定)
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        #可以增加访问账号密码【去掉注释就可以】
+        #login-username: admin
+        #login-password: admin
+      filter:
+        stat:
+          log-slow-sql: true
+          slow-sql-millis: 1000
+          merge-sql: false
+        wall:
+          config:
+            multi-statement-allow: true
+
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+
+logging:
+  level:
+    root: info
+    com.example: debug
+
+edos:
+  baseURL: http://10.0.118.73:8011/ts

+ 112 - 0
realtime/healthmodel-server/src/main/resources/application-hf.yml

@@ -0,0 +1,112 @@
+# 项目相关配置
+gyee:
+  #实时数据库Url
+  baseurl: http://10.0.118.73:8011/ts
+  healthurl: http://10.0.118.73:8011/ts
+  #实时数据库选择
+  realtimedataBase: mongodb #数据查询模式 golden、hwy
+  initialcode: INITIAL
+server:
+  port: 8162
+  servlet:
+    context-path: /
+
+management:
+  health:
+    redis:
+      enabled: false
+
+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
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    #    driverClassName: com.mysql.jdbc.Driver
+    #druid连接池配置
+    druid:
+      #主库数据源
+      master:
+        url: jdbc:oracle:thin:@10.0.118.71:1521:gdsj
+        username: gdprod
+        password: gd123
+        driver-class-name: oracle.jdbc.driver.OracleDriver
+      #备数据源 #关闭
+      slave:
+        enabled: false
+        url: jdbc:mysql://localhost:3306/mysql?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
+        username: root
+        password: 123456
+        #两票数据源
+      ticket:
+        url: jdbc:sqlserver://10.0.118.71:1433;DatabaseName=fdeamnew
+        username: sa
+        password: Gd!123456
+        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+        #配置初始化连接数大小
+      initial-size: 10
+      # 最大连接数
+      max-active: 50
+      #最小连接数
+      min-idle: 10
+      #获取连接等待超时时间
+      max-wait: 5000
+      pool-prepared-statements: true #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。
+      max-pool-prepared-statement-per-connection-size: 20
+      validation-query: SELECT 1 FROM DUAL
+      validation-query-timeout: 20000
+      test-on-borrow: false #申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-on-return: false #归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-while-idle: true #建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
+      time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      min-evictable-idle-time-millis: 300000  #一个连接在池中最小生存的时间,单位是毫秒
+      #StatViewServlet配置。(因为暴露的监控信息比较敏感,支持密码加密和访问ip限定)
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        #可以增加访问账号密码【去掉注释就可以】
+        #login-username: admin
+        #login-password: admin
+      filter:
+        stat:
+          log-slow-sql: true
+          slow-sql-millis: 1000
+          merge-sql: false
+        wall:
+          config:
+            multi-statement-allow: true
+
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+
+logging:
+  level:
+    root: info
+    com.example: debug
+
+edos:
+  baseURL: http://10.0.118.73:8011/ts

+ 113 - 0
realtime/healthmodel-server/src/main/resources/application-hwy.yml

@@ -0,0 +1,113 @@
+# 项目相关配置
+gyee:
+  #实时数据库Url
+
+  baseurl: http://123.60.213.70:8011/ts
+  healthurl: http://123.60.213.70:8011/ts
+  #实时数据库选择
+  realtimedataBase: mongodb #数据查询模式 golden、hwy
+  initialcode: INITIAL
+server:
+  port: 8162
+  servlet:
+    context-path: /
+
+management:
+  health:
+    redis:
+      enabled: false
+
+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
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    #    driverClassName: com.mysql.jdbc.Driver
+    #druid连接池配置
+    druid:
+      #主库数据源
+      master:
+        url: jdbc:oracle:thin:@123.60.213.70:1521:gdnxfd
+        username: nxfdprod
+        password: gdnxfd123
+        driver-class-name: oracle.jdbc.driver.OracleDriver
+      #备数据源 #关闭
+      slave:
+        enabled: false
+        url: jdbc:mysql://localhost:3306/mysql?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
+        username: root
+        password: 123456
+        #两票数据源
+      ticket:
+        url: jdbc:sqlserver://123.60.213.70:1434;DatabaseName=fdeam
+        username: sa
+        password: Gyee@321#!
+        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+        #配置初始化连接数大小
+      initial-size: 10
+      # 最大连接数
+      max-active: 50
+      #最小连接数
+      min-idle: 10
+      #获取连接等待超时时间
+      max-wait: 5000
+      pool-prepared-statements: true #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。
+      max-pool-prepared-statement-per-connection-size: 20
+      validation-query: SELECT 1 FROM DUAL
+      validation-query-timeout: 20000
+      test-on-borrow: false #申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-on-return: false #归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-while-idle: true #建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
+      time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      min-evictable-idle-time-millis: 300000  #一个连接在池中最小生存的时间,单位是毫秒
+      #StatViewServlet配置。(因为暴露的监控信息比较敏感,支持密码加密和访问ip限定)
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        #可以增加访问账号密码【去掉注释就可以】
+        #login-username: admin
+        #login-password: admin
+      filter:
+        stat:
+          log-slow-sql: true
+          slow-sql-millis: 1000
+          merge-sql: false
+        wall:
+          config:
+            multi-statement-allow: true
+
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+
+logging:
+  level:
+    root: info
+    com.example: debug
+
+edos:
+  baseURL: http://10.0.118.73:8011/ts

+ 96 - 0
realtime/healthmodel-server/src/main/resources/application-jn.yml

@@ -0,0 +1,96 @@
+# 项目相关配置
+gyee:
+  #实时数据库Url
+  baseurl: http://10.81.3.155:8011/ts
+  healthurl: http://10.81.3.155:8011/ts
+  #实时数据库选择
+  realtimedataBase: mongodb #数据查询模式 golden、hwy
+  initialcode: INITIAL
+  firstIntegratedTime: 2000-05-13
+server:
+  port: 8162
+  servlet:
+    context-path: /
+
+management:
+  health:
+    redis:
+      enabled: false
+
+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
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    #外网
+    url: jdbc:postgresql://10.81.3.151:5432/IMS_NEM_JN
+    username: postgres
+    password: postgres
+    driver-class-name: org.postgresql.Driver
+    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
+      #StatViewServlet配置。(因为暴露的监控信息比较敏感,支持密码加密和访问ip限定)
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        #可以增加访问账号密码【去掉注释就可以】
+        #login-username: admin
+        #login-password: admin
+      filter:
+        stat:
+          log-slow-sql: true
+          slow-sql-millis: 1000
+          merge-sql: false
+        wall:
+          config:
+            multi-statement-allow: true
+
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+
+logging:
+  level:
+    root: info
+    com.example: debug
+
+edos:
+  baseURL: http://10.0.118.73:8011/ts

+ 18 - 0
realtime/healthmodel-server/src/main/resources/xxl-job-executor.properties

@@ -0,0 +1,18 @@
+### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
+##xxl.job.admin.addresses=http://192.168.2.198:8175/xxl-job-admin
+xxl.job.admin.addresses=http://10.81.3.152:8175/xxl-job-admin
+### xxl-job, access token
+xxl.job.accessToken=
+
+### xxl-job executor appname
+xxl.job.executor.appname=healthmodel-job
+### xxl-job executor registry-address: default use address to registry , otherwise use ip:port if address is null
+xxl.job.executor.address=
+### xxl-job executor server-info
+xxl.job.executor.ip=
+xxl.job.executor.port=9113
+### xxl-job executor log-path
+xxl.job.executor.logpath=d:\\jobs\\healthmodel-job
+### xxl-job executor log-retention-days
+xxl.job.executor.logretentiondays=30
+