Browse Source

增加配置文件 正式环境

daili 3 years ago
parent
commit
e069fba801

+ 5 - 0
application-facade/src/main/java/com/factory/web/entity/fa/FirstArticleApprovalTask.java

@@ -58,4 +58,9 @@ public class FirstArticleApprovalTask implements Serializable {
     @ApiModelProperty(value = "审批时间")
     private LocalDateTime updatedTime;
 
+    @TableField(exist = false)
+    @ApiModelProperty(value = "重检状态")
+    private Integer result;
+
+
 }

+ 4 - 3
application-facade/src/main/java/com/factory/web/service/impl/fa/FirstArticleServiceImpl.java

@@ -1272,12 +1272,13 @@ public class FirstArticleServiceImpl extends ServiceImpl<FirstArticleMapper, Ben
                 if (count > 0) {
                     firstArticleItem.setReleaseFlag(1); // 1有
 
-                    firstArticleItem.setPermitDesc(firstArticleMapper.getFaItemRelease(searchFaItemReleaseCountReq)); // 备注
+
                 } else {
                     firstArticleItem.setReleaseFlag(0); // 0没有
                 }
-
-
+                List<FirstArticleApprovalTask> faItemRelease = firstArticleMapper.getFaItemRelease(searchFaItemReleaseCountReq);
+                faItemRelease.stream().filter(item -> !item.getResult().equals(0));
+                firstArticleItem.setPermitDesc(faItemRelease); // 备注
             }
 
             firstArticleWorkshop.setFirstArticleItemList(firstArticleItemList);

+ 121 - 0
application-facade/src/main/resources/application-prod.yml

@@ -0,0 +1,121 @@
+server:
+  port: 30048
+spring:
+  application:
+    name: application-web
+  redis:
+    host: 8.142.18.146
+    port: 6379
+    password: jh1q2w3e4r
+    database: 15
+    lettuce:
+      pool:
+        maxTotal: 5
+  datasource:
+    dynamic:
+      primary: self #设置默认的数据源或者数据源组,默认值即为master
+      strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候会抛出异常,不启动则使用默认数据源.
+      datasource:
+        self:
+          url: jdbc:mysql://8.142.18.146:3306/btl_factory?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+          username: root
+          password: root
+          driver-class-name: com.mysql.cj.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
+    hikari:
+      maximum-pool-size: 5
+
+
+cn:
+  jiheng:
+    file:
+      file-store-dir: download
+      zip-out-dir: zip
+      download-prefix: https://s2t.jihengcc.cn/file/
+    auth:
+      permit-url-list:
+        - /swagger-ui.html
+        - /webjars/**
+        - /swagger-resources/**
+        - /v2/**
+        - /favicon.ico
+        - /doc.html
+        - /api/passwordLogin
+        - /csrf
+        - /error**
+        - /webjars**
+        # 登录
+        - /login/passwordLogin**
+        - /login
+        - /benteler/fileupload/**
+      #        - /**
+      client: WEB
+
+jetcache:
+  statIntervalMinutes: 15
+  areaInCacheName: false
+  hidePackages: top.jiheng.factory
+  local:
+    # 默认2小时本地缓存
+    default:
+      type: caffeine
+      keyConvertor: fastjson
+      expireAfterWriteInMillis: 3600000
+      expireAfterAccessInMillis: 1800000
+    # 長時本地緩存,主要用于要求时效一般
+    longTime:
+      type: caffeine
+      keyConvertor: fastjson
+      expireAfterWriteInMillis: 300000
+      expireAfterAccessInMillis: 180000
+    # 短時本地緩存,主要用于要求时效较高的配置
+    shortTime:
+      type: caffeine
+      keyConvertor: fastjson
+      expireAfterWriteInMillis: 60000
+      expireAfterAccessInMillis: 40000
+  remote:
+    # 默认2小时的远程缓存
+    default:
+      type: redis
+      expireAfterWriteInMillis: 43200000
+      keyConvertor: fastjson
+      valueEncoder: kryo
+      valueDecoder: kryo
+      poolConfig:
+        minIdle: 5
+        maxIdle: 20
+        maxTotal: 50
+      host: ${SPRING.REDIS.HOST:39.100.230.190}
+      port: ${SPRING.REDIS.PORT:8120}
+      password: ${SPRING.REDIS.PASSWORD:jh1q2w3e4r}
+    # 长时远程緩存,主要用于要求时效要求一般的集中式缓存
+    longTime:
+      type: redis
+      expireAfterWriteInMillis: 7200000
+      keyConvertor: fastjson
+      valueEncoder: kryo
+      valueDecoder: kryo
+      poolConfig:
+        minIdle: 5
+        maxIdle: 20
+        maxTotal: 50
+      host: ${SPRING.REDIS.HOST:39.100.230.190}
+      port: ${SPRING.REDIS.PORT:8120}
+      password: ${SPRING.REDIS.PASSWORD:jh1q2w3e4r}
+    # 短時远程緩存,主要用于要求时效较高的集中式缓存
+    shortTime:
+      type: redis
+      expireAfterWriteInMillis: 300000
+      keyConvertor: fastjson
+      valueEncoder: kryo
+      valueDecoder: kryo
+      poolConfig:
+        minIdle: 5
+        maxIdle: 20
+        maxTotal: 50
+      host: ${SPRING.REDIS.HOST:39.100.230.190}
+      port: ${SPRING.REDIS.PORT:8120}
+      password: ${SPRING.REDIS.PASSWORD:jh1q2w3e4r}
+wx:
+  minprogram:
+    miniprogramState: trial

+ 126 - 0
application-facade/src/main/resources/application-prodWX.yml

@@ -0,0 +1,126 @@
+server:
+  port: 40049
+spring:
+  application:
+    name: application-wx
+  redis:
+    host: 39.100.230.190
+    port: 8120
+    password: jh1q2w3e4r
+    database: 15
+    lettuce:
+      pool:
+        maxTotal: 5
+  datasource:
+    dynamic:
+      primary: self #设置默认的数据源或者数据源组,默认值即为master
+      strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候会抛出异常,不启动则使用默认数据源.
+      datasource:
+        self:
+          url: jdbc:mysql://8.142.18.146:3306/btl_factory?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+          username: root
+          password: root
+          driver-class-name: com.mysql.cj.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
+        file:
+          url: jdbc:mysql://39.100.230.190:8092/zhoudu_ceshi?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
+          username: root
+          password: Jh@Jh2019!
+          driver-class-name: com.mysql.cj.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
+    hikari:
+      maximum-pool-size: 5
+
+
+cn:
+  jiheng:
+    file:
+      file-store-dir: download
+      zip-out-dir: zip
+      download-prefix: https://s2t.jihengcc.cn/file/
+    auth:
+      permit-url-list:
+        - /swagger-ui.html
+        - /webjars/**
+        - /swagger-resources/**
+        - /v2/**
+        - /favicon.ico
+        - /doc.html
+        - /api/passwordLogin
+        - /csrf
+        - /error**
+        - /webjars**
+        # 登录
+        - /login/passwordLogin**
+        - /login
+        - /benteler/fileupload/**
+      #        - /**
+      client: WEB
+
+jetcache:
+  statIntervalMinutes: 15
+  areaInCacheName: false
+  hidePackages: top.jiheng.factory
+  local:
+    # 默认2小时本地缓存
+    default:
+      type: caffeine
+      keyConvertor: fastjson
+      expireAfterWriteInMillis: 3600000
+      expireAfterAccessInMillis: 1800000
+    # 長時本地緩存,主要用于要求时效一般
+    longTime:
+      type: caffeine
+      keyConvertor: fastjson
+      expireAfterWriteInMillis: 300000
+      expireAfterAccessInMillis: 180000
+    # 短時本地緩存,主要用于要求时效较高的配置
+    shortTime:
+      type: caffeine
+      keyConvertor: fastjson
+      expireAfterWriteInMillis: 60000
+      expireAfterAccessInMillis: 40000
+  remote:
+    # 默认2小时的远程缓存
+    default:
+      type: redis
+      expireAfterWriteInMillis: 43200000
+      keyConvertor: fastjson
+      valueEncoder: kryo
+      valueDecoder: kryo
+      poolConfig:
+        minIdle: 5
+        maxIdle: 20
+        maxTotal: 50
+      host: ${SPRING.REDIS.HOST:39.100.230.190}
+      port: ${SPRING.REDIS.PORT:8120}
+      password: ${SPRING.REDIS.PASSWORD:jh1q2w3e4r}
+    # 长时远程緩存,主要用于要求时效要求一般的集中式缓存
+    longTime:
+      type: redis
+      expireAfterWriteInMillis: 7200000
+      keyConvertor: fastjson
+      valueEncoder: kryo
+      valueDecoder: kryo
+      poolConfig:
+        minIdle: 5
+        maxIdle: 20
+        maxTotal: 50
+      host: ${SPRING.REDIS.HOST:39.100.230.190}
+      port: ${SPRING.REDIS.PORT:8120}
+      password: ${SPRING.REDIS.PASSWORD:jh1q2w3e4r}
+    # 短時远程緩存,主要用于要求时效较高的集中式缓存
+    shortTime:
+      type: redis
+      expireAfterWriteInMillis: 300000
+      keyConvertor: fastjson
+      valueEncoder: kryo
+      valueDecoder: kryo
+      poolConfig:
+        minIdle: 5
+        maxIdle: 20
+        maxTotal: 50
+      host: ${SPRING.REDIS.HOST:39.100.230.190}
+      port: ${SPRING.REDIS.PORT:8120}
+      password: ${SPRING.REDIS.PASSWORD:jh1q2w3e4r}
+wx:
+  minprogram:
+    miniprogramState: trial

+ 2 - 1
application-facade/src/main/resources/mapper/FirstArticleMapper.xml

@@ -412,17 +412,18 @@
     <!-- 获取放行记录 FirstArticleApprovalTask-->
     <select id="getFaItemRelease" resultType="com.factory.web.entity.fa.FirstArticleApprovalTask">
         select approval.*,
+               result.result,
                uu.username as approvalUserName
         from first_article_item_result result,
              first_article_task task,
              first_article_approval_task approval,
              us_user uu
         where result.first_article_item_id = #{req.firstArticleItemId}
-          and result.result = 1
           and result.first_article_task_id = task.id
           and approval.first_article_task_id = task.id
           and DATE_FORMAT(task.task_time, '%Y-%m-%d') = #{req.checkDate}
           and uu.id = approval.approval_user_id
+        group by approval.id
     </select>
 
     <!--取得点检人 -->

+ 104 - 0
application-file/src/main/resources/application-prod.yml

@@ -0,0 +1,104 @@
+server:
+  port: 40045
+spring:
+  application:
+    name: application-file
+  redis:
+    host: 39.100.230.190
+    port: 8120
+    password: jh1q2w3e4r
+    database: 13
+    lettuce:
+      pool:
+        maxTotal: 5
+  datasource:
+    dynamic:
+      primary: self #设置默认的数据源或者数据源组,默认值即为master
+      strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候会抛出异常,不启动则使用默认数据源.
+      datasource:
+        self:
+          url: jdbc:mysql://39.100.230.190:8092/longdy?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
+          username: root
+          password: Jh@Jh2019!
+          driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
+        file:
+          url: jdbc:mysql://39.100.230.190:8092/longdy?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
+          username: root
+          password: Jh@Jh2019!
+          driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
+    hikari:
+      maximum-pool-size: 5
+
+cn:
+  jiheng:
+    file:
+      file-store-dir: download
+      zip-out-dir: zip
+      download-prefix: https:///s2t.jihengcc.cn/file/
+
+jetcache:
+  statIntervalMinutes: 15
+  areaInCacheName: false
+  hidePackages: top.jiheng.factory
+  local:
+    # 默认2小时本地缓存
+    default:
+      type: caffeine
+      keyConvertor: fastjson
+      expireAfterWriteInMillis: 3600000
+      expireAfterAccessInMillis: 1800000
+    # 長時本地緩存,主要用于要求时效一般
+    longTime:
+      type: caffeine
+      keyConvertor: fastjson
+      expireAfterWriteInMillis: 300000
+      expireAfterAccessInMillis: 180000
+    # 短時本地緩存,主要用于要求时效较高的配置
+    shortTime:
+      type: caffeine
+      keyConvertor: fastjson
+      expireAfterWriteInMillis: 60000
+      expireAfterAccessInMillis: 40000
+  remote:
+    # 默认2小时的远程缓存
+    default:
+      type: redis
+      expireAfterWriteInMillis: 43200000
+      keyConvertor: fastjson
+      valueEncoder: kryo
+      valueDecoder: kryo
+      poolConfig:
+        minIdle: 5
+        maxIdle: 20
+        maxTotal: 50
+      host: ${SPRING.REDIS.HOST:39.100.230.190}
+      port: ${SPRING.REDIS.PORT:8120}
+      password: ${SPRING.REDIS.PASSWORD:jh1q2w3e4r}
+    # 长时远程緩存,主要用于要求时效要求一般的集中式缓存
+    longTime:
+      type: redis
+      expireAfterWriteInMillis: 7200000
+      keyConvertor: fastjson
+      valueEncoder: kryo
+      valueDecoder: kryo
+      poolConfig:
+        minIdle: 5
+        maxIdle: 20
+        maxTotal: 50
+      host: ${SPRING.REDIS.HOST:39.100.230.190}
+      port: ${SPRING.REDIS.PORT:8120}
+      password: ${SPRING.REDIS.PASSWORD:jh1q2w3e4r}
+    # 短時远程緩存,主要用于要求时效较高的集中式缓存
+    shortTime:
+      type: redis
+      expireAfterWriteInMillis: 300000
+      keyConvertor: fastjson
+      valueEncoder: kryo
+      valueDecoder: kryo
+      poolConfig:
+        minIdle: 5
+        maxIdle: 20
+        maxTotal: 50
+      host: ${SPRING.REDIS.HOST:39.100.230.190}
+      port: ${SPRING.REDIS.PORT:8120}
+      password: ${SPRING.REDIS.PASSWORD:jh1q2w3e4r}

+ 1 - 1
application-file/src/main/resources/application.yml

@@ -3,7 +3,7 @@ server:
     context-path: /file
 spring:
   profiles:
-    active: uat
+    active: prod
   servlet:
     multipart:
       max-file-size: 10240MB

+ 23 - 0
application-task/src/main/resources/application-prod.yml

@@ -0,0 +1,23 @@
+spring:
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    url: jdbc:mysql://8.142.18.146:3306/btl_factory?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+    username: root
+    password: root
+    driver-class-name: com.mysql.cj.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
+    filters: stat
+    maxActive: 10
+    initialSize: 5
+    maxWait: 60000
+    minIdle: 1
+    timeBetweenEvictionRunsMillis: 60000
+    minEvictableIdleTimeMillis: 300000
+    testWhileIdle: true
+    testOnBorrow: false
+    testOnReturn: false
+    poolPreparedStatements: false
+    maxOpenPreparedStatements: 20
+    validationQuery: 'show status like "%Service_Status%"'
+wx:
+  minprogram:
+    miniprogramState: trial

+ 4 - 4
application-task/src/main/resources/application-uat.yml

@@ -1,10 +1,10 @@
 spring: 
-  datasource: 
+  datasource:
      type: com.alibaba.druid.pool.DruidDataSource
-     driver-class-name: com.mysql.cj.jdbc.Driver
-     url: jdbc:mysql://39.100.230.190:8092/crocodile?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=round&transformedBitIsBoolean=true&allowMultiQueries=true
+     url: jdbc:mysql://8.142.18.146:3306/btl_factory?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
      username: root
-     password: 'Jh@Jh2019!'
+     password: root
+     driver-class-name: com.mysql.cj.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
      filters: stat
      maxActive: 10
      initialSize: 5

+ 2 - 2
application-task/src/main/resources/application.yml

@@ -3,8 +3,8 @@ server:
   servlet: 
     context-path: /task/
 spring: 
-  profiles: 
-    active: test
+  profiles:
+    active: prod
 mybatis-plus:
   mapper-locations: classpath*:mappers/*Mapper.xml
   typeAliasesPackage: com.factory.model

+ 2 - 1
common-user/src/main/java/com/factory/user/config/AuthenticationProperties.java

@@ -24,7 +24,8 @@ import java.util.List;
 @ConfigurationProperties(prefix = "cn.jiheng.auth")
 public class AuthenticationProperties {
 
-    private String loginUrl = "https://s2.jihengcc.cn/web/login";
+    //private String loginUrl = "https://s2.jihengcc.cn/web/login";
+    private String loginUrl = "http://www.zhoudu.ltd/web/login";
 
     private String headerName = "Authorization";
 

+ 2 - 2
common-user/src/main/java/com/factory/user/mapper/UsersMapper.java

@@ -17,12 +17,12 @@ import java.util.List;
 public interface UsersMapper extends BaseMapper<UserInfo> {
 
 
-    @Select("SELECT u.`*`,d.name AS deptName FROM us_user u  " +
+    @Select("SELECT u.*,d.name AS deptName FROM us_user u  " +
             "LEFT JOIN us_dept d ON d.del_flag=0 AND d.id=u.dept_id " +
             "WHERE u.del_flag=0 AND u.username=#{username}")
     UserVo getUserByUsername(@Param("username") String username);
 
-    @Select("SELECT u.`*`,d.name AS deptName FROM us_user u  " +
+    @Select("SELECT u.*,d.name AS deptName FROM us_user u  " +
             "LEFT JOIN us_dept d ON d.del_flag=0 AND d.id=u.dept_id " +
             "WHERE u.del_flag=0 AND u.id=#{userId}")
     UserVo getUserById(@Param("userId") Long userId);