Bladeren bron

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

wangqiong123 2 jaren geleden
bovenliggende
commit
3c424b60a4

+ 1
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationLogMapper.java Bestand weergeven

@@ -43,4 +43,5 @@ public interface CaseApplicationLogMapper {
43 43
      */
44 44
     void batchDeleteLog(@Param("ids") List<Long> ids);
45 45
 
46
+    CaseApplication selectBeforeCase(@Param("caseId") Long caseId, @Param("version")Integer version);
46 47
 }

+ 9
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java Bestand weergeven

@@ -230,17 +230,24 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
230 230
     public AjaxResult selectCompareCase(UpdateSubmitVO vo) {
231 231
         // 查询当前版本号和上一个版本号的案件
232 232
         CaseApplication afterCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
233
-        CaseApplication beforeCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() - 1);
233
+        CaseApplication beforeCase = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion());
234 234
         // 查询案件关联人员
235 235
         beforeCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(beforeCase.getCaseLogId()));
236 236
         afterCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
237
+        // 查询附件
238
+        CaseAttach caseAttach = new CaseAttach();
239
+        caseAttach.setCaseAppliLogId(beforeCase.getCaseLogId());
240
+        caseAttach.setAnnexType(2);
241
+        beforeCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
242
+        caseAttach.setCaseAppliLogId(afterCase.getCaseLogId());
243
+        afterCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
237 244
         CompareCaseVO compareCaseVO = new CompareCaseVO();
238 245
         compareCaseVO.setBeforeCase(beforeCase);
239 246
         compareCaseVO.setAfterCase(afterCase);
240 247
         // 对比两个版本修改的字段
241 248
         String[] columns = {"caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
242 249
                 "claimPrinciOwed","arbitratClaims","properPreser","requestRule"};
243
-        String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAdress","workTelphone","workAddress",
250
+        String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress",
244 251
                 "nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
245 252
         "compLegalperPost","responSex","responBirth"};
246 253
         StringBuilder changeColumn = new StringBuilder();

+ 4
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Bestand weergeven

@@ -1107,8 +1107,10 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1107 1107
                 if(CollectionUtil.isNotEmpty(caseAttachList)) {
1108 1108
                     // 插入日志附件表
1109 1109
                     for (CaseAttach caseAttach : caseAttachList) {
1110
-                        caseAttach.setCaseAppliLogId(caseApplication.getId());
1111
-                        caseAttachLogMapper.updateCaseAttach(caseAttach);
1110
+                        // 查询附件表
1111
+                        CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
1112
+                        attach.setCaseAppliLogId(caseApplication.getId());
1113
+                        caseAttachLogMapper.save(attach);
1112 1114
                     }
1113 1115
 
1114 1116
                 }

+ 7
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationLogMapper.xml Bestand weergeven

@@ -153,6 +153,13 @@
153 153
         FROM case_application_log
154 154
         WHERE case_appli_id = #{caseAppliId} and update_submit_status IN ( 1, 4 )
155 155
     </select>
156
+    <select id="selectBeforeCase" resultMap="CaseApplicationResult">
157
+        SELECT case_appli_id id,id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
158
+               loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
159
+               create_by,version,update_submit_status,create_time
160
+        FROM case_application_log
161
+        WHERE case_appli_id = #{caseId} and version &lt; #{version} and update_submit_status not in ( 4, 5 ) order by version desc limit 1
162
+    </select>
156 163
 
157 164
 
158 165
 </mapper>

+ 13
- 13
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Bestand weergeven

@@ -335,8 +335,8 @@
335 335
                 SELECT
336 336
                 l.case_appli_id id,
337 337
                 l.id AS caseLogId,
338
-                l.case_num,
339
-                l.case_subject_amount,
338
+                c.case_num,
339
+                c.case_subject_amount,
340 340
                 c.register_date,
341 341
                 c.arbitrat_method,
342 342
                 CASE
@@ -389,20 +389,20 @@
389 389
                 '待修改开庭时间' ELSE '无案件状态'
390 390
                 END caseStatusName,
391 391
                 c.hear_date,
392
-                l.arbitrat_claims,
393
-                l.loan_start_date,
394
-                l.loan_end_date,
395
-                l.claim_princi_owed,
396
-                l.claim_interest_owed,
397
-                l.claim_liquid_damag,
398
-                l.fee_payable,
392
+                c.arbitrat_claims,
393
+                c.loan_start_date,
394
+                c.loan_end_date,
395
+                c.claim_princi_owed,
396
+                c.claim_interest_owed,
397
+                c.claim_liquid_damag,
398
+                c.fee_payable,
399 399
                 c.begin_video_date,
400 400
                 c.online_video_person,
401
-                l.contract_number,
402
-                l.create_by,
401
+                c.contract_number,
402
+                c.create_by,
403 403
                 c.create_time,
404
-                l.update_by,
405
-                l.update_time,
404
+                c.update_by,
405
+                c.update_time,
406 406
                 c.arbitrator_name,
407 407
                     ca.name,
408 408
                 ca.application_organ_id ,

+ 2
- 2
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachLogMapper.xml Bestand weergeven

@@ -34,7 +34,7 @@
34 34
     </select>
35 35
 
36 36
     <select id="getCaseAttachByCaseIdAndType" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
37
-        select annex_id,case_appli_log_id,annex_name,annex_path,annex_type,note,use_id,use_account
37
+        select *
38 38
         from case_attach_log
39 39
         <where>
40 40
             <if test="caseAppliLogId != null ">
@@ -47,7 +47,7 @@
47 47
     </select>
48 48
 
49 49
     <select id="queryCaseAttachList" resultMap="CaseAttachResult">
50
-        select annex_id,case_appli_log_id,annex_name,annex_path,annex_type,note,use_id,use_account
50
+        select *
51 51
         from case_attach_log
52 52
         <where>
53 53
             <if test="caseLogId != null ">

+ 1
- 1
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml Bestand weergeven

@@ -69,7 +69,7 @@
69 69
         </where>
70 70
     </select>
71 71
     <select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
72
-        select annex_id,annex_name,annex_path,annex_type,note,use_id,use_account
72
+        select *
73 73
         from case_attach
74 74
         <where>
75 75
             <if test="annexId != null ">