ソースを参照

Merge branch 'hjb' of SH-Arbitrate/Arbitrate-Backend into dev

hejinbo 2 年 前
コミット
f85edb62f4

+ 11
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/DeptIdentify.java ファイルの表示

@@ -22,6 +22,8 @@ public class DeptIdentify  extends BaseEntity {
22 22
     private Integer isUse;
23 23
     /** 经办人姓名 */
24 24
     private String operName;
25
+    /** 经办人用户名 */
26
+    private String operUserName;
25 27
     /** 经办人手机号 */
26 28
     private String operPhone;
27 29
 
@@ -33,6 +35,15 @@ public class DeptIdentify  extends BaseEntity {
33 35
     /** 部门认证链接 */
34 36
     private String identifyUrl;
35 37
 
38
+    /** 机构信用代码 */
39
+    private String creditCode;
40
+
41
+    /** 法人姓名 */
42
+    private String legalPerName;
43
+
44
+    /** 法人手机号 */
45
+    private String legalPerPhone;
46
+
36 47
     /** 机构类型(1 仲裁机构) */
37 48
     private Integer identifyType;
38 49
 

+ 4
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/TemplateManage.java ファイルの表示

@@ -29,7 +29,10 @@ public class TemplateManage extends BaseEntity {
29 29
      * 模板格式
30 30
      */
31 31
     private String temFormat;
32
-
32
+    /**
33
+     * 文件名
34
+     */
35
+    private String fileName;
33 36
     /**
34 37
      * 原模板路径
35 38
      */

+ 10
- 15
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/DeptIdentifyServiceImpl.java ファイルの表示

@@ -329,10 +329,13 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
329 329
                 Long deptId = sysDept.getDeptId();
330 330
                 SysUser sysUser = new SysUser();
331 331
                 sysUser.setDeptId(deptId);
332
-                sysUser.setUserName(generateUniqueUsername());//设置默认的用户名
332
+                sysUser.setUserName(deptIdentify.getOperUserName());
333 333
                 sysUser.setNickName(operName);
334 334
                 sysUser.setPhonenumber(operPhone);
335
-                sysUserMapper.insertUser(sysUser);
335
+                SysUser sysUser1 = sysUserMapper.selectUserByUserName(deptIdentify.getOperUserName());
336
+                if (sysUser1== null) {
337
+                    sysUserMapper.insertUser(sysUser);
338
+                }
336 339
             }
337 340
 
338 341
             return AjaxResult.success("新增成功");
@@ -394,6 +397,8 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
394 397
             templateManage.setTemOrigPath(annexPath);
395 398
             String format = getFileExtension(fileName);
396 399
             templateManage.setTemFormat(format);
400
+            String subFileName = fileName.substring(fileName.lastIndexOf("/")+1);
401
+            templateManage.setFileName(subFileName);
397 402
             templateManage.setCreateBy(getUsername());
398 403
             int i = templateManageMapper.insertTemplateManage(templateManage);
399 404
             if (i > 0) {
@@ -421,6 +426,8 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
421 426
                 startIndex += prefix.length();
422 427
                 String annexPath = "uploadPath" + fileName.substring(startIndex);
423 428
                 templateManage.setTemOrigPath(annexPath);
429
+                String subFileName = fileName.substring(fileName.lastIndexOf("/")+1);
430
+                templateManage.setFileName(subFileName);
424 431
                 String format = getFileExtension(fileName);
425 432
                 templateManage.setTemFormat(format);
426 433
             }
@@ -468,19 +475,7 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
468 475
         return templateManages;
469 476
     }
470 477
 
471
-    private String generateUniqueUsername() {
472
-        final Random random = new Random();
473
-        final Set<String> generatedUsernames = new HashSet<>();
474
-        while (true) {
475
-            int min = 000000; // 最小的六位数
476
-            int max = 999999; // 最大的六位数
477
-            int randomNum = random.nextInt(max - min + 1) + min;
478
-            if (!generatedUsernames.contains(randomNum)) {
479
-                generatedUsernames.add(String.valueOf(randomNum));
480
-                return String.valueOf(randomNum);
481
-            }
482
-        }
483
-    }
478
+
484 479
 
485 480
     private String getFileExtension(String fileName) {
486 481
         int lastDotIndex = fileName.lastIndexOf(".");

+ 3
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java ファイルの表示

@@ -262,6 +262,9 @@ public class FixSelectFlowDetailUtils {
262 262
                             deptIdentify1.setIsUse(0);  //默认机构为未启用
263 263
                             int row = deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
264 264
                         }
265
+                    }else {
266
+                        deptIdentify1.setIdentifyStatus(2);
267
+                        deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
265 268
                     }
266 269
                 }
267 270
 

+ 13
- 1
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/DeptIdentifyMapper.xml ファイルの表示

@@ -15,13 +15,16 @@
15 15
         <result property="operPhone"     column="oper_phone"     />
16 16
         <result property="identifyType"     column="identify_type"     />
17 17
         <result property="delFlag"     column="del_flag"     />
18
+        <result property="creditCode"     column="credit_code"     />
19
+        <result property="legalPerName"     column="legal_per_name"     />
20
+        <result property="legalPerPhone"     column="legal_per_phone"     />
18 21
 
19 22
     </resultMap>
20 23
 
21 24
 
22 25
     <select id="selectDeptIdentify" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
23 26
         SELECT  id, identify_name ,identify_status , identify_date,is_use,org_id,auth_flow_id,
24
-                oper_name,oper_phone,identify_type
27
+                oper_name,oper_phone,identify_type,credit_code,legal_per_name,legal_per_phone
25 28
         FROM  dept_identify
26 29
         <where>
27 30
             <if test="id != null">
@@ -59,6 +62,9 @@
59 62
         <if test="operPhone != null and operPhone != ''">oper_phone,</if>
60 63
         <if test="identifyType != null">identify_type,</if>
61 64
         <if test="authFlowId != null and authFlowId != ''">auth_flow_id,</if>
65
+        <if test="creditCode != null and creditCode != ''">credit_code,</if>
66
+        <if test="legalPerName != null and legalPerName != ''">legal_per_name,</if>
67
+        <if test="legalPerPhone != null and legalPerPhone != ''">legal_per_phone,</if>
62 68
         del_flag
63 69
         )values(
64 70
         <if test="identifyName != null and identifyName != ''">#{identifyName},</if>
@@ -70,6 +76,9 @@
70 76
         <if test="operPhone != null and operPhone != ''">#{operPhone},</if>
71 77
         <if test="identifyType != null ">#{identifyType},</if>
72 78
         <if test="authFlowId != null and authFlowId != '' ">#{authFlowId},</if>
79
+        <if test="creditCode != null and creditCode != '' ">#{creditCode},</if>
80
+        <if test="legalPerName != null and legalPerName != '' ">#{legalPerName},</if>
81
+        <if test="legalPerPhone != null and legalPerPhone != '' ">#{legalPerPhone},</if>
73 82
         0
74 83
         )
75 84
     </insert>
@@ -90,6 +99,9 @@
90 99
             <if test="delFlag != null ">del_flag = #{delFlag},</if>
91 100
             <if test="operName != null ">oper_name = #{operName},</if>
92 101
             <if test="operPhone != null ">oper_phone = #{operPhone},</if>
102
+            <if test="creditCode != null ">credit_code = #{creditCode},</if>
103
+            <if test="legalPerName != null ">legal_per_name = #{legalPerName},</if>
104
+            <if test="legalPerPhone != null ">legal_per_phone = #{legalPerPhone},</if>
93 105
             <if test="authFlowId != null  and authFlowId != '' ">auth_flow_id = #{authFlowId}</if>
94 106
         </set>
95 107
         <where>

+ 5
- 1
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/TemplateManageMapper.xml ファイルの表示

@@ -12,6 +12,7 @@
12 12
         <result property="temOrigPath"     column="tem_orig_path"     />
13 13
         <result property="temRevisPath"     column="tem_revis_path"     />
14 14
         <result property="delFlag"     column="del_flag"     />
15
+        <result property="fileName"     column="file_name"     />
15 16
     </resultMap>
16 17
 
17 18
     <insert id="insertTemplateManage" parameterType="TemplateManage" useGeneratedKeys="true" keyProperty="id">
@@ -23,6 +24,7 @@
23 24
         <if test="temOrigPath != null and temOrigPath != '' ">tem_orig_path,</if>
24 25
         <if test="temRevisPath != null and temRevisPath != '' ">tem_revis_path,</if>
25 26
         <if test="createBy != null and createBy != '' ">create_by,</if>
27
+        <if test="fileName != null and fileName != '' ">file_name,</if>
26 28
         del_flag,create_time
27 29
         )values(
28 30
         <if test="identifyId != null">#{identifyId},</if>
@@ -32,6 +34,7 @@
32 34
         <if test="temOrigPath != null and temOrigPath != ''">#{temOrigPath},</if>
33 35
         <if test="temRevisPath != null and temRevisPath != ''">#{temRevisPath},</if>
34 36
         <if test="createBy != null and createBy != ''">#{createBy},</if>
37
+        <if test="fileName != null and fileName != ''">#{fileName},</if>
35 38
         0,sysdate()
36 39
         )
37 40
     </insert>
@@ -47,6 +50,7 @@
47 50
             <if test="delFlag != null ">del_flag = #{delFlag},</if>
48 51
             <if test="temRevisPath != null and temRevisPath != '' ">tem_revis_path = #{temRevisPath},</if>
49 52
             <if test="updateBy != null and updateBy != '' ">update_by = #{updateBy},</if>
53
+            <if test="fileName != null and fileName != '' ">file_name = #{fileName},</if>
50 54
             update_time = sysdate()
51 55
         </set>
52 56
         <where>
@@ -58,7 +62,7 @@
58 62
     </update>
59 63
 
60 64
     <select id="selectTemplateList" parameterType="TemplateManage" resultMap="TemplateManageResult">
61
-        SELECT  id, identify_id ,tem_name , tem_type,tem_format,tem_orig_path,tem_revis_path
65
+        SELECT  id, identify_id ,tem_name , tem_type,tem_format,tem_orig_path,tem_revis_path ,file_name
62 66
         FROM  template_manage
63 67
         <where>
64 68
             <if test="id != null">