案件对比
This commit is contained in:
+1
@@ -43,4 +43,5 @@ public interface CaseApplicationLogMapper {
|
||||
*/
|
||||
void batchDeleteLog(@Param("ids") List<Long> ids);
|
||||
|
||||
CaseApplication selectBeforeCase(@Param("caseId") Long caseId, @Param("version")Integer version);
|
||||
}
|
||||
|
||||
+9
-2
@@ -230,17 +230,24 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
public AjaxResult selectCompareCase(UpdateSubmitVO vo) {
|
||||
// 查询当前版本号和上一个版本号的案件
|
||||
CaseApplication afterCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
|
||||
CaseApplication beforeCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() - 1);
|
||||
CaseApplication beforeCase = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion());
|
||||
// 查询案件关联人员
|
||||
beforeCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(beforeCase.getCaseLogId()));
|
||||
afterCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
|
||||
// 查询附件
|
||||
CaseAttach caseAttach = new CaseAttach();
|
||||
caseAttach.setCaseAppliLogId(beforeCase.getCaseLogId());
|
||||
caseAttach.setAnnexType(2);
|
||||
beforeCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
|
||||
caseAttach.setCaseAppliLogId(afterCase.getCaseLogId());
|
||||
afterCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
|
||||
CompareCaseVO compareCaseVO = new CompareCaseVO();
|
||||
compareCaseVO.setBeforeCase(beforeCase);
|
||||
compareCaseVO.setAfterCase(afterCase);
|
||||
// 对比两个版本修改的字段
|
||||
String[] columns = {"caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
|
||||
"claimPrinciOwed","arbitratClaims","properPreser","requestRule"};
|
||||
String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAdress","workTelphone","workAddress",
|
||||
String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress",
|
||||
"nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
|
||||
"compLegalperPost","responSex","responBirth"};
|
||||
StringBuilder changeColumn = new StringBuilder();
|
||||
|
||||
+4
-2
@@ -1107,8 +1107,10 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
if(CollectionUtil.isNotEmpty(caseAttachList)) {
|
||||
// 插入日志附件表
|
||||
for (CaseAttach caseAttach : caseAttachList) {
|
||||
caseAttach.setCaseAppliLogId(caseApplication.getId());
|
||||
caseAttachLogMapper.updateCaseAttach(caseAttach);
|
||||
// 查询附件表
|
||||
CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
|
||||
attach.setCaseAppliLogId(caseApplication.getId());
|
||||
caseAttachLogMapper.save(attach);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -153,6 +153,13 @@
|
||||
FROM case_application_log
|
||||
WHERE case_appli_id = #{caseAppliId} and update_submit_status IN ( 1, 4 )
|
||||
</select>
|
||||
<select id="selectBeforeCase" resultMap="CaseApplicationResult">
|
||||
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
|
||||
FROM case_application_log
|
||||
WHERE case_appli_id = #{caseId} and version < #{version} and update_submit_status not in ( 4, 5 ) order by version desc limit 1
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -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 ,
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getCaseAttachByCaseIdAndType" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
||||
select annex_id,case_appli_log_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
||||
select *
|
||||
from case_attach_log
|
||||
<where>
|
||||
<if test="caseAppliLogId != null ">
|
||||
@@ -47,7 +47,7 @@
|
||||
</select>
|
||||
|
||||
<select id="queryCaseAttachList" resultMap="CaseAttachResult">
|
||||
select annex_id,case_appli_log_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
||||
select *
|
||||
from case_attach_log
|
||||
<where>
|
||||
<if test="caseLogId != null ">
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
</where>
|
||||
</select>
|
||||
<select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
||||
select annex_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
||||
select *
|
||||
from case_attach
|
||||
<where>
|
||||
<if test="annexId != null ">
|
||||
|
||||
Reference in New Issue
Block a user