18792927508 2 лет назад
Родитель
Сommit
c7988cbc00

+ 1
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationLogMapper.java Просмотреть файл

43
      */
43
      */
44
     void batchDeleteLog(@Param("ids") List<Long> ids);
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 Просмотреть файл

230
     public AjaxResult selectCompareCase(UpdateSubmitVO vo) {
230
     public AjaxResult selectCompareCase(UpdateSubmitVO vo) {
231
         // 查询当前版本号和上一个版本号的案件
231
         // 查询当前版本号和上一个版本号的案件
232
         CaseApplication afterCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
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
         beforeCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(beforeCase.getCaseLogId()));
235
         beforeCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(beforeCase.getCaseLogId()));
236
         afterCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
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
         CompareCaseVO compareCaseVO = new CompareCaseVO();
244
         CompareCaseVO compareCaseVO = new CompareCaseVO();
238
         compareCaseVO.setBeforeCase(beforeCase);
245
         compareCaseVO.setBeforeCase(beforeCase);
239
         compareCaseVO.setAfterCase(afterCase);
246
         compareCaseVO.setAfterCase(afterCase);
240
         // 对比两个版本修改的字段
247
         // 对比两个版本修改的字段
241
         String[] columns = {"caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
248
         String[] columns = {"caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
242
                 "claimPrinciOwed","arbitratClaims","properPreser","requestRule"};
249
                 "claimPrinciOwed","arbitratClaims","properPreser","requestRule"};
243
-        String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAdress","workTelphone","workAddress",
250
+        String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress",
244
                 "nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
251
                 "nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
245
         "compLegalperPost","responSex","responBirth"};
252
         "compLegalperPost","responSex","responBirth"};
246
         StringBuilder changeColumn = new StringBuilder();
253
         StringBuilder changeColumn = new StringBuilder();

+ 4
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Просмотреть файл

1107
                 if(CollectionUtil.isNotEmpty(caseAttachList)) {
1107
                 if(CollectionUtil.isNotEmpty(caseAttachList)) {
1108
                     // 插入日志附件表
1108
                     // 插入日志附件表
1109
                     for (CaseAttach caseAttach : caseAttachList) {
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 Просмотреть файл

153
         FROM case_application_log
153
         FROM case_application_log
154
         WHERE case_appli_id = #{caseAppliId} and update_submit_status IN ( 1, 4 )
154
         WHERE case_appli_id = #{caseAppliId} and update_submit_status IN ( 1, 4 )
155
     </select>
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
 </mapper>
165
 </mapper>

+ 13
- 13
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Просмотреть файл

335
                 SELECT
335
                 SELECT
336
                 l.case_appli_id id,
336
                 l.case_appli_id id,
337
                 l.id AS caseLogId,
337
                 l.id AS caseLogId,
338
-                l.case_num,
339
-                l.case_subject_amount,
338
+                c.case_num,
339
+                c.case_subject_amount,
340
                 c.register_date,
340
                 c.register_date,
341
                 c.arbitrat_method,
341
                 c.arbitrat_method,
342
                 CASE
342
                 CASE
389
                 '待修改开庭时间' ELSE '无案件状态'
389
                 '待修改开庭时间' ELSE '无案件状态'
390
                 END caseStatusName,
390
                 END caseStatusName,
391
                 c.hear_date,
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
                 c.begin_video_date,
399
                 c.begin_video_date,
400
                 c.online_video_person,
400
                 c.online_video_person,
401
-                l.contract_number,
402
-                l.create_by,
401
+                c.contract_number,
402
+                c.create_by,
403
                 c.create_time,
403
                 c.create_time,
404
-                l.update_by,
405
-                l.update_time,
404
+                c.update_by,
405
+                c.update_time,
406
                 c.arbitrator_name,
406
                 c.arbitrator_name,
407
                     ca.name,
407
                     ca.name,
408
                 ca.application_organ_id ,
408
                 ca.application_organ_id ,

+ 2
- 2
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachLogMapper.xml Просмотреть файл

34
     </select>
34
     </select>
35
 
35
 
36
     <select id="getCaseAttachByCaseIdAndType" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
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
         from case_attach_log
38
         from case_attach_log
39
         <where>
39
         <where>
40
             <if test="caseAppliLogId != null ">
40
             <if test="caseAppliLogId != null ">
47
     </select>
47
     </select>
48
 
48
 
49
     <select id="queryCaseAttachList" resultMap="CaseAttachResult">
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
         from case_attach_log
51
         from case_attach_log
52
         <where>
52
         <where>
53
             <if test="caseLogId != null ">
53
             <if test="caseLogId != null ">

+ 1
- 1
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml Просмотреть файл

69
         </where>
69
         </where>
70
     </select>
70
     </select>
71
     <select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
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
         from case_attach
73
         from case_attach
74
         <where>
74
         <where>
75
             <if test="annexId != null ">
75
             <if test="annexId != null ">