diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java index 125e3a4f..1daf2058 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java @@ -249,6 +249,8 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl() + count = dgComplianceInvestigationMapper.selectCount(new QueryWrapper() .eq("business_id", guaranteeAssignUser.getBusinessId()) .eq("role_id", PromptSuccess.FG_C_ID).eq("audit_status", StatusCode.SP_REJECT)); //查询贷审会驳回记录 - Integer count1 = dgLoanCommitteeConsiderMapper.selectCount(new QueryWrapper() + count1 = dgLoanCommitteeConsiderMapper.selectCount(new QueryWrapper() .eq("business_id", guaranteeAssignUser.getBusinessId()) .eq("role_id", PromptSuccess.DSH_ID).eq("status", 4)); if(count>0 || count1>0){//说明数据是C角或者贷审会驳回回来的 @@ -462,74 +464,80 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl().eq("business_id", guaranteeAssignUser.getBusinessId()) - .eq("type", 1).eq("status", StatusCode.SP_IN_REVIEW).eq("operating_status", StatusCode.CZ_PROCESSED)); - int b = this.baseMapper.selectCount(new QueryWrapper().eq("business_id", guaranteeAssignUser.getBusinessId()) - .eq("type", 2).eq("status", StatusCode.SP_IN_REVIEW).eq("operating_status", StatusCode.CZ_PROCESSED)); - int sum2 = a + b; - if (sum2 == 2) { - - //如果合规调查C角状态为驳回,并且操作状态为已处理,同时此条数据也是被驳回来的数据,则为合规调查驳回情况处理 - DgComplianceInvestigation investigation = dgComplianceInvestigationMapper.selectOne(new QueryWrapper() - .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.FG_C_ID)); - - //如果贷审会状态为驳回,并且操作状态为已处理,同时此条数据也是被驳回来的数据,则为贷审会驳回情况处理 - DgLoanCommitteeConsider consider = dgLoanCommitteeConsiderMapper.selectOne(new QueryWrapper() - .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.DSH_ID)); - - if ((investigation != null && investigation.getAuditStatus().equals(StatusCode.SP_IN_REVIEW) && investigation.getOperationStatus().equals(StatusCode.CZ_PROCESSED) - && guaranteeAssignUser.getStatus().equals(StatusCode.SP_IN_REVIEW)) || (investigation != null && investigation.getAuditStatus().equals(StatusCode.SP_REJECT) - && investigation.getOperationStatus().equals(StatusCode.CZ_PROCESSED) - && guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT))) {//合规调查驳回情况处理 - - //调查通过,修改法规经理操作状态为待处理,其他子业务为审核中 - if (investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)) {//如果调查通过 - DgComplianceInvestigation dgCompliance = new DgComplianceInvestigation(); - dgCompliance.setOperationStatus(StatusCode.CZ_ON_HAND);//待处理 - dgComplianceInvestigationMapper.update(dgCompliance, new QueryWrapper() - .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.FG_JL_ID)); - - DgComplianceInvestigation dgInvestigation = new DgComplianceInvestigation(); - dgInvestigation.setAuditStatus(StatusCode.SP_IN_REVIEW);//审核中 - dgComplianceInvestigationMapper.update(dgInvestigation, new QueryWrapper() - .eq("business_id", guaranteeAssignUser.getBusinessId())); - - //修改担保业务审批状态为已审核 - DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); - assignUser.setStatus(StatusCode.SP_REVIEWED);//已审核 - this.baseMapper.update(assignUser, new QueryWrapper() - .eq("business_id", guaranteeAssignUser.getBusinessId())); - } - } else if (consider != null && consider.getStatus().equals(StatusCode.SP_REJECT) && consider.getOperatingStatus().equals(StatusCode.CZ_PROCESSED) - && guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT)) {//贷审会业务流程驳回情况处理 - - //调查通过,修改贷审会操作状态为待处理,其他子业务为审核中 - if (investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)) {//如果调查通过 - DgLoanCommitteeConsider dgLoanCommittee = new DgLoanCommitteeConsider(); - dgLoanCommittee.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理 - dgLoanCommitteeConsiderMapper.update(dgLoanCommittee, new QueryWrapper() - .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.DSH_ID)); - - DgLoanCommitteeConsider dgConsider = new DgLoanCommitteeConsider(); - dgConsider.setStatus(StatusCode.SP_IN_REVIEW);//审核中 - dgLoanCommitteeConsiderMapper.update(dgConsider, new QueryWrapper() - .eq("business_id", guaranteeAssignUser.getBusinessId())); - - //修改担保业务审批状态为已审核 + //如果非合规调查和贷审会跨级驳回情况 +// if(count<1 && count1<1){ + //判断A角和B角是否都调查通过,如果都审核通过,修改担保部经理操作状态为待处理 + int a = this.baseMapper.selectCount(new QueryWrapper().eq("business_id", guaranteeAssignUser.getBusinessId()) + .eq("type", 1).eq("status", StatusCode.SP_IN_REVIEW).eq("operating_status", StatusCode.CZ_PROCESSED)); + int b = this.baseMapper.selectCount(new QueryWrapper().eq("business_id", guaranteeAssignUser.getBusinessId()) + .eq("type", 2).eq("status", StatusCode.SP_IN_REVIEW).eq("operating_status", StatusCode.CZ_PROCESSED)); + int sum2 = a + b; + if (sum2 == 2) { + + //如果合规调查C角状态为驳回,并且操作状态为已处理,同时此条数据也是被驳回来的数据,则为合规调查驳回情况处理 + DgComplianceInvestigation investigation = dgComplianceInvestigationMapper.selectOne(new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.FG_C_ID)); + + //如果贷审会状态为驳回,并且操作状态为已处理,同时此条数据也是被驳回来的数据,则为贷审会驳回情况处理 + DgLoanCommitteeConsider consider = dgLoanCommitteeConsiderMapper.selectOne(new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.DSH_ID)); + + if ((investigation != null && investigation.getAuditStatus().equals(StatusCode.SP_IN_REVIEW) && investigation.getOperationStatus().equals(StatusCode.CZ_PROCESSED) + && guaranteeAssignUser.getStatus().equals(StatusCode.SP_IN_REVIEW)) || (investigation != null && investigation.getAuditStatus().equals(StatusCode.SP_REJECT) + && investigation.getOperationStatus().equals(StatusCode.CZ_PROCESSED) + && guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT))) {//合规调查驳回情况处理 + + //调查通过,修改法规经理操作状态为待处理,其他子业务为审核中 + if (investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)) {//如果调查通过 + DgComplianceInvestigation dgCompliance = new DgComplianceInvestigation(); + dgCompliance.setOperationStatus(StatusCode.CZ_ON_HAND);//待处理 + dgComplianceInvestigationMapper.update(dgCompliance, new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.FG_JL_ID)); + + DgComplianceInvestigation dgInvestigation = new DgComplianceInvestigation(); + dgInvestigation.setAuditStatus(StatusCode.SP_IN_REVIEW);//审核中 + dgComplianceInvestigationMapper.update(dgInvestigation, new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId())); + + //修改担保业务审批状态为已审核 + DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); + assignUser.setStatus(StatusCode.SP_REVIEWED);//已审核 + this.baseMapper.update(assignUser, new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId())); + } + }else if (consider != null && consider.getStatus().equals(StatusCode.SP_IN_REVIEW) && consider.getOperatingStatus().equals(StatusCode.CZ_ON_HAND) + && guaranteeAssignUser.getStatus().equals(StatusCode.SP_IN_REVIEW) || (consider != null && consider.getStatus().equals(StatusCode.SP_REJECT) && consider.getOperatingStatus().equals(StatusCode.CZ_PROCESSED) + && guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT))) {//贷审会业务流程驳回情况处理 + /*else if (consider != null && consider.getStatus().equals(StatusCode.SP_REJECT) && consider.getOperatingStatus().equals(StatusCode.CZ_PROCESSED) + && guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT)) {//贷审会业务流程驳回情况处理*/ + + //调查通过,修改贷审会操作状态为待处理,其他子业务为审核中 + if (investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)) {//如果调查通过 + DgLoanCommitteeConsider dgLoanCommittee = new DgLoanCommitteeConsider(); + dgLoanCommittee.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理 + dgLoanCommitteeConsiderMapper.update(dgLoanCommittee, new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.DSH_ID)); + + DgLoanCommitteeConsider dgConsider = new DgLoanCommitteeConsider(); + dgConsider.setStatus(StatusCode.SP_IN_REVIEW);//审核中 + dgLoanCommitteeConsiderMapper.update(dgConsider, new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId())); + + //修改担保业务审批状态为已审核 + DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); + assignUser.setStatus(StatusCode.SP_REVIEWED);//已审核 + this.baseMapper.update(assignUser, new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId())); + } + } else {//正常情况处理 DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); - assignUser.setStatus(StatusCode.SP_REVIEWED);//已审核 - this.baseMapper.update(assignUser, new QueryWrapper() - .eq("business_id", guaranteeAssignUser.getBusinessId())); + assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理 + assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 + assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 + this.baseMapper.update(assignUser, new QueryWrapper().eq("business_id", guaranteeAssignUser.getBusinessId()) + .eq("type", 3)); } - } else {//正常情况处理 - DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); - assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理 - assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 - assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 - this.baseMapper.update(assignUser, new QueryWrapper().eq("business_id", guaranteeAssignUser.getBusinessId()) - .eq("type", 3)); - } +// } }