Преглед изворни кода

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
     private Integer isUse;
22
     private Integer isUse;
23
     /** 经办人姓名 */
23
     /** 经办人姓名 */
24
     private String operName;
24
     private String operName;
25
+    /** 经办人用户名 */
26
+    private String operUserName;
25
     /** 经办人手机号 */
27
     /** 经办人手机号 */
26
     private String operPhone;
28
     private String operPhone;
27
 
29
 
33
     /** 部门认证链接 */
35
     /** 部门认证链接 */
34
     private String identifyUrl;
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
     /** 机构类型(1 仲裁机构) */
47
     /** 机构类型(1 仲裁机构) */
37
     private Integer identifyType;
48
     private Integer identifyType;
38
 
49
 

+ 4
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/TemplateManage.java Прегледај датотеку

29
      * 模板格式
29
      * 模板格式
30
      */
30
      */
31
     private String temFormat;
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
                 Long deptId = sysDept.getDeptId();
329
                 Long deptId = sysDept.getDeptId();
330
                 SysUser sysUser = new SysUser();
330
                 SysUser sysUser = new SysUser();
331
                 sysUser.setDeptId(deptId);
331
                 sysUser.setDeptId(deptId);
332
-                sysUser.setUserName(generateUniqueUsername());//设置默认的用户名
332
+                sysUser.setUserName(deptIdentify.getOperUserName());
333
                 sysUser.setNickName(operName);
333
                 sysUser.setNickName(operName);
334
                 sysUser.setPhonenumber(operPhone);
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
             return AjaxResult.success("新增成功");
341
             return AjaxResult.success("新增成功");
394
             templateManage.setTemOrigPath(annexPath);
397
             templateManage.setTemOrigPath(annexPath);
395
             String format = getFileExtension(fileName);
398
             String format = getFileExtension(fileName);
396
             templateManage.setTemFormat(format);
399
             templateManage.setTemFormat(format);
400
+            String subFileName = fileName.substring(fileName.lastIndexOf("/")+1);
401
+            templateManage.setFileName(subFileName);
397
             templateManage.setCreateBy(getUsername());
402
             templateManage.setCreateBy(getUsername());
398
             int i = templateManageMapper.insertTemplateManage(templateManage);
403
             int i = templateManageMapper.insertTemplateManage(templateManage);
399
             if (i > 0) {
404
             if (i > 0) {
421
                 startIndex += prefix.length();
426
                 startIndex += prefix.length();
422
                 String annexPath = "uploadPath" + fileName.substring(startIndex);
427
                 String annexPath = "uploadPath" + fileName.substring(startIndex);
423
                 templateManage.setTemOrigPath(annexPath);
428
                 templateManage.setTemOrigPath(annexPath);
429
+                String subFileName = fileName.substring(fileName.lastIndexOf("/")+1);
430
+                templateManage.setFileName(subFileName);
424
                 String format = getFileExtension(fileName);
431
                 String format = getFileExtension(fileName);
425
                 templateManage.setTemFormat(format);
432
                 templateManage.setTemFormat(format);
426
             }
433
             }
468
         return templateManages;
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
     private String getFileExtension(String fileName) {
480
     private String getFileExtension(String fileName) {
486
         int lastDotIndex = fileName.lastIndexOf(".");
481
         int lastDotIndex = fileName.lastIndexOf(".");

+ 3
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java Прегледај датотеку

262
                             deptIdentify1.setIsUse(0);  //默认机构为未启用
262
                             deptIdentify1.setIsUse(0);  //默认机构为未启用
263
                             int row = deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
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
         <result property="operPhone"     column="oper_phone"     />
15
         <result property="operPhone"     column="oper_phone"     />
16
         <result property="identifyType"     column="identify_type"     />
16
         <result property="identifyType"     column="identify_type"     />
17
         <result property="delFlag"     column="del_flag"     />
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
     </resultMap>
22
     </resultMap>
20
 
23
 
21
 
24
 
22
     <select id="selectDeptIdentify" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
25
     <select id="selectDeptIdentify" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
23
         SELECT  id, identify_name ,identify_status , identify_date,is_use,org_id,auth_flow_id,
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
         FROM  dept_identify
28
         FROM  dept_identify
26
         <where>
29
         <where>
27
             <if test="id != null">
30
             <if test="id != null">
59
         <if test="operPhone != null and operPhone != ''">oper_phone,</if>
62
         <if test="operPhone != null and operPhone != ''">oper_phone,</if>
60
         <if test="identifyType != null">identify_type,</if>
63
         <if test="identifyType != null">identify_type,</if>
61
         <if test="authFlowId != null and authFlowId != ''">auth_flow_id,</if>
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
         del_flag
68
         del_flag
63
         )values(
69
         )values(
64
         <if test="identifyName != null and identifyName != ''">#{identifyName},</if>
70
         <if test="identifyName != null and identifyName != ''">#{identifyName},</if>
70
         <if test="operPhone != null and operPhone != ''">#{operPhone},</if>
76
         <if test="operPhone != null and operPhone != ''">#{operPhone},</if>
71
         <if test="identifyType != null ">#{identifyType},</if>
77
         <if test="identifyType != null ">#{identifyType},</if>
72
         <if test="authFlowId != null and authFlowId != '' ">#{authFlowId},</if>
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
         0
82
         0
74
         )
83
         )
75
     </insert>
84
     </insert>
90
             <if test="delFlag != null ">del_flag = #{delFlag},</if>
99
             <if test="delFlag != null ">del_flag = #{delFlag},</if>
91
             <if test="operName != null ">oper_name = #{operName},</if>
100
             <if test="operName != null ">oper_name = #{operName},</if>
92
             <if test="operPhone != null ">oper_phone = #{operPhone},</if>
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
             <if test="authFlowId != null  and authFlowId != '' ">auth_flow_id = #{authFlowId}</if>
105
             <if test="authFlowId != null  and authFlowId != '' ">auth_flow_id = #{authFlowId}</if>
94
         </set>
106
         </set>
95
         <where>
107
         <where>

+ 5
- 1
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/TemplateManageMapper.xml Прегледај датотеку

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