diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java index 718a832c..f98eb418 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java @@ -355,18 +355,30 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl() .eq("business_id",assetsInvestigation.getBusinessId()).eq("type",2)); }else if(approvalAssetsRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==2){//资产部经理审核通过 - //如果资产部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核 //根据主键id查询业务id DgAssetsInvestigation assetsInvestigation2 = this.getBaseMapper().selectById(approvalAssetsRequest.getId()); - DgAssetsInvestigation assets = new DgAssetsInvestigation(); - assets.setBusinessId(assetsInvestigation2.getBusinessId()); - assets.setCompanyId(assetsInvestigation2.getCompanyId()); - assets.setRoleId(PromptSuccess.ZC_LD_ID);//资产部分管领导 - assets.setType(3);//分管领导审核 - assets.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 - assets.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 - this.baseMapper.insert(assets); + //如果逐级驳回,且资产部经理审核通过,首先查看资产领导是否有数据,如果有数据,则修改不新增 + Integer count = this.baseMapper.selectCount(new QueryWrapper() + .eq("business_id", assetsInvestigation2.getBusinessId()).eq("type", 3)); + + if(count>0){//资产领导有数据,则直接修改领导状态 + DgAssetsInvestigation assignUser = new DgAssetsInvestigation(); + assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中 + assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理 + this.baseMapper.update(assignUser,new QueryWrapper() + .eq("business_id",assetsInvestigation2.getBusinessId()).eq("type",3)); + }else { + //如果资产部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核 + DgAssetsInvestigation assets = new DgAssetsInvestigation(); + assets.setBusinessId(assetsInvestigation2.getBusinessId()); + assets.setCompanyId(assetsInvestigation2.getCompanyId()); + assets.setRoleId(PromptSuccess.ZC_LD_ID);//资产部分管领导 + assets.setType(3);//分管领导审核 + assets.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 + assets.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 + this.baseMapper.insert(assets); + } }else if(approvalAssetsRequest.getStatus()==StatusCode.SP_REVIEWED && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==3) {//资产部分管领导审核通过 //如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据 //如果担保部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态 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 19dc9c6b..dd54dc77 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 @@ -208,7 +208,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl().eq("business_id", guaranteeAssignUser.getBusinessId()) @@ -233,7 +233,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl().eq("business_id", guaranteeAssignUser.getBusinessId())); dgEnclosureInfo.setOtherFile(dgEnclosureInfo1.getOtherFile());//其他附件 + dgEnclosureInfo.setCompanyCredit(dgEnclosureInfo1.getCompanyCredit());//企业信用报告 + dgEnclosureInfo.setCreditReport(dgEnclosureInfo1.getCreditReport()); + dgEnclosureInfo.setCertificateAuthorization(dgEnclosureInfo1.getCertificateAuthorization()); + dgEnclosureInfo.setTaxCertificate(dgEnclosureInfo1.getTaxCertificate()); + dgEnclosureInfo.setAssessmentReport(dgEnclosureInfo1.getAssessmentReport()); //根据业务id删除对应的附件信息 dgEnclosureInfoMapper.delete(new QueryWrapper().eq("business_id", guaranteeAssignUser.getBusinessId())); @@ -443,18 +448,30 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl() .eq("business_id", guaranteeUser.getBusinessId()).eq("type", 3)); } else if (approvalGuaranteeRequest.getStatus() == StatusCode.SP_IN_REVIEW && dgGuaranteeAssignUser.getOperatingStatus() == StatusCode.CZ_PROCESSED && guaranteeUser.getType() == 3) {//担保部经理审核通过 - //如果担保部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核 //根据主键id查询业务id DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(approvalGuaranteeRequest.getId()); - DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); - assignUser.setBusinessId(guaranteeAssignUser.getBusinessId()); - assignUser.setCompanyId(guaranteeAssignUser.getCompanyId()); - assignUser.setRoleId(PromptSuccess.DB_LD_ID);//担保部分管领导 - assignUser.setType(4);//分管领导审核 - assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 - assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 - this.baseMapper.insert(assignUser); + //如果逐级驳回,且担保部经理审核通过,首先查看担保领导是否有数据,如果有数据,则修改不新增 + Integer count = this.baseMapper.selectCount(new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 4)); + + if(count>0){//担保领导有数据,则直接修改领导状态 + DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); + 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",4)); + }else{ + //如果担保部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核 + DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); + assignUser.setBusinessId(guaranteeAssignUser.getBusinessId()); + assignUser.setCompanyId(guaranteeAssignUser.getCompanyId()); + assignUser.setRoleId(PromptSuccess.DB_LD_ID);//担保部分管领导 + assignUser.setType(4);//分管领导审核 + assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 + assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 + this.baseMapper.insert(assignUser); + } } else if (approvalGuaranteeRequest.getStatus() == StatusCode.SP_REVIEWED && dgGuaranteeAssignUser.getOperatingStatus() == StatusCode.CZ_PROCESSED && guaranteeUser.getType() == 4) {//担保部领导审核通过 //如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据 //如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态 diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java index 7342c2dd..53528e15 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java @@ -339,18 +339,30 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl() .eq("business_id",messageInvestigation.getBusinessId()).eq("type",2)); }else if(approvalMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==2){//信息部经理审核通过 - //如果信息部经理审核通过,则往信息部分管领导处加一条记录,由分管领导审核 //根据主键id查询业务id DgMessageInvestigation messageInvestigation2 = this.getBaseMapper().selectById(approvalMessageRequest.getId()); - DgMessageInvestigation message = new DgMessageInvestigation(); - message.setBusinessId(messageInvestigation2.getBusinessId()); - message.setCompanyId(messageInvestigation2.getCompanyId()); - message.setRoleId(PromptSuccess.XX_LD_ID);//担保部分管领导 - message.setType(3);//分管领导审核 - message.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 - message.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 - this.baseMapper.insert(message); + //如果逐级驳回,且资产部经理审核通过,首先查看资产领导是否有数据,如果有数据,则修改不新增 + Integer count = this.baseMapper.selectCount(new QueryWrapper() + .eq("business_id", messageInvestigation2.getBusinessId()).eq("type", 3)); + + if(count>0){//资产领导有数据,则直接修改领导状态 + DgMessageInvestigation assignUser = new DgMessageInvestigation(); + assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中 + assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理 + this.baseMapper.update(assignUser,new QueryWrapper() + .eq("business_id",messageInvestigation2.getBusinessId()).eq("type",3)); + }else { + //如果信息部经理审核通过,则往信息部分管领导处加一条记录,由分管领导审核 + DgMessageInvestigation message = new DgMessageInvestigation(); + message.setBusinessId(messageInvestigation2.getBusinessId()); + message.setCompanyId(messageInvestigation2.getCompanyId()); + message.setRoleId(PromptSuccess.XX_LD_ID);//担保部分管领导 + message.setType(3);//分管领导审核 + message.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 + message.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 + this.baseMapper.insert(message); + } }else if(approvalMessageRequest.getStatus()==StatusCode.SP_REVIEWED && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==3) {//信息部领导审核通过 //如果信息部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据 //如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态 diff --git a/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml b/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml index 74723a99..5667b1b7 100644 --- a/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml +++ b/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml @@ -605,7 +605,7 @@