Browse Source

申请机构修改

18792927508 2 years ago
parent
commit
fb349f1983

+ 0
- 18
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/dept/DeptIdentifyController.java View File

@@ -201,25 +201,7 @@ public class DeptIdentifyController extends BaseController {
201 201
         return deptIdentifyService.saveFatchRules(templateManage);
202 202
     }
203 203
 
204
-    /**
205
-     * 查询column和注释
206
-     * @return
207
-     */
208
-    @PostMapping("/selectColumnandComment")
209
-    public AjaxResult selectColumnandComment(){
210
-        List<FatchRule> fatchRuleList = deptIdentifyService.selectColumnandComment();
211
-        return AjaxResult.success(fatchRuleList);
212
-    }
213 204
 
214
-    /**
215
-     * 查询column
216
-     * @return
217
-     */
218
-    @PostMapping("/selectColumnbycomment")
219
-    public AjaxResult selectColumnbycomment(@RequestBody  FatchRule fatchRule){
220
-        FatchRule fatchRulesel = deptIdentifyService.selectColumnbycomment(fatchRule);
221
-        return AjaxResult.success(fatchRulesel);
222
-    }
223 205
 
224 206
     /**
225 207
      * 根据模板id查询模板字段列表

+ 3
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsCaseApplicationController.java View File

@@ -51,6 +51,9 @@ public class MsCaseApplicationController extends BaseController {
51 51
     @PostMapping("/insert")
52 52
     public AjaxResult insert(@RequestBody MsCaseApplicationVO caseApplication )
53 53
     {
54
+        if(caseApplication.getAffiliate()==null||caseApplication.getAffiliate().getOrganizeFlag()==null){
55
+            error("参数校验失败");
56
+        }
54 57
 
55 58
         return success(caseApplicationService.insert(caseApplication));
56 59
     }

+ 15
- 9
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/entity/mscase/MsCaseAffiliate.java View File

@@ -20,24 +20,30 @@ public class MsCaseAffiliate {
20 20
     @Id
21 21
     @Column(name = "case_appli_id")
22 22
     private Long caseAppliId;
23
+    /**
24
+     * 是否机构申请,0-自然人,1-申请机构,默认0
25
+     */
26
+    @Column(name = "organize_flag")
27
+    private Integer organizeFlag;
28
+
23 29
 
24 30
     /**
25
-     * 申请机构
31
+     * 申请人id
26 32
      */
27
-    @Column(name = "application_organ_id")
28
-    private String applicationOrganId;
33
+    @Column(name = "application_id")
34
+    private String applicationId;
29 35
 
30 36
     /**
31
-     * 申请机构名称
37
+     * 申请名称
32 38
      */
33
-    @Column(name = "application_organ_name")
34
-    private String applicationOrganName;
39
+    @Column(name = "application_name")
40
+    private String  applicationName;
35 41
 
36 42
     /**
37
-     * 统一社会信用代码
43
+     * 代码(统一社会信用代码或者身份证号)
38 44
      */
39
-    @Column(name = "credit_code")
40
-    private String creditCode;
45
+    @Column(name = "code")
46
+    private String code;
41 47
 
42 48
     /**
43 49
      * 法定代表人

+ 2
- 28
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/entity/mscase/MsCaseApplication.java View File

@@ -51,7 +51,7 @@ public class MsCaseApplication {
51 51
     private BigDecimal caseSubjectAmount;
52 52
 
53 53
     /**
54
-     * 调解方式,1-开庭调解,2-书面调解
54
+     * 调解方式,1-线上调解,2-线下调解
55 55
      */
56 56
     @Column(name = "mediation_method")
57 57
     private String mediationMethod;
@@ -92,23 +92,12 @@ public class MsCaseApplication {
92 92
     @Column(name = "mediator_name")
93 93
     private String mediatorName;
94 94
 
95
-    /**
96
-     * 是否同意组庭,0否,1是
97
-     */
98
-    @Column(name = "is_agree_pend_tral")
99
-    private Integer isAgreePendTral;
100
-
101 95
     /**
102 96
      * 支付方式(0线上支付,1线下支付)
103 97
      */
104 98
     @Column(name = "pay_type")
105 99
     private String payType;
106 100
 
107
-    /**
108
-     * 是否仲裁反请求,1是,0否
109
-     */
110
-    @Column(name = "adjudica_counter")
111
-    private Integer adjudicaCounter;
112 101
 
113 102
     /**
114 103
      * 被申请人是否缺席,1是,0否
@@ -192,17 +181,6 @@ public class MsCaseApplication {
192 181
      */
193 182
     private String facts;
194 183
 
195
-    /**
196
-     * 申请人请求仲裁庭裁决
197
-     */
198
-    @Column(name = "request_rule")
199
-    private String requestRule;
200
-
201
-    /**
202
-     * 案件描述
203
-     */
204
-    @Column(name = "case_describe")
205
-    private String caseDescribe;
206 184
 
207 185
     /**
208 186
      * 调解书URL
@@ -210,11 +188,7 @@ public class MsCaseApplication {
210 188
     @Column(name = "mediation_url")
211 189
     private String mediationUrl;
212 190
 
213
-    /**
214
-     * 仲裁反请求原因
215
-     */
216
-    @Column(name = "adjudica_counter_reason")
217
-    private String adjudicaCounterReason;
191
+
218 192
 
219 193
     /**
220 194
      * 调解内容

+ 5
- 5
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseApplicationMapper.java View File

@@ -35,7 +35,7 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
35 35
      * @return
36 36
      */
37 37
     @Select("<script> select t.* from (select c.id,c.room_id roomId,c.mediation_method mediationMethod,0 AS pendingStatus,c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,c.case_subject_amount caseSubjectAmount," +
38
-            "a.application_organ_name applicationOrganName,a.respondent_name respondentName,c.mediator_name mediatorName," +
38
+            "a.application_name applicationName,a.respondent_name respondentName,c.mediator_name mediatorName," +
39 39
             "c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime from ms_case_application c " +
40 40
             "join ms_case_affiliate a on c.id=a.case_appli_id <where> " +
41 41
             "<if test='caseStatusNames != null and caseStatusNames.size() > 0 '> and  c.case_status_name in" +
@@ -54,7 +54,7 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
54 54
             "</if> " +
55 55
 
56 56
             "<if test=\"req.applicantFlag != null \">" +
57
-            "    AND a.application_organ_id = #{req.applicationOrganId} " +
57
+            "    AND a.application_id = #{req.applicationId} " +
58 58
             "</if> "
59 59
             + "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
60 60
             "    AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
@@ -70,7 +70,7 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
70 70
             "and c.create_time &lt;= #{req.endTime}</if>" +
71 71
             "        </where> " +
72 72
             "union  select c.id id,c.room_id roomId,c.mediation_method mediationMethod,1 AS pendingStatus,c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,c.case_subject_amount caseSubjectAmount," +
73
-            "a.application_organ_name applicationOrganName,a.respondent_name respondentName,c.mediator_name mediatorName," +
73
+            "a.application_name applicationName,a.respondent_name respondentName,c.mediator_name mediatorName," +
74 74
             "c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime from ms_case_log_record r " +
75 75
             "join ms_case_application c on r.case_appli_id=c.id  " +
76 76
             "join ms_case_affiliate a on c.id=a.case_appli_id  <where> r.create_by=#{req.userName}  and c.id not in (" +
@@ -92,7 +92,7 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
92 92
             "    AND c1.case_num = #{req.caseNum} " +
93 93
             "</if> " +
94 94
             "<if test=\"req.applicantFlag != null \">" +
95
-            "    AND a1.application_organ_id = #{req.applicationOrganId} " +
95
+            "    AND a1.application_id = #{req.applicationId} " +
96 96
             "</if> "
97 97
             + "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
98 98
             "    AND a1.respondent_identity_num = #{req.respondentIdentityNum} " +
@@ -126,7 +126,7 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
126 126
             "    AND c.case_num = #{req.caseNum} " +
127 127
             "</if> " +
128 128
             "<if test=\"req.applicantFlag != null \">" +
129
-            "    AND a.application_organ_id = #{req.applicationOrganId} " +
129
+            "    AND a.application_id = #{req.applicationId} " +
130 130
             "</if> "
131 131
             + "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
132 132
             "    AND a.respondent_identity_num = #{req.respondentIdentityNum} " +

+ 0
- 3
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/template/FatchRuleMapper.java View File

@@ -24,7 +24,4 @@ public interface FatchRuleMapper {
24 24
 
25 25
    int insertFatchRule(FatchRule fatchRule);
26 26
 
27
-   List<FatchRule> selectColumnandComment(FatchRule fatchRuleselect);
28
-
29
-   FatchRule selectColumnbycomment(FatchRule fatchRule);
30 27
 }

+ 0
- 3
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/dept/IDeptIdentifyService.java View File

@@ -55,9 +55,6 @@ public interface IDeptIdentifyService {
55 55
 
56 56
     AjaxResult saveFatchRules(TemplateManage templateManage);
57 57
 
58
-    List<FatchRule> selectColumnandComment();
59
-
60
-    FatchRule selectColumnbycomment(FatchRule fatchRule);
61 58
 
62 59
     /**
63 60
      * 根据模板id查询模板字段列表

+ 0
- 15
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/dept/impl/DeptIdentifyServiceImpl.java View File

@@ -586,21 +586,6 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
586 586
         return AjaxResult.error();
587 587
     }
588 588
 
589
-    @Override
590
-    public List<FatchRule> selectColumnandComment() {
591
-        List<FatchRule>  fatchRules = new ArrayList<>();
592
-        FatchRule fatchRuleselect = new FatchRule();
593
-        fatchRuleselect.setDatabaseName("test_smart_arbitration");
594
-        fatchRules = fatchRuleMapper.selectColumnandComment(fatchRuleselect);
595
-        return fatchRules;
596
-    }
597
-
598
-    @Override
599
-    public FatchRule selectColumnbycomment(FatchRule fatchRule) {
600
-        fatchRule.setDatabaseName("test_smart_arbitration");
601
-        FatchRule fatchRulesel = fatchRuleMapper.selectColumnbycomment(fatchRule);
602
-        return fatchRulesel;
603
-    }
604 589
 
605 590
     /**
606 591
      * 根据模板id查询模板字段列表

+ 10
- 10
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java View File

@@ -272,7 +272,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
272 272
             // 保存案件相关人员
273 273
             if (affiliate != null) {
274 274
                 // 设置申请人
275
-                if (StrUtil.isNotEmpty(affiliate.getApplicationOrganName())) {
275
+                if (StrUtil.isNotEmpty(affiliate.getApplicationName())&&affiliate.getOrganizeFlag()==1) {
276 276
                     // 组装申请机构
277 277
                     insertDept(affiliate);
278 278
                     // 新增申请机构代理人
@@ -411,7 +411,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
411 411
         if (affiliate != null) {
412 412
             affiliate.setCaseAppliId(caseApplication.getId());
413 413
             // 设置申请人
414
-            if (StrUtil.isNotEmpty(affiliate.getApplicationOrganName())) {
414
+            if (StrUtil.isNotEmpty(affiliate.getApplicationName())&&affiliate.getOrganizeFlag()==1) {
415 415
                 // 组装申请机构
416 416
                 insertDept(affiliate);
417 417
                 // 新增申请机构代理人
@@ -2124,20 +2124,20 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
2124 2124
             agentUser.setNickName(affiliate.getNameAgent());
2125 2125
             agentUser.setPhonenumber(affiliate.getContactTelphoneAgent());
2126 2126
             agentUser.setPassword(SecurityUtils.encryptPassword("abc123456"));
2127
-            agentUser.setDeptId(Long.valueOf(affiliate.getApplicationOrganId()));
2127
+            agentUser.setDeptId(Long.valueOf(affiliate.getApplicationId()));
2128 2128
             userMapper.insertUser(agentUser);
2129 2129
             userRoleMapper.insertUserRole(agentUser.getUserId(), roleId);
2130 2130
         } else if (null == agentUser.getDeptId() ) {
2131 2131
             // todo 未关联部门,关联部门
2132
-            agentUser.setDeptId(Long.valueOf(affiliate.getApplicationOrganId()));
2132
+            agentUser.setDeptId(Long.valueOf(affiliate.getApplicationId()));
2133 2133
             userMapper.updateUser(agentUser);
2134
-        }else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(affiliate.getApplicationOrganId())) {
2134
+        }else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(affiliate.getApplicationId())) {
2135 2135
             if (null != agentUser.getDept() && StrUtil.isNotEmpty(agentUser.getDept().getDeptName())) {
2136 2136
                 throw new ServiceException("该申请代理人已在【" + agentUser.getDept().getDeptName() + "】申请机构下存在,请检查填写信息是否正确");
2137 2137
             } else {
2138 2138
                 throw new ServiceException("该申请代理人已存在,与申请机构不匹配,请检查填写信息是否正确");
2139 2139
             }
2140
-        } else if (null != agentUser.getDeptId() && String.valueOf(agentUser.getDeptId()).equals(affiliate.getApplicationOrganId())) {
2140
+        } else if (null != agentUser.getDeptId() && String.valueOf(agentUser.getDeptId()).equals(affiliate.getApplicationId())) {
2141 2141
             // 同步用户表和案件关联人表的手机号和名称
2142 2142
             affiliate.setContactTelphoneAgent(StrUtil.isNotEmpty(agentUser.getPhonenumber()) ? agentUser.getPhonenumber() : affiliate.getContactTelphoneAgent());
2143 2143
             affiliate.setNameAgent(agentUser.getNickName());
@@ -2171,13 +2171,13 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
2171 2171
         Map<String, Long> deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId, (oldV, newV) -> newV));
2172 2172
 
2173 2173
         // 将组织机构id设为申请人名称
2174
-        if (deptMap.containsKey(affiliate.getApplicationOrganName())) {
2175
-            affiliate.setApplicationOrganId(String.valueOf(deptMap.get(affiliate.getApplicationOrganName())));
2174
+        if (deptMap.containsKey(affiliate.getApplicationName())) {
2175
+            affiliate.setApplicationId(String.valueOf(deptMap.get(affiliate.getApplicationName())));
2176 2176
         } else {
2177 2177
             // 如果不存在则新增
2178 2178
             SysDept dept = new SysDept();
2179 2179
             dept.setParentId(0L);
2180
-            dept.setDeptName(affiliate.getApplicationOrganName());
2180
+            dept.setDeptName(affiliate.getApplicationName());
2181 2181
             dept.setAncestors("0");
2182 2182
             dept.setOrderNum(1);
2183 2183
             dept.setStatus("0");
@@ -2186,7 +2186,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
2186 2186
             dept.setUpdateBy(getUsername());
2187 2187
             sysDeptMapper.insertDept(dept);
2188 2188
             deptMap.put(dept.getDeptName(), dept.getDeptId());
2189
-            affiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
2189
+            affiliate.setApplicationId(String.valueOf(dept.getDeptId()));
2190 2190
         }
2191 2191
     }
2192 2192
 

+ 2
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCasePaymentServiceImpl.java View File

@@ -218,7 +218,7 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
218 218
         }
219 219
         JSONObject jsonObject = new JSONObject();
220 220
         jsonObject.set("totalFee", totalFee);
221
-        jsonObject.set("applicationOrganName", affiliate.getApplicationOrganName());
221
+        jsonObject.set("applicationOrganName", affiliate.getApplicationName());
222 222
         return AjaxResult.success(jsonObject);
223 223
     }
224 224
 
@@ -242,7 +242,7 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
242 242
         result.setCaseStatusName(application.getCaseStatusName());
243 243
         MsCaseAffiliate affiliate = caseAffiliateMapper.selectByPrimaryKey(application.getId());
244 244
         if(affiliate != null) {
245
-            result.setApplicationOrganName(affiliate.getApplicationOrganName());
245
+            result.setApplicationOrganName(affiliate.getApplicationName());
246 246
         }
247 247
         // 查询缴费单
248 248
         result.setCaseAttachList(caseAttachMapper.listCaseAttachByCaseIdAndType(id, AnnexTypeEnum.PAYMENT_RECEIPT.getCode()));

+ 0
- 5
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/mscase/MsCaseApplicationMapper.xml View File

@@ -17,9 +17,7 @@
17 17
     <result column="fee_payable" jdbcType="DECIMAL" property="feePayable" />
18 18
     <result column="mediator_id" jdbcType="BIGINT" property="mediatorId" />
19 19
     <result column="mediator_name" jdbcType="VARCHAR" property="mediatorName" />
20
-    <result column="is_agree_pend_tral" jdbcType="INTEGER" property="isAgreePendTral" />
21 20
     <result column="pay_type" jdbcType="CHAR" property="payType" />
22
-    <result column="adjudica_counter" jdbcType="INTEGER" property="adjudicaCounter" />
23 21
     <result column="is_absence" jdbcType="INTEGER" property="isAbsence" />
24 22
     <result column="lock_status" jdbcType="INTEGER" property="lockStatus" />
25 23
     <result column="room_id" jdbcType="VARCHAR" property="roomId" />
@@ -32,10 +30,7 @@
32 30
     <result column="version" jdbcType="INTEGER" property="version" />
33 31
     <result column="arbitrat_claims" jdbcType="LONGVARCHAR" property="arbitratClaims" />
34 32
     <result column="facts" jdbcType="LONGVARCHAR" property="facts" />
35
-    <result column="request_rule" jdbcType="LONGVARCHAR" property="requestRule" />
36
-    <result column="case_describe" jdbcType="LONGVARCHAR" property="caseDescribe" />
37 33
     <result column="mediation_url" jdbcType="LONGVARCHAR" property="mediationUrl" />
38
-    <result column="adjudica_counter_reason" jdbcType="LONGVARCHAR" property="adjudicaCounterReason" />
39 34
     <result column="mediation_agreement" jdbcType="LONGVARCHAR" property="mediationAgreement" />
40 35
   </resultMap>
41 36
 

+ 0
- 33
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/template/FatchRuleMapper.xml View File

@@ -36,39 +36,6 @@
36 36
         </where>
37 37
     </select>
38 38
 
39
-    <select id="selectColumnandComment"  parameterType="com.ruoyi.wisdomarbitrate.domain.dto.template.FatchRule"  resultMap="BaseResultMap">
40
-        select
41
-            a.COLUMN_name as `column`,
42
-            a.COLumn_comment as column_name
43
-        from
44
-            information_schema.COLUMNS a
45
-        where
46
-            TABLE_schema =  #{databaseName}
47
-            and TABLE_name in('case_application','case_affiliate')
48
-            and COLUMN_NAME  not in('id','case_appli_id','case_num','case_subject_amount',
49
-        'register_date','arbitrat_method','case_status','hear_date','begin_video_date',
50
-        'online_video_person','create_time','update_by','update_time','create_by',
51
-        'arbitrator_id','arbitrator_name','pended_trial_arbitorid','pending_appoint_arbotrar',
52
-        'case_name','case_result','is_agree_pend_tral','objection_add_eviden','open_court_hear',
53
-        'paid_expenses','filearbitra_url','pay_type','adjudica_counter','proper_preser','objecti_juris',
54
-        'is_absence','respon_cross_opin','applica_cross_opin','respon_defen_opini','appli_is_absen',
55
-        'lock_status','room_id','import_flag','version','batch_number','template_id','applicant_agent_user_id','contract_number','identity_type','application_organ_id')
56
-
57
-    </select>
58
-
59
-    <select id="selectColumnbycomment"  parameterType="com.ruoyi.wisdomarbitrate.domain.dto.template.FatchRule"  resultMap="BaseResultMap">
60
-        select
61
-              COLUMN_NAME
62
-        from
63
-            information_schema.COLUMNS
64
-        where
65
-            TABLE_schema =  #{databaseName}
66
-            and TABLE_name in('case_application','case_affiliate')
67
-            and  COLumn_comment  = #{columnName}
68
-
69
-    </select>
70
-
71
-
72 39
     <select id="selectFatchRuleListIsDefault" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.template.FatchRule" resultMap="BaseResultMap">
73 40
         SELECT f.id ,f.file_name ,f.start_content ,f.end_content ,
74 41
         f.`column` ,f.is_default ,f.`column_name`