|
|
@ -235,7 +235,58 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss |
|
|
|
dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id
|
|
|
|
dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id
|
|
|
|
dgGuaranteeAssignUser.setApplyContent(investigateGuaranteeRequest.getApplyContent());//审核意见
|
|
|
|
dgGuaranteeAssignUser.setApplyContent(investigateGuaranteeRequest.getApplyContent());//审核意见
|
|
|
|
|
|
|
|
|
|
|
|
if(investigateGuaranteeRequest.getIsSaveOrCommit() != null && investigateGuaranteeRequest.getIsSaveOrCommit()==1){//提交
|
|
|
|
//查询合规调查C角驳回记录
|
|
|
|
|
|
|
|
Integer count = dgComplianceInvestigationMapper.selectCount(new QueryWrapper<DgComplianceInvestigation>() |
|
|
|
|
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId()) |
|
|
|
|
|
|
|
.eq("role_id", PromptSuccess.FG_C_ID).eq("audit_status", StatusCode.SP_REJECT)); |
|
|
|
|
|
|
|
//查询贷审会驳回记录
|
|
|
|
|
|
|
|
Integer count1 = dgLoanCommitteeConsiderMapper.selectCount(new QueryWrapper<DgLoanCommitteeConsider>() |
|
|
|
|
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId()) |
|
|
|
|
|
|
|
.eq("role_id", PromptSuccess.DSH_ID).eq("status", 4)); |
|
|
|
|
|
|
|
if(count>0 || count1>0){//说明数据是C角或者贷审会驳回回来的
|
|
|
|
|
|
|
|
//AB角调查,修改审核意见以及状态
|
|
|
|
|
|
|
|
DgGuaranteeAssignUser dgGuaranteeAssignUser2 = new DgGuaranteeAssignUser(); |
|
|
|
|
|
|
|
dgGuaranteeAssignUser2.setId(investigateGuaranteeRequest.getId());//主键id
|
|
|
|
|
|
|
|
dgGuaranteeAssignUser2.setStatus(investigateGuaranteeRequest.getStatus());//状态为驳回(只有A,B角同时同意,状态才改为审核中)
|
|
|
|
|
|
|
|
dgGuaranteeAssignUser2.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
|
|
|
|
|
|
|
|
dgGuaranteeAssignUser2.setApplyContent(investigateGuaranteeRequest.getApplyContent());//审核意见
|
|
|
|
|
|
|
|
this.baseMapper.updateById(dgGuaranteeAssignUser2); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int i = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId()) |
|
|
|
|
|
|
|
.eq("type", 1).eq("status", StatusCode.SP_IN_REVIEW).eq("operating_status", StatusCode.CZ_PROCESSED)); |
|
|
|
|
|
|
|
int n = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId()) |
|
|
|
|
|
|
|
.eq("type", 2).eq("status", StatusCode.SP_IN_REVIEW).eq("operating_status", StatusCode.CZ_PROCESSED)); |
|
|
|
|
|
|
|
int sum = i + n; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(count>0){//C角跨级驳回
|
|
|
|
|
|
|
|
//判断AB角是否都调查通过,如果通过,则将合规调查所有业务审批状态改为审核中,法规经理操作状态为待处理
|
|
|
|
|
|
|
|
if (sum == 2) { |
|
|
|
|
|
|
|
DgComplianceInvestigation user = new DgComplianceInvestigation(); |
|
|
|
|
|
|
|
user.setAuditStatus(StatusCode.SP_IN_REVIEW);//审核中
|
|
|
|
|
|
|
|
dgComplianceInvestigationMapper.update(user, new QueryWrapper<DgComplianceInvestigation>() |
|
|
|
|
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
user.setOperationStatus(StatusCode.CZ_ON_HAND);//操作状态:待处理
|
|
|
|
|
|
|
|
dgComplianceInvestigationMapper.update(user, new QueryWrapper<DgComplianceInvestigation>() |
|
|
|
|
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId()) |
|
|
|
|
|
|
|
.eq("role_id",PromptSuccess.FG_JL_ID)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(count1>0){//贷审会跨级驳回
|
|
|
|
|
|
|
|
//判断AB角是否都调查通过,如果通过,则将贷审会所有业务审批状态改为审核中,贷审会操作状态为待处理
|
|
|
|
|
|
|
|
if (sum == 2) { |
|
|
|
|
|
|
|
DgLoanCommitteeConsider user = new DgLoanCommitteeConsider(); |
|
|
|
|
|
|
|
user.setStatus(StatusCode.SP_IN_REVIEW);//审核中
|
|
|
|
|
|
|
|
dgLoanCommitteeConsiderMapper.update(user, new QueryWrapper<DgLoanCommitteeConsider>() |
|
|
|
|
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
user.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态:待处理
|
|
|
|
|
|
|
|
dgLoanCommitteeConsiderMapper.update(user, new QueryWrapper<DgLoanCommitteeConsider>() |
|
|
|
|
|
|
|
.eq("business_id", guaranteeAssignUser.getBusinessId()) |
|
|
|
|
|
|
|
.eq("role_id",PromptSuccess.DSH_ID)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else if(investigateGuaranteeRequest.getIsSaveOrCommit() != null && investigateGuaranteeRequest.getIsSaveOrCommit()==1){//提交
|
|
|
|
//AB角调查,修改审核意见以及状态
|
|
|
|
//AB角调查,修改审核意见以及状态
|
|
|
|
dgGuaranteeAssignUser.setStatus(investigateGuaranteeRequest.getStatus());//状态为审核中
|
|
|
|
dgGuaranteeAssignUser.setStatus(investigateGuaranteeRequest.getStatus());//状态为审核中
|
|
|
|
dgGuaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
|
|
|
|
dgGuaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
|
|
|
@ -539,7 +590,10 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss |
|
|
|
otherRemark = ""; |
|
|
|
otherRemark = ""; |
|
|
|
} |
|
|
|
} |
|
|
|
String reason = remark+otherRemark; |
|
|
|
String reason = remark+otherRemark; |
|
|
|
String loanMoney = approvalGuaranteeRequest.getAmount().toString();//金额
|
|
|
|
String loanMoney = String.valueOf(approvalGuaranteeRequest.getAmount());//金额
|
|
|
|
|
|
|
|
if(loanMoney == null){ |
|
|
|
|
|
|
|
loanMoney = ""; |
|
|
|
|
|
|
|
} |
|
|
|
String loanTerm = approvalGuaranteeRequest.getTerm();//期限
|
|
|
|
String loanTerm = approvalGuaranteeRequest.getTerm();//期限
|
|
|
|
//同时往审核流程进程表新增一条记录
|
|
|
|
//同时往审核流程进程表新增一条记录
|
|
|
|
String account = dgApplyAmountInfoController.getAccount(); |
|
|
|
String account = dgApplyAmountInfoController.getAccount(); |
|
|
|