From a2dffac86d354e7decce5f41668d8f95bb87e989 Mon Sep 17 00:00:00 2001
From: zhuo <2089219845@qq.com>
Date: 星期日, 16 三月 2025 19:26:00 +0800
Subject: [PATCH] 添加正式库配置类

---
 ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java |    3 
 ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java        |    4 +
 ruoyi-admin/src/main/resources/application-test.yml              |    2 
 ruoyi-admin/src/main/resources/application-ztzb.yml              |  175 +++++++++++++++++++++++++++++++++++++++++++
 ruoyi-admin/src/main/resources/application.yml                   |    6 
 5 files changed, 185 insertions(+), 5 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
index affa7b7..559c5b5 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
@@ -3,6 +3,8 @@
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
 
 /**
  * 鍚姩绋嬪簭
@@ -10,6 +12,8 @@
  * @author ruoyi
  */
 @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
+@EnableTransactionManagement
+@EnableScheduling
 public class RuoYiApplication
 {
     public static void main(String[] args)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java
index 6de67dc..bd7af1c 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java
@@ -1,11 +1,12 @@
 package com.ruoyi;
 
+import com.ruoyi.common.utils.SecurityUtils;
 import org.springframework.boot.builder.SpringApplicationBuilder;
 import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
 
 /**
  * web瀹瑰櫒涓繘琛岄儴缃�
- * 
+ *
  * @author ruoyi
  */
 public class RuoYiServletInitializer extends SpringBootServletInitializer
diff --git a/ruoyi-admin/src/main/resources/application-test.yml b/ruoyi-admin/src/main/resources/application-test.yml
index 868108e..824eb9f 100644
--- a/ruoyi-admin/src/main/resources/application-test.yml
+++ b/ruoyi-admin/src/main/resources/application-test.yml
@@ -8,7 +8,7 @@
     druid:
       # 涓诲簱鏁版嵁婧�
       master:
-        url: jdbc:mysql://10.16.173.59:3306/center-lims-dz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+        url: jdbc:mysql://127.0.0.1:3306/center-lims-dz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
         username: root
         password: zttZTT123!
 
diff --git a/ruoyi-admin/src/main/resources/application-ztzb.yml b/ruoyi-admin/src/main/resources/application-ztzb.yml
new file mode 100644
index 0000000..bc4dc4a
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/application-ztzb.yml
@@ -0,0 +1,175 @@
+# 瑁呭姝e紡搴�
+
+# 鏁版嵁婧愰厤缃�
+spring:
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driverClassName: com.mysql.cj.jdbc.Driver
+    druid:
+      # 涓诲簱鏁版嵁婧�
+      master:
+        url: jdbc:mysql://127.0.0.1:3306/ztzb-lims?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+        username: root
+        password: zttZTT123!
+
+      # 浠庡簱鏁版嵁婧�
+      slave:
+        # 浠庢暟鎹簮寮�鍏�/榛樿鍏抽棴
+        enabled: false
+        url:
+        username:
+        password:
+      # 鍒濆杩炴帴鏁�
+      initialSize: 5
+      # 鏈�灏忚繛鎺ユ睜鏁伴噺
+      minIdle: 10
+      # 鏈�澶ц繛鎺ユ睜鏁伴噺
+      maxActive: 20
+      # 閰嶇疆鑾峰彇杩炴帴绛夊緟瓒呮椂鐨勬椂闂�
+      maxWait: 60000
+      # 閰嶇疆杩炴帴瓒呮椂鏃堕棿
+      connectTimeout: 30000
+      # 閰嶇疆缃戠粶瓒呮椂鏃堕棿
+      socketTimeout: 60000
+      # 閰嶇疆闂撮殧澶氫箙鎵嶈繘琛屼竴娆℃娴嬶紝妫�娴嬮渶瑕佸叧闂殑绌洪棽杩炴帴锛屽崟浣嶆槸姣
+      timeBetweenEvictionRunsMillis: 60000
+      # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�灏忕敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣
+      minEvictableIdleTimeMillis: 300000
+      # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�澶х敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣
+      maxEvictableIdleTimeMillis: 900000
+      # 閰嶇疆妫�娴嬭繛鎺ユ槸鍚︽湁鏁�
+      validationQuery: SELECT 1 FROM DUAL
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      webStatFilter:
+        enabled: true
+      statViewServlet:
+        enabled: true
+        # 璁剧疆鐧藉悕鍗曪紝涓嶅~鍒欏厑璁告墍鏈夎闂�
+        allow:
+        url-pattern: /druid/*
+        # 鎺у埗鍙扮鐞嗙敤鎴峰悕鍜屽瘑鐮�
+        login-username: ruoyi
+        login-password: 123456
+      filter:
+        stat:
+          enabled: true
+          # 鎱QL璁板綍
+          log-slow-sql: true
+          slow-sql-millis: 1000
+          merge-sql: true
+        wall:
+          config:
+            multi-statement-allow: true
+
+  # redis 閰嶇疆
+  redis:
+    # 鍦板潃
+    host: localhost
+    # 绔彛锛岄粯璁や负6379
+    port: 6379
+    # 鏁版嵁搴撶储寮�
+    database: 0
+    #    # 瀵嗙爜
+    password: zttZTT123!
+    # 杩炴帴瓒呮椂鏃堕棿
+    timeout: 10s
+    lettuce:
+      pool:
+        # 杩炴帴姹犱腑鐨勬渶灏忕┖闂茶繛鎺�
+        min-idle: 0
+        # 杩炴帴姹犱腑鐨勬渶澶х┖闂茶繛鎺�
+        max-idle: 8
+        # 杩炴帴姹犵殑鏈�澶ф暟鎹簱杩炴帴鏁�
+        max-active: 8
+        # #杩炴帴姹犳渶澶ч樆濉炵瓑寰呮椂闂达紙浣跨敤璐熷�艰〃绀烘病鏈夐檺鍒讹級
+        max-wait: -1ms
+
+# mybatis-plus閰嶇疆
+mybatis-plus:
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  type-aliases-package: com.ruoyi.**.domain
+  global-config:
+    banner: off
+    db-config:
+      id-type: auto
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+    log-impl: # org.apache.ibatis.logging.stdout.StdOutImpl
+
+# 鏃ュ織閰嶇疆
+logging:
+  file-location: /center-lims/after
+  level:
+    com.ruoyi: info
+    org.springframework: warn
+
+# Swagger閰嶇疆
+swagger:
+  # 鏄惁寮�鍚痵wagger
+  enabled: false
+
+# minio瀹瑰櫒绠$悊
+minio:
+  endpoint: http://114.132.189.42/
+  port: 7019
+  secure: false
+  accessKey: admin
+  secretKey: 12345678
+  preview-expiry: 24 # 棰勮鍦板潃榛樿24灏忔椂
+
+# 鐓х墖瀛樺偍璺緞+++++++++++++++++++++++++++杩愮淮闇�瑕侀厤缃�+++++++++++++++++++++++++++
+file:
+  path: /center-lims/after/file/img
+  # 涓婁紶鏂囦欢鍏佽鐨勬墿灞曞悕
+  allowed: png,jpg,jpeg,gif
+# 鎶ュ憡鍦板潃
+wordUrl: /center-lims/after/file/word
+
+# oa娴佺▼
+oa:
+  oaHost: http://192.168.0.49:8000/oa_workflowrequest.asmx?wsdl
+  prodIp: http://192.168.21.53:8001/lims
+  unqualifiedProcessId: 41974
+
+# 浼佷笟寰俊鎺ㄩ��
+wechat:
+  # 璐ㄩ噺鎶ユ閫氱煡
+  examiningUrl: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=6e1d2d18-0c60-4889-a05f-b1b5479c9188
+
+# 浜轰簨绯荤粺
+personnel:
+  # 姝e紡鍦板潃
+  code: https://ztt-sso.ztt.cn/oauth2/token
+  # 瑁呭浜轰簨姝e紡搴�
+  appId: 6f5f6a0c-2a01-4ef6-9e75-c8a6f0c2f044
+  appSecret: 9b9c4735b1e5ee9d6a8544b9b38bb03
+  companies: https://ztt-connector.ztt.cn/api/org/v1/companies
+  simple: https://ztt-connector.ztt.cn/api/org/v1/employees/simple?companyId=
+  # 浜哄憳瀵嗙爜鑾峰彇
+  password: https://ztt-connector.ztt.cn/api/org/v1/employees/original_pwd/
+  department: https://ztt-connector.ztt.cn/api/org/v1/companies/companyId/departments
+  person: https://ztt-connector.ztt.cn/api/org/v1/employees/simple/
+
+ifs:
+  contract: ZTZB
+  contract-key-get: x%2bvbGReagnsK%2fDr45xkVcGLOh%2fWWGODQ2inBGeNwbZw%3d
+  contract-key-post: x+vbGReagnsK/Dr45xkVcGLOh/WWGODQ2inBGeNwbZw=
+  custorder: http://192.168.20.50/PurchService.ashx?
+  custorder-port: http://192.168.20.50:8008/PurchService.ashx?
+  erp-services: http://192.168.20.50:8081
+
+# 澶囨敞 18083瀵嗙爜锛歾ttZTT123!@
+mqtt:
+  url: tcp://mqtt-ztt.zttiot.com:1883 # 鏈嶅姟鍣╥p
+  username: forwarder # MQTT-鏈嶅姟绔�-鐢ㄦ埛鍚�,鍚庢湡浼氫慨鏀逛负鐢ㄦ埛鐧诲綍鍚�
+  password: ZTlink12345 # MQTT-鏈嶅姟绔�-瀵嗙爜锛�,鍚庢湡浼氫慨鏀逛负鐢ㄦ埛鐧诲綍瀵嗙爜
+  timeout: 100 # 瓒呮椂鏃堕棿 锛堝崟浣嶏細绉掞級
+  keepalive: 60 # 蹇冭烦 锛堝崟浣嶏細绉掞級
+  qos: 1 # 蹇冭烦鍖呯骇鍒�
+  completion-timeout: 3000 # 杩炴帴瓒呮椂鏃堕棿锛堝崟浣嶏細绉掞級
+  clientId: javaPublish # clientId
+  subscribe: /ztt/v3/2443521/publish # 璁㈤槄涓婚
+  client: true # 濡傛灉寮�鍙戦渶瑕佸惎鍔ㄦ祴璇曪紝闇�瑕佹敼涓篺alse涓嶇劧浼氫竴鐩存姤閿�
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index 45758be..af7aa5f 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -7,7 +7,7 @@
   # 鐗堟潈骞翠唤
   copyrightYear: 2025
   # 鏂囦欢璺緞 绀轰緥锛� Windows閰嶇疆D:/ruoyi/uploadPath锛孡inux閰嶇疆 /home/ruoyi/uploadPath锛�
-  profile: /javaWork/lims-ruoyi/file/uploadPath
+  profile: /center-lims/after/file/uploadPath
   # 鑾峰彇ip鍦板潃寮�鍏�
   addressEnabled: false
   # 楠岃瘉鐮佺被鍨� math 鏁板瓧璁$畻 char 瀛楃楠岃瘉
@@ -19,7 +19,7 @@
   port: 8001
   servlet:
     # 搴旂敤鐨勮闂矾寰�
-    context-path: /
+    context-path: /lims
   tomcat:
     # tomcat鐨刄RI缂栫爜
     uri-encoding: UTF-8
@@ -46,7 +46,7 @@
     # 鍥介檯鍖栬祫婧愭枃浠惰矾寰�
     basename: i18n/messages
   profiles:
-    active: druid
+    active: ztzb
   # 鍏ㄥ眬鏃堕棿澶勭悊 LocalDateTime鏃堕棿搴忓垪鍙�
   jackson:
     date-format: yyyy-MM-dd HH:mm:ss

--
Gitblit v1.9.3