From 0cef2791d6fd2faa979c7fa1d66374563e3bbf3d Mon Sep 17 00:00:00 2001 From: 18792927508 <1322446236@qq.com> Date: Thu, 23 Nov 2023 20:39:35 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=A1=88=E4=BB=B6=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wisdomarbitrate/domain/CaseAttach.java | 4 + .../mapper/CaseAffiliateMapper.java | 6 ++ .../mapper/CaseAttachLogMapper.java | 30 ++++++ .../mapper/CaseAttachMapper.java | 7 ++ .../impl/CaseApplicationLogServiceImpl.java | 42 +++++++- .../impl/CaseApplicationServiceImpl.java | 24 ++++- .../wisdomarbitrate/CaseAffiliateMapper.xml | 3 + .../wisdomarbitrate/CaseAttachLogMapper.xml | 101 ++++++++++++++++++ .../wisdomarbitrate/CaseAttachMapper.xml | 5 + 9 files changed, 215 insertions(+), 7 deletions(-) create mode 100644 ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachLogMapper.java create mode 100644 ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachLogMapper.xml diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java index c7d7541..9911399 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java @@ -18,6 +18,10 @@ public class CaseAttach { * 案件申请id */ private Long caseAppliId; + /** + * 案件记录id + */ + private Long caseAppliLogId; /** * 附件名称 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java index 28b9fd8..d934a3c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java @@ -35,4 +35,10 @@ public interface CaseAffiliateMapper { * @param affiliateLogList */ void updateCaseAffiliateByCaseId(@Param("caseAppliId")Long caseAppliId,@Param("list") List affiliateLogList); + + /** + * 根据案件id删除 + * @param caseId + */ + void deleteByCaseId(@Param("caseAppliId") Long caseId); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachLogMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachLogMapper.java new file mode 100644 index 0000000..9ea2b54 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachLogMapper.java @@ -0,0 +1,30 @@ +package com.ruoyi.wisdomarbitrate.mapper; + +import com.ruoyi.wisdomarbitrate.domain.CaseApplication; +import com.ruoyi.wisdomarbitrate.domain.CaseAttach; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface CaseAttachLogMapper { + int save(CaseAttach caseAttach); + + List queryAnnexPathByCaseId(Long id); + + List queryCaseAttachList(CaseApplication caseApplication); + + + int updateCaseAttach(CaseAttach caseAttach); + + int updateCaseAttachBycaseid(CaseAttach caseAttach); + + int deleteByFileIds(@Param("ids") List fileIds); + + List getCaseAttachByCaseIdAndType(CaseAttach caseAttach); + + CaseAttach queryAnnexById(Integer annexId); + + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java index f15d694..872f6db 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java @@ -25,4 +25,11 @@ public interface CaseAttachMapper { List getCaseAttachByCaseIdAndType(CaseAttach caseAttach); CaseAttach queryAnnexById(Integer annexId); + + /** + * 根据案件id和附件类型删除 + * @param caseAppliId + * @param annexType + */ + void deleteByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java index e94045b..fbf2cf8 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java @@ -9,6 +9,7 @@ import com.ruoyi.common.utils.ObjectFieldUtils; import com.ruoyi.common.utils.SmsUtils; import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate; import com.ruoyi.wisdomarbitrate.domain.CaseApplication; +import com.ruoyi.wisdomarbitrate.domain.CaseAttach; import com.ruoyi.wisdomarbitrate.domain.SmsSendRecord; import com.ruoyi.wisdomarbitrate.domain.vo.CompareCaseVO; import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO; @@ -42,6 +43,10 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService @Autowired private CaseAffiliateMapper caseAffiliateMapper; @Autowired + private CaseAttachMapper caseAttachMapper; + @Autowired + private CaseAttachLogMapper caseAttachLogMapper; + @Autowired private SmsRecordMapper smsRecordMapper; @Override public int insert(CaseApplication caseApplicationLog) { @@ -123,8 +128,24 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService // 更新相关人员主表 if(CollectionUtil.isNotEmpty(affiliateLogList)){ + caseAffiliateMapper.deleteByCaseId(vo.getCaseId()); for (CaseAffiliate caseAffiliate : affiliateLogList) { - caseAffiliateMapper.updataCaseAffiliate(caseAffiliate); + caseAffiliate.setCaseAppliId(vo.getCaseId()); + + } + caseAffiliateMapper.batchCaseAffiliate(affiliateLogList); + } + // // 根据caseLogId查询案件记录附件表 + CaseApplication caseApplication = new CaseApplication(); + caseApplication.setCaseLogId(caseApplicationLog.getCaseLogId()); + caseApplication.setAnnexType(2); + List attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication); + // 更新记录附件表 + if(CollectionUtil.isNotEmpty(attachLogList)){ + caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2); + for (CaseAttach caseAttach : attachLogList) { + caseAttach.setCaseAppliId(vo.getCaseId()); + caseAttachMapper.save(caseAttach); } } // caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList); @@ -330,13 +351,30 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService // 根据caseLogId查询相关人员表 List affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId()); + // 更新案件主表 caseApplicationMapper.updataCaseApplication(caseApplicationLog); // 更新相关人员主表 if(CollectionUtil.isNotEmpty(affiliateLogList)){ + caseAffiliateMapper.deleteByCaseId(vo.getCaseId()); for (CaseAffiliate caseAffiliate : affiliateLogList) { - caseAffiliateMapper.updataCaseAffiliate(caseAffiliate); + caseAffiliate.setCaseAppliId(vo.getCaseId()); + + } + caseAffiliateMapper.batchCaseAffiliate(affiliateLogList); + } + // // 根据caseLogId查询案件记录附件表 + CaseApplication caseApplication = new CaseApplication(); + caseApplication.setCaseLogId(caseApplicationLog.getCaseLogId()); + caseApplication.setAnnexType(2); + List attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication); + // 更新记录附件表 + if(CollectionUtil.isNotEmpty(attachLogList)){ + caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2); + for (CaseAttach caseAttach : attachLogList) { + caseAttach.setCaseAppliId(vo.getCaseId()); + caseAttachMapper.save(caseAttach); } } // caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList); diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java index 03f8bfd..f47b6d1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java @@ -116,6 +116,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService { private CaseApplicationLogMapper caseApplicationLogMapper; @Autowired private CaseAffiliateLogMapper caseAffiliateLogMapper; + @Autowired + private CaseAttachLogMapper caseAttachLogMapper; // 手机号正则 private static final Pattern TELEPHONE_REGX = Pattern.compile("^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$"); @@ -1072,7 +1074,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService { } List caseAttachList = caseApplication.getCaseAttachList(); - if (caseAttachList != null && caseAttachList.size() > 0) { + // 立案申请状态直接修改主表信息 + if (caseAttachList != null && caseAttachList.size() > 0 + && caseApplication.getCaseStatus()!=null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) { for (CaseAttach caseAttach : caseAttachList) { caseAttach.setCaseAppliId(caseApplication.getId()); caseAttachMapper.updateCaseAttach(caseAttach); @@ -1094,10 +1098,20 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService { ThreadPoolUtil.execute(() -> { caseApplication.setCaseAppliId(caseApplication.getId()); int insertRow = caseApplicationLogMapper.insert(caseApplication); - if (insertRow != 0 && CollectionUtil.isNotEmpty(caseAffiliates)) { - caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId())); - // 插入案件日志人员相关表 - caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates); + if (insertRow != 0 ) { + if( CollectionUtil.isNotEmpty(caseAffiliates)) { + caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId())); + // 插入案件日志人员相关表 + caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates); + } + if(CollectionUtil.isNotEmpty(caseAttachList)) { + // 插入日志附件表 + for (CaseAttach caseAttach : caseAttachList) { + caseAttach.setCaseAppliLogId(caseApplication.getId()); + caseAttachLogMapper.updateCaseAttach(caseAttach); + } + + } } }); diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml index 13e463a..6bed4f0 100644 --- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml @@ -150,6 +150,9 @@ #{item} + + delete from case_affiliate where case_appli_id = #{caseAppliId} + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachLogMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachLogMapper.xml new file mode 100644 index 0000000..668977f --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachLogMapper.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + INSERT INTO case_attach_log (case_appli_log_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status) + VALUES (#{caseAppliLogId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName},#{sealStatus}) + + + delete from case_attach_log + where annex_id in + + #{id} + + + + + + + + + + + + update case_attach_log + set + case_appli_log_id= #{caseAppliLogId} + where annex_id = #{annexId} + + + + update case_attach_log + + annex_name = #{annexName}, + annex_path = #{annexPath} + + + + AND case_appli_log_id = #{caseAppliLogId} + + + AND annex_type = #{annexType} + + + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml index 6901b84..631a11e 100644 --- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml @@ -25,6 +25,11 @@ #{id} + + delete from case_attach + where case_appli_id = #{caseAppliId} + and annex_type = #{annexType} + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml index d8fdb7a..f9123fd 100644 --- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml @@ -335,8 +335,8 @@ SELECT l.case_appli_id id, l.id AS caseLogId, - l.case_num, - l.case_subject_amount, + c.case_num, + c.case_subject_amount, c.register_date, c.arbitrat_method, CASE @@ -389,20 +389,20 @@ '待修改开庭时间' ELSE '无案件状态' END caseStatusName, c.hear_date, - l.arbitrat_claims, - l.loan_start_date, - l.loan_end_date, - l.claim_princi_owed, - l.claim_interest_owed, - l.claim_liquid_damag, - l.fee_payable, + c.arbitrat_claims, + c.loan_start_date, + c.loan_end_date, + c.claim_princi_owed, + c.claim_interest_owed, + c.claim_liquid_damag, + c.fee_payable, c.begin_video_date, c.online_video_person, - l.contract_number, - l.create_by, + c.contract_number, + c.create_by, c.create_time, - l.update_by, - l.update_time, + c.update_by, + c.update_time, c.arbitrator_name, ca.name, ca.application_organ_id , diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachLogMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachLogMapper.xml index 668977f..03a8f06 100644 --- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachLogMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachLogMapper.xml @@ -34,7 +34,7 @@ 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, loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number, - create_by,version,update_submit_status,create_time + create_by,version,update_submit_status,create_time,proper_preser FROM case_application_log WHERE case_appli_id = #{caseAppliId} and version=#{version} @@ -138,7 +141,7 @@ @@ -156,7 +159,7 @@ From c39cd5babd3dca9180254676f1a9391415629d9d Mon Sep 17 00:00:00 2001 From: 18792927508 <1322446236@qq.com> Date: Fri, 24 Nov 2023 19:22:32 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=A1=88=E4=BB=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wisdomarbitrate/domain/CaseAttach.java | 4 ++ .../domain/ReservedConference.java | 4 ++ .../mapper/CaseAttachMapper.java | 4 +- .../impl/CaseApplicationLogServiceImpl.java | 34 +++++++--- .../impl/CaseApplicationServiceImpl.java | 64 +++++++++++++++---- .../service/impl/CaseEvidenceServiceImpl.java | 10 ++- .../service/impl/VideoServiceImpl.java | 3 + .../wisdomarbitrate/CaseApplicationMapper.xml | 16 ++--- .../wisdomarbitrate/CaseAttachLogMapper.xml | 8 +-- .../wisdomarbitrate/CaseAttachMapper.xml | 7 +- 10 files changed, 116 insertions(+), 38 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java index 9911399..e39680a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java @@ -50,5 +50,9 @@ public class CaseAttach { * 印章状态(0未启用,1已启用) */ private Integer sealStatus; + /** + * 是否是证据上传,0-否,1-是 + */ + private Integer isBatchUpload; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/ReservedConference.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/ReservedConference.java index a759582..2e43d86 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/ReservedConference.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/ReservedConference.java @@ -39,6 +39,10 @@ public class ReservedConference { */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date scheduleEndTime; + /** + * 是否超过5分钟 + */ + private Boolean isBeforeFiveMinutes; public ReservedConference() { diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java index 872f6db..1b939b8 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java @@ -27,9 +27,9 @@ public interface CaseAttachMapper { CaseAttach queryAnnexById(Integer annexId); /** - * 根据案件id和附件类型删除 + * 根据案件id和附件类型删除和上传类型 * @param caseAppliId * @param annexType */ - void deleteByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType); + void deleteByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType,@Param("isBatchUpload") int isBatchUpload); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java index e6ca056..c121b54 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java @@ -146,10 +146,10 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService List attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication); // 更新记录附件表 if(CollectionUtil.isNotEmpty(attachLogList)){ - caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2); + // caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2,0); for (CaseAttach caseAttach : attachLogList) { caseAttach.setCaseAppliId(vo.getCaseId()); - caseAttachMapper.save(caseAttach); + caseAttachMapper.updateCaseAttach(caseAttach); } } // caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList); @@ -202,7 +202,6 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService return AjaxResult.success(); } - // todo 给申请人发送短信 SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest(); request.setTemplateId("1996949"); request.setPhone(caseAffiliate.getContactTelphone()); @@ -337,12 +336,12 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService } - boolean notEmptyFlag = CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isEmpty(beforeCase.getCaseAttachList()); - boolean emptyFlag = CollectionUtil.isEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList()); + boolean notEmptyFlag = CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isEmpty(afterCase.getCaseAttachList()); + boolean emptyFlag = CollectionUtil.isEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isNotEmpty(afterCase.getCaseAttachList()); // 对比附件 if(notEmptyFlag || emptyFlag){ changeColumn.append("fileColumn"); - }else if(CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList())){ + }else if(CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){ if(beforeCase.getCaseAttachList().size()!=afterCase.getCaseAttachList().size()){ changeColumn.append("fileColumn"); }else { @@ -360,6 +359,25 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService } compareCaseVO.setChangeColumn(changeColumn.toString()); + if(CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){ + List caseAttachList = afterCase.getCaseAttachList(); + for (CaseAttach attach : caseAttachList) { + String annexName = attach.getAnnexName(); + String prefix = "/profile"; + int startIndex = annexName.indexOf(prefix); + startIndex += prefix.length(); + String annexPath = "/uploadPath" + annexName.substring(startIndex); + attach.setAnnexPath(annexPath); + int startIndexnew = annexName.lastIndexOf("/"); + if (startIndexnew != -1) { + String annexNamenew = annexName.substring(startIndexnew + 1); + attach.setAnnexName(annexNamenew); + } + + + } + afterCase.setCaseAttachList(caseAttachList); + } return AjaxResult.success(compareCaseVO); } @@ -406,10 +424,10 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService List attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication); // 更新记录附件表 if(CollectionUtil.isNotEmpty(attachLogList)){ - caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2); + // caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2,0); for (CaseAttach caseAttach : attachLogList) { caseAttach.setCaseAppliId(vo.getCaseId()); - caseAttachMapper.save(caseAttach); + caseAttachMapper.updateCaseAttach(caseAttach); } } // caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList); diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java index f557086..8512ffd 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java @@ -969,7 +969,19 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService { if (insertRow != 0 && CollectionUtil.isNotEmpty(caseAffiliates)) { caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId())); // 插入案件日志人员相关表 - caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates); + if(CollectionUtil.isNotEmpty(caseAttachList)) { + List filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList()); + // 插入日志附件表 + if(CollectionUtil.isNotEmpty(filterList)) { + for (CaseAttach caseAttach : filterList) { + // 查询附件表 + CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId()); + attach.setCaseAppliLogId(caseApplication.getId()); + caseAttachLogMapper.save(attach); + } + } + + } caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates); } }); @@ -1077,11 +1089,22 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService { // 立案申请状态直接修改主表信息 if (caseAttachList != null && caseAttachList.size() > 0 && caseApplication.getCaseStatus()!=null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) { - for (CaseAttach caseAttach : caseAttachList) { - caseAttach.setCaseAppliId(caseApplication.getId()); - caseAttachMapper.updateCaseAttach(caseAttach); + List filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList()); + if(CollectionUtil.isNotEmpty(filterList)){ + // 先删除2的附件在新增 +// caseAttachMapper.deleteByCasedIdAndType(caseApplication.getId(),2,0); +// for (CaseAttach caseAttach : filterList) { +// caseAttach.setCaseAppliId(caseApplication.getId()); +// caseAttachMapper.save(caseAttach); +// } + + for (CaseAttach caseAttach : caseAttachList) { + caseAttach.setCaseAppliId(caseApplication.getId()); + caseAttachMapper.updateCaseAttach(caseAttach); + } } + } // 根据案件id查询最新版本号 Integer maxVersion = caseApplicationLogMapper.selectMaxVersionByCaseId(caseApplication.getId()); @@ -1106,13 +1129,16 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService { caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates); } if(CollectionUtil.isNotEmpty(caseAttachList)) { + List filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList()); // 插入日志附件表 - for (CaseAttach caseAttach : caseAttachList) { - // 查询附件表 - CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId()); - attach.setCaseAppliLogId(caseApplication.getId()); - caseAttachLogMapper.save(attach); - } + if(CollectionUtil.isNotEmpty(filterList)) { + for (CaseAttach caseAttach : filterList) { + // 查询附件表 + CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId()); + attach.setCaseAppliLogId(caseApplication.getId()); + caseAttachLogMapper.save(attach); + } + } } } @@ -2731,8 +2757,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService { public long createRoomId(Long caseId) { long roomId = generateRoomId(); // 新增预约会议表 -// ReservedConference conference = new ReservedConference(caseId, roomId, -// null, null,0); +// ReservedConference conference = new ReservedConference(caseId, SecurityUtils.getUserId(),roomId, +// null, null); // reservedConferenceMapper.insert(conference); // 绑定案件与房间号 caseApplicationMapper.bindCaseId(caseId, String.valueOf(roomId)); @@ -2766,6 +2792,19 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService { @Transactional public List reserveConferenceList(Long caseId) { List reservedConferences = reservedConferenceMapper.selectListByCaseId(caseId); + if(CollectionUtil.isNotEmpty(reservedConferences)){ + for (ReservedConference reservedConference : reservedConferences) { + Date startTime = reservedConference.getScheduleStartTime(); + if(null != startTime){ + long beforeMinutes = startTime.getTime() - 1000 * 60 * 5; + if(System.currentTimeMillis() 0 && annexType != null && annexType != 8) { diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/VideoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/VideoServiceImpl.java index 8d2ca25..c0485f7 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/VideoServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/VideoServiceImpl.java @@ -365,7 +365,9 @@ public class VideoServiceImpl implements VideoService { staticAndMksDir = Paths.get(absPath).toFile().toString(); long downloadFile = HttpUtil.downloadFile(fileUrl, staticAndMksDir); if(downloadFile>0) { + log.info("下载成功roomId"+roomId); Long caseId = caseApplicationMapper.selectCaseIdByRoomId(roomId); + log.info("下载成功caseId"+caseId); String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName); // 存入数据库 CaseAttach caseAttach = CaseAttach.builder().caseAppliId(caseId) @@ -374,6 +376,7 @@ public class VideoServiceImpl implements VideoService { .annexType(9) .build(); caseAttachMapper.save(caseAttach); + log.info("保存附件号成功"); return annexName; } } diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml index f9123fd..e09a148 100644 --- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml @@ -162,7 +162,7 @@ - select c.id ,l.id AS caseLogId,c.case_num ,l.case_subject_amount ,c.register_date ,c.arbitrat_method , + select c.id ,l.id AS caseLogId,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method , CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理' ELSE '无审理方式' END arbitratMethodName, @@ -176,10 +176,10 @@ when 31 then '待修改开庭时间' ELSE '无案件状态' END caseStatusName, - c.hear_date ,l.arbitrat_claims , - l.loan_start_date ,l.loan_end_date ,l.claim_princi_owed ,l.claim_interest_owed ,l.claim_liquid_damag - ,l.fee_payable , - c.begin_video_date ,c.online_video_person ,l.contract_number ,c.create_by ,c.create_time , + c.hear_date ,c.arbitrat_claims , + c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag + ,c.fee_payable , + c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time , c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name as applicantName, @@ -1468,9 +1468,9 @@ update case_application set lock_status=#{lockStatus} where id = #{id} - + update case_application set room_id=#{roomId} where id = #{caseId} - update case_application set room_id= CONCAT(room_id,',',#{roomId}) where id =#{caseId} + update case_application set version = #{version} where id = #{id} @@ -1585,7 +1585,7 @@ order by c.create_time desc limit 1 - select annex_id,case_appli_log_id,annex_name,annex_path,annex_type,note,use_id,use_account + select * from case_attach_log where case_appli_log_id =#{id} @@ -65,7 +65,7 @@ From b34aa2092eebe5a39a76e407ccb2084fc3434bf5 Mon Sep 17 00:00:00 2001 From: 18792927508 <1322446236@qq.com> Date: Sat, 25 Nov 2023 11:03:51 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=A1=88=E4=BB=B6=E8=B4=A8=E8=AF=81?= =?UTF-8?q?=E5=8A=A0=E5=8F=8D=E4=BB=B2=E8=A3=81=E5=8E=9F=E5=9B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/CaseApplication.java | 12 ++++++ .../domain/ReservedConference.java | 4 ++ .../domain/dto/CaseEvidenceDTO.java | 4 ++ .../impl/CaseApplicationServiceImpl.java | 37 +++++++++++++------ .../service/impl/CaseEvidenceServiceImpl.java | 1 + .../wisdomarbitrate/CaseApplicationMapper.xml | 1 + 6 files changed, 48 insertions(+), 11 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java index 924418c..1b1f923 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java @@ -166,6 +166,10 @@ public class CaseApplication extends BaseEntity { /** 是否仲裁反请求 */ private Integer adjudicaCounter; + /** + * 仲裁反请求原因 + */ + private String adjudicaCounterReason; /** 被申请人是否缺席 */ private Integer isAbsence; @@ -178,6 +182,14 @@ public class CaseApplication extends BaseEntity { /** 申请人是否缺席 */ private Integer appliIsAbsen; + public String getAdjudicaCounterReason() { + return adjudicaCounterReason; + } + + public void setAdjudicaCounterReason(String adjudicaCounterReason) { + this.adjudicaCounterReason = adjudicaCounterReason; + } + public Integer getAppliIsAbsen() { return appliIsAbsen; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/ReservedConference.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/ReservedConference.java index 2e43d86..fad99e3 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/ReservedConference.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/ReservedConference.java @@ -21,6 +21,10 @@ public class ReservedConference { * 用户id */ private Long userId; + /** + * 用户名 + */ + private String userName; /** * 案件id */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CaseEvidenceDTO.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CaseEvidenceDTO.java index bd65a9a..2a9caa3 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CaseEvidenceDTO.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CaseEvidenceDTO.java @@ -31,6 +31,10 @@ public class CaseEvidenceDTO { private Integer pendingAppointArbotrar; /** 是否仲裁反请求 */ private Integer adjudicaCounter; + /** + * 仲裁反请求原因 + */ + private String adjudicaCounterReason; /** 是否管辖异议申请 */ private Integer objectiJuris; diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java index 8512ffd..1964b54 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java @@ -2792,19 +2792,34 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService { @Transactional public List reserveConferenceList(Long caseId) { List reservedConferences = reservedConferenceMapper.selectListByCaseId(caseId); - if(CollectionUtil.isNotEmpty(reservedConferences)){ - for (ReservedConference reservedConference : reservedConferences) { - Date startTime = reservedConference.getScheduleStartTime(); - if(null != startTime){ - long beforeMinutes = startTime.getTime() - 1000 * 60 * 5; - if(System.currentTimeMillis() userIdMap = null; + List userIds = reservedConferences.stream().map(ReservedConference::getUserId).collect(Collectors.toList()); + if(CollectionUtil.isNotEmpty(userIds)){ + // 根据userids查询用户名 + List userList = sysUserMapper.selectUserListByIds(userIds); + if(CollectionUtil.isNotEmpty(userList)){ + userIdMap = userList.stream().collect(Collectors.toMap(SysUser::getUserId,SysUser::getUserName)); } } + for (ReservedConference reservedConference : reservedConferences) { + if(null!=reservedConference.getUserId() && null!=userIdMap){ + reservedConference.setUserName(userIdMap.get(reservedConference.getUserId())); + } + Date startTime = reservedConference.getScheduleStartTime(); + if (null == startTime) { + continue; + } + long beforeMinutes = startTime.getTime() - 1000 * 60 * 5; + if (System.currentTimeMillis() < beforeMinutes) { + reservedConference.setIsBeforeFiveMinutes(true); + } else { + reservedConference.setIsBeforeFiveMinutes(false); + } + } + return reservedConferences; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java index 70569cb..09ea6f9 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java @@ -200,6 +200,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService { caseApplication.setId(caseEvidenceDTO.getCaseId()); CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication); if (caseApplication1 != null) { + caseApplication1.setAdjudicaCounterReason(caseEvidenceDTO.getAdjudicaCounterReason()); int caseStatus = caseApplication1.getCaseStatus(); caseApplication1.setObjectionAddEviden(caseEvidenceDTO.getObjectionAddEviden()); //默认书面审理 diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml index e09a148..f55c4ec 100644 --- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml @@ -1455,6 +1455,7 @@ open_court_hear = #{openCourtHear}, hear_date = #{hearDate}, filearbitra_url = #{filearbitraUrl}, + adjudica_counter_reason = #{adjudicaCounterReason}, where id = #{id}