|
|
@ -67,7 +67,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public PageUtils list(Integer page, Integer size, String codeOrName) { |
|
|
|
public PageUtils list(Integer page, Integer size, String codeOrName) { |
|
|
|
if (page == null || size == null) { |
|
|
|
if (page == null || size == null || page < 1 || size < 1) { |
|
|
|
page = 1; |
|
|
|
page = 1; |
|
|
|
size = 10; |
|
|
|
size = 10; |
|
|
|
} |
|
|
|
} |
|
|
@ -108,6 +108,8 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit |
|
|
|
|| dgLoanCommitteeConsiderRequest.getFileUrls().length == 0) { |
|
|
|
|| dgLoanCommitteeConsiderRequest.getFileUrls().length == 0) { |
|
|
|
ExceptionCast.cast(GuaranteeCode.LOAN_MESSAGE_NOT_NULL); |
|
|
|
ExceptionCast.cast(GuaranteeCode.LOAN_MESSAGE_NOT_NULL); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 获取贷审会当前的审核状态
|
|
|
|
|
|
|
|
Integer auditStatus = this.getBaseMapper().getAuditStatus(dgLoanCommitteeConsiderRequest.getId()); |
|
|
|
// 将文件数组拼接为文件字符串形式
|
|
|
|
// 将文件数组拼接为文件字符串形式
|
|
|
|
String fileUrl = dgComplianceInvestigationService.getFileUrl(dgLoanCommitteeConsiderRequest.getFileUrls()); |
|
|
|
String fileUrl = dgComplianceInvestigationService.getFileUrl(dgLoanCommitteeConsiderRequest.getFileUrls()); |
|
|
|
DgLoanCommitteeConsiderConsent consent = new DgLoanCommitteeConsiderConsent(); |
|
|
|
DgLoanCommitteeConsiderConsent consent = new DgLoanCommitteeConsiderConsent(); |
|
|
@ -116,37 +118,35 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit |
|
|
|
consent.setAgreePerson(this.jointName(dgLoanCommitteeConsiderRequest.getAgreePersons())); |
|
|
|
consent.setAgreePerson(this.jointName(dgLoanCommitteeConsiderRequest.getAgreePersons())); |
|
|
|
consent.setDisagreePerson(this.jointName(dgLoanCommitteeConsiderRequest.getDisagreePersons())); |
|
|
|
consent.setDisagreePerson(this.jointName(dgLoanCommitteeConsiderRequest.getDisagreePersons())); |
|
|
|
consent.setFileUrl(fileUrl); |
|
|
|
consent.setFileUrl(fileUrl); |
|
|
|
Boolean result = this.getBaseMapper().check(consent, Integer.getInteger(userId), StatusCode.SP_REVIEWED, StatusCode.CZ_PROCESSED, new Date()); |
|
|
|
Boolean result = this.getBaseMapper().check(consent, Integer.parseInt(userId), StatusCode.SP_REVIEWED, StatusCode.CZ_PROCESSED, new Date()); |
|
|
|
if (result) { |
|
|
|
if (result) { |
|
|
|
Integer auditStatus = this.getBaseMapper().getAuditStatus(dgLoanCommitteeConsiderRequest.getId()); |
|
|
|
// 更新贷审会的审核状态为已审核
|
|
|
|
Boolean result1; |
|
|
|
Boolean result2 = this.getBaseMapper().updateAuditStatusByBusinessId( |
|
|
|
if (StatusCode.SP_REJECT.equals(auditStatus)) { |
|
|
|
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), |
|
|
|
// 当前贷审会的操作状态为驳回,表示为担保函驳回数据,先改变贷审会的审核状态为已审核
|
|
|
|
StatusCode.SP_REVIEWED); |
|
|
|
Boolean result2 = this.getBaseMapper().updateAuditStatusByBusinessId( |
|
|
|
if (result2) { |
|
|
|
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), |
|
|
|
Boolean result1; |
|
|
|
StatusCode.SP_REVIEWED); |
|
|
|
if (StatusCode.SP_REJECT.equals(auditStatus)) { |
|
|
|
if (result2) { |
|
|
|
// 当前贷审会的操作状态为驳回,表示为担保函驳回数据,改变担保函的法规部经理的操作状态为待处理,审核状态为审核中
|
|
|
|
// 再改变担保函的法规部经理的操作状态为待处理,审核状态为审核中
|
|
|
|
|
|
|
|
result1 = this.getBaseMapper().updateGuaranteeLetterAssignUser( |
|
|
|
result1 = this.getBaseMapper().updateGuaranteeLetterAssignUser( |
|
|
|
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), |
|
|
|
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), |
|
|
|
PromptSuccess.FG_JL_ID, StatusCode.SP_IN_REVIEW, StatusCode.CZ_ON_HAND); |
|
|
|
PromptSuccess.FG_JL_ID, StatusCode.SP_IN_REVIEW, StatusCode.CZ_ON_HAND); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
result1 = false; |
|
|
|
// 当前贷审会的操作状态不为驳回,表示不是担保函驳回数据,在担保函表中插入一条数据
|
|
|
|
|
|
|
|
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = new DgGuaranteeLetterAssignUser(); |
|
|
|
|
|
|
|
guaranteeLetterAssignUser.setBusinessId(this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()) |
|
|
|
|
|
|
|
.getBusinessId()); |
|
|
|
|
|
|
|
guaranteeLetterAssignUser.setUserId(this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()) |
|
|
|
|
|
|
|
.getCompanyId()); |
|
|
|
|
|
|
|
System.out.println(guaranteeLetterAssignUser); |
|
|
|
|
|
|
|
result1 = guaranteeLetterAssignUserService.saveGuaranteeLetter(guaranteeLetterAssignUser); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (result1) { |
|
|
|
|
|
|
|
// 在业务流程表中插入一条审议成功的数据
|
|
|
|
|
|
|
|
return AuditProcessUtil.save(this.getBaseMapper().getDgLoanCommitteeConsider( |
|
|
|
|
|
|
|
dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
|
|
|
|
PromptSuccess.DSH_NAME, null, PromptSuccess.DSH_PROCESS_ID); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
// 当前贷审会的操作状态部位驳回,表示不是担保函驳回数据,在担保函表中插入一条数据
|
|
|
|
|
|
|
|
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = new DgGuaranteeLetterAssignUser(); |
|
|
|
|
|
|
|
guaranteeLetterAssignUser.setBusinessId(this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()) |
|
|
|
|
|
|
|
.getBusinessId()); |
|
|
|
|
|
|
|
guaranteeLetterAssignUser.setUserId(this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()) |
|
|
|
|
|
|
|
.getCompanyId()); |
|
|
|
|
|
|
|
result1 = guaranteeLetterAssignUserService.saveGuaranteeLetter(guaranteeLetterAssignUser); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (result1) { |
|
|
|
|
|
|
|
// 在业务流程表中插入一条审议成功的数据
|
|
|
|
|
|
|
|
return AuditProcessUtil.save(this.getBaseMapper().getDgLoanCommitteeConsider( |
|
|
|
|
|
|
|
dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
|
|
|
|
PromptSuccess.DSH_NAME, null, PromptSuccess.DSH_PROCESS_ID); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -156,24 +156,29 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit |
|
|
|
|| dgLoanCommitteeConsiderRequest.getRefuseOpinion().length() == 0) { |
|
|
|
|| dgLoanCommitteeConsiderRequest.getRefuseOpinion().length() == 0) { |
|
|
|
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL); |
|
|
|
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL); |
|
|
|
} |
|
|
|
} |
|
|
|
// 先改变所有的审核状态为已拒绝
|
|
|
|
// 绑定该条数据的userId,表示该用户操作了该条数据
|
|
|
|
Boolean result = this.getBaseMapper().updateAuditStatusByBusinessId( |
|
|
|
Boolean result3 = this.getBaseMapper().updateLoanCommitteeConsiderUserIdById(dgLoanCommitteeConsiderRequest.getId(), |
|
|
|
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), |
|
|
|
Integer.parseInt(userId)); |
|
|
|
StatusCode.SP_REFUSE); |
|
|
|
if (result3) { |
|
|
|
if (result) { |
|
|
|
// 先改变所有的审核状态为已拒绝
|
|
|
|
// 再改变自己当前的操作状态为已处理
|
|
|
|
Boolean result = this.getBaseMapper().updateAuditStatusByBusinessId( |
|
|
|
Boolean result1 = this.getBaseMapper().updateOperationStatusById(dgLoanCommitteeConsiderRequest.getId(), |
|
|
|
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), |
|
|
|
StatusCode.CZ_PROCESSED, dgLoanCommitteeConsiderRequest.getRefuseOpinion()); |
|
|
|
StatusCode.SP_REFUSE); |
|
|
|
if (result1) { |
|
|
|
if (result) { |
|
|
|
// 最后改变该条贷款信息的业务状态为已否决
|
|
|
|
// 再改变自己当前的操作状态为已处理
|
|
|
|
Boolean result2 = dgComplianceInvestigationMapper.updateBusinessStatusByBusinessId( |
|
|
|
Boolean result1 = this.getBaseMapper().updateOperationStatusById(dgLoanCommitteeConsiderRequest.getId(), |
|
|
|
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), |
|
|
|
StatusCode.CZ_PROCESSED, dgLoanCommitteeConsiderRequest.getRefuseOpinion()); |
|
|
|
StatusCode.YW_REJECTED); |
|
|
|
if (result1) { |
|
|
|
if (result2) { |
|
|
|
// 最后改变该条贷款信息的业务状态为已否决
|
|
|
|
// 在业务流程表中插入一条拒绝数据(记得带上拒绝意见)
|
|
|
|
Boolean result2 = dgComplianceInvestigationMapper.updateBusinessStatusByBusinessId( |
|
|
|
return AuditProcessUtil.save(this.getBaseMapper().getDgLoanCommitteeConsider( |
|
|
|
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), |
|
|
|
dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
StatusCode.YW_REJECTED); |
|
|
|
PromptSuccess.DSH_NAME, dgLoanCommitteeConsiderRequest.getRefuseOpinion(), PromptSuccess.DSH_PROCESS_ID); |
|
|
|
if (result2) { |
|
|
|
|
|
|
|
// 在业务流程表中插入一条拒绝数据(记得带上拒绝意见)
|
|
|
|
|
|
|
|
return AuditProcessUtil.save(this.getBaseMapper().getDgLoanCommitteeConsider( |
|
|
|
|
|
|
|
dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
|
|
|
|
PromptSuccess.DSH_NAME, dgLoanCommitteeConsiderRequest.getRefuseOpinion(), PromptSuccess.DSH_PROCESS_ID); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -242,19 +247,21 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit |
|
|
|
} |
|
|
|
} |
|
|
|
DgLoanCommitteeConsider dgLoanCommitteeConsider = this.getBaseMapper().query(id); |
|
|
|
DgLoanCommitteeConsider dgLoanCommitteeConsider = this.getBaseMapper().query(id); |
|
|
|
DgLoanCommitteeConsiderInfoResponse dgLoanCommitteeConsiderInfoResponse = new DgLoanCommitteeConsiderInfoResponse(); |
|
|
|
DgLoanCommitteeConsiderInfoResponse dgLoanCommitteeConsiderInfoResponse = new DgLoanCommitteeConsiderInfoResponse(); |
|
|
|
// 文件数组
|
|
|
|
if (dgLoanCommitteeConsider != null) { |
|
|
|
if (dgLoanCommitteeConsider.getFile() != null && dgLoanCommitteeConsider.getFile().length() != 0) { |
|
|
|
// 文件数组
|
|
|
|
dgLoanCommitteeConsiderInfoResponse.setFileUrls(dgLoanCommitteeConsider.getFile().split(",")); |
|
|
|
if (dgLoanCommitteeConsider.getFile() != null && dgLoanCommitteeConsider.getFile().length() != 0) { |
|
|
|
} |
|
|
|
dgLoanCommitteeConsiderInfoResponse.setFileUrls(dgLoanCommitteeConsider.getFile().split(",")); |
|
|
|
// 同意名单数组
|
|
|
|
} |
|
|
|
if (dgLoanCommitteeConsider.getAgreePerson() != null && dgLoanCommitteeConsider.getAgreePerson().length() != 0) { |
|
|
|
// 同意名单数组
|
|
|
|
dgLoanCommitteeConsiderInfoResponse.setAgreePersons(dgLoanCommitteeConsider.getAgreePerson().split(",")); |
|
|
|
if (dgLoanCommitteeConsider.getAgreePerson() != null && dgLoanCommitteeConsider.getAgreePerson().length() != 0) { |
|
|
|
} |
|
|
|
dgLoanCommitteeConsiderInfoResponse.setAgreePersons(dgLoanCommitteeConsider.getAgreePerson().split(",")); |
|
|
|
// 不同意名单数组
|
|
|
|
} |
|
|
|
if (dgLoanCommitteeConsider.getDisagreePerson() != null && dgLoanCommitteeConsider.getDisagreePerson().length() != 0) { |
|
|
|
// 不同意名单数组
|
|
|
|
dgLoanCommitteeConsiderInfoResponse.setDisagreePersons(dgLoanCommitteeConsider.getDisagreePerson().split(",")); |
|
|
|
if (dgLoanCommitteeConsider.getDisagreePerson() != null && dgLoanCommitteeConsider.getDisagreePerson().length() != 0) { |
|
|
|
|
|
|
|
dgLoanCommitteeConsiderInfoResponse.setDisagreePersons(dgLoanCommitteeConsider.getDisagreePerson().split(",")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BeanUtils.copyProperties(dgLoanCommitteeConsider, dgLoanCommitteeConsiderInfoResponse); |
|
|
|
} |
|
|
|
} |
|
|
|
BeanUtils.copyProperties(dgLoanCommitteeConsider, dgLoanCommitteeConsiderInfoResponse); |
|
|
|
|
|
|
|
return dgLoanCommitteeConsiderInfoResponse; |
|
|
|
return dgLoanCommitteeConsiderInfoResponse; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -263,7 +270,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Boolean excelExport(HttpServletResponse response, List<String> ids) { |
|
|
|
public Boolean excelExport(HttpServletResponse response, List<String> ids) { |
|
|
|
if (null == ids || ids.size() == 0){ |
|
|
|
if (null == ids || ids.size() == 0) { |
|
|
|
ExceptionCast.cast(GuaranteeCode.EXCEL_ID_NOT_NULL); |
|
|
|
ExceptionCast.cast(GuaranteeCode.EXCEL_ID_NOT_NULL); |
|
|
|
} |
|
|
|
} |
|
|
|
List<Integer> idList = new ArrayList<>(); |
|
|
|
List<Integer> idList = new ArrayList<>(); |
|
|
|