|
|
|
@ -67,7 +67,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
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; |
|
|
|
|
size = 10; |
|
|
|
|
} |
|
|
|
@ -108,6 +108,8 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit |
|
|
|
|
|| dgLoanCommitteeConsiderRequest.getFileUrls().length == 0) { |
|
|
|
|
ExceptionCast.cast(GuaranteeCode.LOAN_MESSAGE_NOT_NULL); |
|
|
|
|
} |
|
|
|
|
// 获取贷审会当前的审核状态
|
|
|
|
|
Integer auditStatus = this.getBaseMapper().getAuditStatus(dgLoanCommitteeConsiderRequest.getId()); |
|
|
|
|
// 将文件数组拼接为文件字符串形式
|
|
|
|
|
String fileUrl = dgComplianceInvestigationService.getFileUrl(dgLoanCommitteeConsiderRequest.getFileUrls()); |
|
|
|
|
DgLoanCommitteeConsiderConsent consent = new DgLoanCommitteeConsiderConsent(); |
|
|
|
@ -116,30 +118,27 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit |
|
|
|
|
consent.setAgreePerson(this.jointName(dgLoanCommitteeConsiderRequest.getAgreePersons())); |
|
|
|
|
consent.setDisagreePerson(this.jointName(dgLoanCommitteeConsiderRequest.getDisagreePersons())); |
|
|
|
|
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) { |
|
|
|
|
Integer auditStatus = this.getBaseMapper().getAuditStatus(dgLoanCommitteeConsiderRequest.getId()); |
|
|
|
|
Boolean result1; |
|
|
|
|
if (StatusCode.SP_REJECT.equals(auditStatus)) { |
|
|
|
|
// 当前贷审会的操作状态为驳回,表示为担保函驳回数据,先改变贷审会的审核状态为已审核
|
|
|
|
|
// 更新贷审会的审核状态为已审核
|
|
|
|
|
Boolean result2 = this.getBaseMapper().updateAuditStatusByBusinessId( |
|
|
|
|
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), |
|
|
|
|
StatusCode.SP_REVIEWED); |
|
|
|
|
if (result2) { |
|
|
|
|
// 再改变担保函的法规部经理的操作状态为待处理,审核状态为审核中
|
|
|
|
|
Boolean result1; |
|
|
|
|
if (StatusCode.SP_REJECT.equals(auditStatus)) { |
|
|
|
|
// 当前贷审会的操作状态为驳回,表示为担保函驳回数据,改变担保函的法规部经理的操作状态为待处理,审核状态为审核中
|
|
|
|
|
result1 = this.getBaseMapper().updateGuaranteeLetterAssignUser( |
|
|
|
|
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), |
|
|
|
|
PromptSuccess.FG_JL_ID, StatusCode.SP_IN_REVIEW, StatusCode.CZ_ON_HAND); |
|
|
|
|
} else { |
|
|
|
|
result1 = false; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
// 当前贷审会的操作状态部位驳回,表示不是担保函驳回数据,在担保函表中插入一条数据
|
|
|
|
|
// 当前贷审会的操作状态不为驳回,表示不是担保函驳回数据,在担保函表中插入一条数据
|
|
|
|
|
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) { |
|
|
|
@ -150,12 +149,17 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 拒绝
|
|
|
|
|
if (dgLoanCommitteeConsiderRequest.getStatus() == 3) { |
|
|
|
|
if (dgLoanCommitteeConsiderRequest.getRefuseOpinion() == null |
|
|
|
|
|| dgLoanCommitteeConsiderRequest.getRefuseOpinion().length() == 0) { |
|
|
|
|
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL); |
|
|
|
|
} |
|
|
|
|
// 绑定该条数据的userId,表示该用户操作了该条数据
|
|
|
|
|
Boolean result3 = this.getBaseMapper().updateLoanCommitteeConsiderUserIdById(dgLoanCommitteeConsiderRequest.getId(), |
|
|
|
|
Integer.parseInt(userId)); |
|
|
|
|
if (result3) { |
|
|
|
|
// 先改变所有的审核状态为已拒绝
|
|
|
|
|
Boolean result = this.getBaseMapper().updateAuditStatusByBusinessId( |
|
|
|
|
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), |
|
|
|
@ -178,6 +182,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 驳回
|
|
|
|
|
if (dgLoanCommitteeConsiderRequest.getStatus() == 2) { |
|
|
|
|
if (dgLoanCommitteeConsiderRequest.getRefuseOpinion() == null |
|
|
|
@ -242,6 +247,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit |
|
|
|
|
} |
|
|
|
|
DgLoanCommitteeConsider dgLoanCommitteeConsider = this.getBaseMapper().query(id); |
|
|
|
|
DgLoanCommitteeConsiderInfoResponse dgLoanCommitteeConsiderInfoResponse = new DgLoanCommitteeConsiderInfoResponse(); |
|
|
|
|
if (dgLoanCommitteeConsider != null) { |
|
|
|
|
// 文件数组
|
|
|
|
|
if (dgLoanCommitteeConsider.getFile() != null && dgLoanCommitteeConsider.getFile().length() != 0) { |
|
|
|
|
dgLoanCommitteeConsiderInfoResponse.setFileUrls(dgLoanCommitteeConsider.getFile().split(",")); |
|
|
|
@ -255,6 +261,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit |
|
|
|
|
dgLoanCommitteeConsiderInfoResponse.setDisagreePersons(dgLoanCommitteeConsider.getDisagreePerson().split(",")); |
|
|
|
|
} |
|
|
|
|
BeanUtils.copyProperties(dgLoanCommitteeConsider, dgLoanCommitteeConsiderInfoResponse); |
|
|
|
|
} |
|
|
|
|
return dgLoanCommitteeConsiderInfoResponse; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -263,7 +270,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
|
List<Integer> idList = new ArrayList<>(); |
|
|
|
|