案件修改
This commit is contained in:
+31
-3
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
|
|||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
import com.ruoyi.common.enums.UpdateSubmitStatus;
|
import com.ruoyi.common.enums.UpdateSubmitStatus;
|
||||||
import com.ruoyi.common.enums.YesOrNoEnum;
|
import com.ruoyi.common.enums.YesOrNoEnum;
|
||||||
import com.ruoyi.common.utils.ObjectFieldUtils;
|
import com.ruoyi.common.utils.ObjectFieldUtils;
|
||||||
@@ -23,6 +24,7 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
||||||
@@ -110,6 +112,8 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
|||||||
if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
|
if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
|
||||||
// 如果版本号为1,则直接返回
|
// 如果版本号为1,则直接返回
|
||||||
if(vo.getVersion() <= 1){
|
if(vo.getVersion() <= 1){
|
||||||
|
vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE.getCode());
|
||||||
|
caseApplicationLogMapper.updateStatus(vo);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
// 同意,查询日志记录表本版本数据,将数据更新到主表,并将日志表改版本的状态改为同意
|
// 同意,查询日志记录表本版本数据,将数据更新到主表,并将日志表改版本的状态改为同意
|
||||||
@@ -238,6 +242,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
|||||||
CaseAttach caseAttach = new CaseAttach();
|
CaseAttach caseAttach = new CaseAttach();
|
||||||
caseAttach.setCaseAppliLogId(beforeCase.getCaseLogId());
|
caseAttach.setCaseAppliLogId(beforeCase.getCaseLogId());
|
||||||
caseAttach.setAnnexType(2);
|
caseAttach.setAnnexType(2);
|
||||||
|
caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
|
||||||
beforeCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
|
beforeCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
|
||||||
caseAttach.setCaseAppliLogId(afterCase.getCaseLogId());
|
caseAttach.setCaseAppliLogId(afterCase.getCaseLogId());
|
||||||
afterCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
|
afterCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
|
||||||
@@ -251,6 +256,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
|||||||
"nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
|
"nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
|
||||||
"compLegalperPost","responSex","responBirth"};
|
"compLegalperPost","responSex","responBirth"};
|
||||||
StringBuilder changeColumn = new StringBuilder();
|
StringBuilder changeColumn = new StringBuilder();
|
||||||
|
// 对比基本字段
|
||||||
for (String column : columns) {
|
for (String column : columns) {
|
||||||
String beforeValue = ObjectFieldUtils.getValue(beforeCase, column);
|
String beforeValue = ObjectFieldUtils.getValue(beforeCase, column);
|
||||||
String afterValue = ObjectFieldUtils.getValue(afterCase, column);
|
String afterValue = ObjectFieldUtils.getValue(afterCase, column);
|
||||||
@@ -269,6 +275,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// 对比人员字段
|
||||||
List<CaseAffiliate> beforeCaseCaseAffiliates = beforeCase.getCaseAffiliates();
|
List<CaseAffiliate> beforeCaseCaseAffiliates = beforeCase.getCaseAffiliates();
|
||||||
List<CaseAffiliate> afterCaseCaseAffiliates = afterCase.getCaseAffiliates();
|
List<CaseAffiliate> afterCaseCaseAffiliates = afterCase.getCaseAffiliates();
|
||||||
Map<Integer, CaseAffiliate> beforeCaseCaseAffiliateMap = null;
|
Map<Integer, CaseAffiliate> beforeCaseCaseAffiliateMap = null;
|
||||||
@@ -285,8 +292,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
|||||||
affiliateChangeColumn.append(column).append(",");
|
affiliateChangeColumn.append(column).append(",");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} else if (beforeCaseCaseAffiliates == null && afterCaseCaseAffiliates != null) {
|
||||||
else if (beforeCaseCaseAffiliates == null && afterCaseCaseAffiliates != null) {
|
|
||||||
affiliateChangeColumn = new StringBuilder();
|
affiliateChangeColumn = new StringBuilder();
|
||||||
for (String column : affiliateColumns) {
|
for (String column : affiliateColumns) {
|
||||||
|
|
||||||
@@ -330,6 +336,28 @@ 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());
|
||||||
|
// 对比附件
|
||||||
|
if(notEmptyFlag || emptyFlag){
|
||||||
|
changeColumn.append("fileColumn");
|
||||||
|
}else if(CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList())){
|
||||||
|
if(beforeCase.getCaseAttachList().size()!=afterCase.getCaseAttachList().size()){
|
||||||
|
changeColumn.append("fileColumn");
|
||||||
|
}else {
|
||||||
|
Map<String, CaseAttach> afterAttachMap = afterCase.getCaseAttachList().stream().collect(Collectors.toMap(CaseAttach::getAnnexPath, Function.identity(), (n1, n2) -> n2));
|
||||||
|
|
||||||
|
|
||||||
|
for (CaseAttach beforeCaseAttach : beforeCase.getCaseAttachList()) {
|
||||||
|
if(!afterAttachMap.containsKey(beforeCaseAttach.getAnnexPath())) {
|
||||||
|
changeColumn.append("fileColumn");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
compareCaseVO.setChangeColumn(changeColumn.toString());
|
compareCaseVO.setChangeColumn(changeColumn.toString());
|
||||||
|
|
||||||
@@ -347,7 +375,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
|||||||
caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() );
|
caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() );
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() - 1);
|
caseApplicationLog = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion() );
|
||||||
}
|
}
|
||||||
if (caseApplicationLog == null) {
|
if (caseApplicationLog == null) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
+6
-19
@@ -1096,6 +1096,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
|
|
||||||
// 异步新增案件日志
|
// 异步新增案件日志
|
||||||
ThreadPoolUtil.execute(() -> {
|
ThreadPoolUtil.execute(() -> {
|
||||||
|
try {
|
||||||
caseApplication.setCaseAppliId(caseApplication.getId());
|
caseApplication.setCaseAppliId(caseApplication.getId());
|
||||||
int insertRow = caseApplicationLogMapper.insert(caseApplication);
|
int insertRow = caseApplicationLogMapper.insert(caseApplication);
|
||||||
if (insertRow != 0 ) {
|
if (insertRow != 0 ) {
|
||||||
@@ -1115,6 +1116,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return success();
|
return success();
|
||||||
@@ -2762,25 +2766,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
@Transactional
|
@Transactional
|
||||||
public List<ReservedConference> reserveConferenceList(Long caseId) {
|
public List<ReservedConference> reserveConferenceList(Long caseId) {
|
||||||
List<ReservedConference> reservedConferences = reservedConferenceMapper.selectListByCaseId(caseId);
|
List<ReservedConference> reservedConferences = reservedConferenceMapper.selectListByCaseId(caseId);
|
||||||
List<ReservedConference> result = new ArrayList<>();
|
|
||||||
// 判断当前时间是否大于结束时间,如果大于,则把该房间删掉
|
return reservedConferences;
|
||||||
if (CollectionUtil.isNotEmpty(reservedConferences)) {
|
|
||||||
List<Long> ids = new ArrayList<>();
|
|
||||||
for (ReservedConference reservedConference : reservedConferences) {
|
|
||||||
Date endTime = reservedConference.getScheduleEndTime();
|
|
||||||
Date now = new Date();
|
|
||||||
if (now.after(endTime)) {
|
|
||||||
ids.add(reservedConference.getId());
|
|
||||||
} else {
|
|
||||||
result.add(reservedConference);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (CollectionUtil.isNotEmpty(ids)) {
|
|
||||||
// 根据id批量删除
|
|
||||||
reservedConferenceMapper.batchDeleteByIds(ids);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -48,6 +48,7 @@
|
|||||||
<result property="lockStatus" column="lock_status" />
|
<result property="lockStatus" column="lock_status" />
|
||||||
<result property="version" column="version" />
|
<result property="version" column="version" />
|
||||||
<result property="updateSubmitStatus" column="update_submit_status" />
|
<result property="updateSubmitStatus" column="update_submit_status" />
|
||||||
|
<result property="properPreser" column="proper_preser" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<insert id="insert" parameterType="com.ruoyi.wisdomarbitrate.domain.CaseApplication" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insert" parameterType="com.ruoyi.wisdomarbitrate.domain.CaseApplication" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into case_application_log(
|
insert into case_application_log(
|
||||||
@@ -69,6 +70,7 @@
|
|||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
<if test="version != null ">version,</if>
|
<if test="version != null ">version,</if>
|
||||||
<if test="updateSubmitStatus != null ">update_submit_status,</if>
|
<if test="updateSubmitStatus != null ">update_submit_status,</if>
|
||||||
|
<if test="properPreser != null ">proper_preser,</if>
|
||||||
create_time
|
create_time
|
||||||
)values(
|
)values(
|
||||||
<if test="caseAppliId != null">#{caseAppliId},</if>
|
<if test="caseAppliId != null">#{caseAppliId},</if>
|
||||||
@@ -89,6 +91,7 @@
|
|||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
<if test="version != null ">#{version},</if>
|
<if test="version != null ">#{version},</if>
|
||||||
<if test="updateSubmitStatus != null ">#{updateSubmitStatus},</if>
|
<if test="updateSubmitStatus != null ">#{updateSubmitStatus},</if>
|
||||||
|
<if test="properPreser != null ">#{properPreser},</if>
|
||||||
sysdate()
|
sysdate()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
@@ -130,7 +133,7 @@
|
|||||||
<select id="selectByCaseIdAndVersion" resultMap="CaseApplicationResult">
|
<select id="selectByCaseIdAndVersion" 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,
|
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,
|
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
|
FROM case_application_log
|
||||||
WHERE case_appli_id = #{caseAppliId} and version=#{version}
|
WHERE case_appli_id = #{caseAppliId} and version=#{version}
|
||||||
</select>
|
</select>
|
||||||
@@ -138,7 +141,7 @@
|
|||||||
<select id="selectLatestCase" resultMap="CaseApplicationResult">
|
<select id="selectLatestCase" resultMap="CaseApplicationResult">
|
||||||
SELECT id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
|
SELECT 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,
|
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
|
FROM case_application_log
|
||||||
WHERE case_appli_id = #{caseAppliId} ORDER BY version DESC limit 1
|
WHERE case_appli_id = #{caseAppliId} ORDER BY version DESC limit 1
|
||||||
</select>
|
</select>
|
||||||
@@ -156,7 +159,7 @@
|
|||||||
<select id="selectBeforeCase" resultMap="CaseApplicationResult">
|
<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,
|
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,
|
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
|
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
|
WHERE case_appli_id = #{caseId} and version < #{version} and update_submit_status not in ( 4, 5 ) order by version desc limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Reference in New Issue
Block a user