Explorar o código

feat: 优化excel导入

hanfangyu hai 1 ano
pai
achega
82a9469ec4

+ 4 - 0
.drone.yml

@@ -39,3 +39,7 @@ volumes: # 定义流水线挂载目录,用于共享数据
   - name: maven-cache
     host:
       path: /home/cache
+
+trigger:
+  branch:
+    - master

+ 2 - 0
src/main/java/cn/ezhizao/project/business/productionCompany/domain/BizProductionCompany.java

@@ -368,4 +368,6 @@ public class BizProductionCompany extends BaseEntity
     //排序查询字段
     @TableField(exist = false)
     private String orderByColumn;
+    @TableField(exist = false)
+    private String principal;
 }

+ 16 - 8
src/main/resources/application-dev.yml

@@ -1,17 +1,21 @@
 # 数据源配置
 spring:
+    cloud:
+        nacos:
+            discovery:
+                server-addr: 154.8.178.69:8848 # Nacos服务器地址
     application:
-        name: ezhizao-yzbh-production-zx
+        name: ezhizao-yzbh-production
     # redis 配置
     redis:
         # 地址
-        host: 120.46.159.163
+        host: 62.234.54.84
         # 端口,默认为6379
-        port: 6379
+        port: 16379
         # 数据库索引
         database: 8
         # 密码
-        password: ezhizao.cn123456
+        password: yuchang@2023
         # 连接超时时间
         timeout: 10s
         lettuce:
@@ -30,9 +34,9 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://120.46.159.163:3306/ezhizao_yzbh_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&rewriteBatchedStatements=true&serverTimezone=GMT%2B8
-                username: root
-                password: ezhizao.cn123456
+                url: jdbc:mysql://154.8.178.69:3306/ezhizao_yzbh_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=true&rewriteBatchedStatements=true&serverTimezone=GMT%2B8
+                username: admin
+                password: admin
 #                url: jdbc:mysql://localhost:3306/ezhizao_yzbh_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=true&rewriteBatchedStatements=true&serverTimezone=GMT%2B8
 #                username: root
 #                password: 123456
@@ -84,4 +88,8 @@ spring:
                         multi-statement-allow: true
 # 文件上传
 ruoyi:
-    profile: D:/Ezhizao/yzbh/
+    profile: /home/ruoyi/yzbh/
+    pdfTemplate:
+        url: /home/files/yzbh/templates/
+    pdfFontPath:
+        url: /usr/share/fonts/chinese/

+ 3 - 0
src/main/resources/mybatis/business/BizProductionCompanyMapper.xml

@@ -28,6 +28,9 @@
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
             c.deleted = 0
             <if test="id != null  and id != ''">AND c.id = #{id}</if>
+            <if test="principal != null and principal != ''">
+                AND (c.leader_id=#{principal} OR c.adviser_id=#{principal})
+            </if>
             <if test="category != null  and category != ''">AND c.category = #{category}</if>
             <if test="code != null  and code != ''">AND c.code = #{code}</if>
             <if test="name != null  and name != ''">AND c.name like concat('%', #{name}, '%')</if>