From dd6f6d1e8e1e07ad39d8f5baa2831169d49a1b97 Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Tue, 15 Dec 2020 20:02:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...gGuaranteeLetterAssignUserServiceImpl.java | 108 ++++++++++++++---- .../service/impl/DgLoanNoticeServiceImpl.java | 12 +- ...aymentConfirmationConsiderServiceImpl.java | 45 +++++++- 3 files changed, 134 insertions(+), 31 deletions(-) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java index cccafc85..3d554f11 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java @@ -156,7 +156,6 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //更新a角 //根据业务id查询A用户数据 @@ -222,7 +220,18 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl guaranteeLetterAssignUserQueryWrapperZc = new QueryWrapper<>(); + guaranteeLetterAssignUserQueryWrapperZc.eq("business_id",businessId).eq("role_id",PromptSuccess.ZC_JL_ID); + DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserZc = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperZc); + dgGuaranteeLetterAssignUserZc.setStatus(StatusCode.SP_IN_REVIEW); + dgGuaranteeLetterAssignUserZc.setOperatingStatus(StatusCode.CZ_ON_HAND); + //清空上次的审批意见 + dgGuaranteeLetterAssignUserZc.setAuditOpinion(""); + int update = baseMapper.updateById(dgGuaranteeLetterAssignUserZc); //更新成功,返回操作结果 log.info(update > 0 ? "驳回后法规部经理成功生成担保函" : "驳回后法规部经理生成担保函失败"); return update > 0; @@ -277,7 +286,6 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ + //更新法规部经理数据 + //根据业务id查询法规部经理数据 + QueryWrapper guaranteeLetterAssignUserQueryWrapperFg = new QueryWrapper<>(); + guaranteeLetterAssignUserQueryWrapperFg.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID); + DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserFg = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperFg); + dgGuaranteeLetterAssignUserFg.setStatus(StatusCode.SP_REVIEWED); + baseMapper.updateById(dgGuaranteeLetterAssignUserFg); + + //更新a角 + //根据业务id查询A用户数据 + QueryWrapper guaranteeLetterAssignUserQueryWrapperA = new QueryWrapper<>(); + guaranteeLetterAssignUserQueryWrapperA.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID); + DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserA = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperA); + dgGuaranteeLetterAssignUserA.setStatus(StatusCode.SP_REVIEWED); + baseMapper.updateById(dgGuaranteeLetterAssignUserA); + + //更新b角 + //根据业务id查询B用户数据 + QueryWrapper guaranteeLetterAssignUserQueryWrapperB = new QueryWrapper<>(); + guaranteeLetterAssignUserQueryWrapperB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID); + DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserB = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperB); + dgGuaranteeLetterAssignUserB.setStatus(StatusCode.SP_REVIEWED); + baseMapper.updateById(dgGuaranteeLetterAssignUserB); + //添加财务部经理的回款数据 DgPaymentConfirmationConsider paymentConfirmationConsider = new DgPaymentConfirmationConsider(); paymentConfirmationConsider.setRoleId(PromptSuccess.CWB_ID); @@ -317,8 +349,32 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ + //更新法规部经理数据 + //根据业务id查询法规部经理数据 + QueryWrapper guaranteeLetterAssignUserQueryWrapperFg = new QueryWrapper<>(); + guaranteeLetterAssignUserQueryWrapperFg.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID); + DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserFg = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperFg); + dgGuaranteeLetterAssignUserFg.setStatus(StatusCode.SP_REVIEWED); + baseMapper.updateById(dgGuaranteeLetterAssignUserFg); + + //更新a角 + //根据业务id查询A用户数据 + QueryWrapper guaranteeLetterAssignUserQueryWrapperA = new QueryWrapper<>(); + guaranteeLetterAssignUserQueryWrapperA.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID); + DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserA = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperA); + dgGuaranteeLetterAssignUserA.setStatus(StatusCode.SP_REVIEWED); + baseMapper.updateById(dgGuaranteeLetterAssignUserA); + + //更新b角 + //根据业务id查询B用户数据 + QueryWrapper guaranteeLetterAssignUserQueryWrapperB = new QueryWrapper<>(); + guaranteeLetterAssignUserQueryWrapperB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID); + DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserB = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperB); + dgGuaranteeLetterAssignUserB.setStatus(StatusCode.SP_REVIEWED); + baseMapper.updateById(dgGuaranteeLetterAssignUserB); + //更新财务部经理的回款数据 QueryWrapper paymentConfirmationConsiderQueryWrapper = new QueryWrapper<>(); paymentConfirmationConsiderQueryWrapper.eq("business_id",businessId).eq("role_id",PromptSuccess.CWB_ID); @@ -335,7 +391,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); @@ -353,6 +409,14 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ + //更新法规部经理数据 + //根据业务id查询法规部经理数据 + QueryWrapper guaranteeLetterAssignUserQueryWrapperFg = new QueryWrapper<>(); + guaranteeLetterAssignUserQueryWrapperFg.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID); + DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserFg = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperFg); + dgGuaranteeLetterAssignUserFg.setStatus(StatusCode.SP_REJECT); + baseMapper.updateById(dgGuaranteeLetterAssignUserFg); + //根据业务id查询A角数据 QueryWrapper guaranteeLetterAssignUserQueryWrapperA = new QueryWrapper<>(); guaranteeLetterAssignUserQueryWrapperA.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID); @@ -396,7 +460,6 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ QueryWrapper tempB = new QueryWrapper<>(); - //查询b用户的审核状态 - tempB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID).select("status"); + //查询b用户的操作状态 + tempB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID).select("operating_status"); DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUser = baseMapper.selectOne(tempB); - Integer bStatus = dgGuaranteeLetterAssignUser.getStatus(); + Integer bStatus = dgGuaranteeLetterAssignUser.getOperatingStatus(); //b用户审核通过,添加资产部经理数据 - if (StatusCode.SP_REVIEWED.equals(bStatus)){ + if (StatusCode.CZ_PROCESSED.equals(bStatus)){ DgGuaranteeLetterAssignUser ZCJLGuaranteeLetterAssign = new DgGuaranteeLetterAssignUser(); ZCJLGuaranteeLetterAssign.setBusinessId(businessId); ZCJLGuaranteeLetterAssign.setCompanyId(companyId); @@ -449,11 +512,11 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ QueryWrapper tempB = new QueryWrapper<>(); //查询b用户的审核状态 - tempB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID).select("status"); + tempB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID).select("operating_status"); DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUser = baseMapper.selectOne(tempB); - Integer bStatus = dgGuaranteeLetterAssignUser.getStatus(); + Integer bStatus = dgGuaranteeLetterAssignUser.getOperatingStatus(); //b用户审核通过,更新资产部经理数据 - if (StatusCode.SP_REVIEWED.equals(bStatus)){ + if (StatusCode.CZ_PROCESSED.equals(bStatus)){ QueryWrapper queryZCJLUser = new QueryWrapper<>(); queryZCJLUser.eq("business_id",businessId).eq("role_id",PromptSuccess.ZC_JL_ID); DgGuaranteeLetterAssignUser letterAssignUserZCJL = baseMapper.selectOne(queryZCJLUser); @@ -527,7 +590,6 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ QueryWrapper tempB = new QueryWrapper<>(); //查询a用户的审核状态 - tempB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID).select("status"); + tempB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID).select("operating_status"); DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUser = baseMapper.selectOne(tempB); - Integer aStatus = dgGuaranteeLetterAssignUser.getStatus(); + Integer aStatus = dgGuaranteeLetterAssignUser.getOperatingStatus(); //a用户审核通过,添加资产部经理数据 - if (StatusCode.SP_REVIEWED.equals(aStatus)){ + if (StatusCode.CZ_PROCESSED.equals(aStatus)){ DgGuaranteeLetterAssignUser ZCJLGuaranteeLetterAssign = new DgGuaranteeLetterAssignUser(); ZCJLGuaranteeLetterAssign.setBusinessId(businessId); ZCJLGuaranteeLetterAssign.setCompanyId(companyId); @@ -581,11 +643,11 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ QueryWrapper tempB = new QueryWrapper<>(); //查询a用户的审核状态 - tempB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID).select("status"); + tempB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID).select("operating_status"); DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUser = baseMapper.selectOne(tempB); - Integer aStatus = dgGuaranteeLetterAssignUser.getStatus(); + Integer aStatus = dgGuaranteeLetterAssignUser.getOperatingStatus(); //a用户审核通过,更新资产部经理数据 - if (StatusCode.SP_REVIEWED.equals(aStatus)){ + if (StatusCode.CZ_PROCESSED.equals(aStatus)){ QueryWrapper queryZCJLUser = new QueryWrapper<>(); queryZCJLUser.eq("business_id",businessId).eq("role_id",PromptSuccess.ZC_JL_ID); DgGuaranteeLetterAssignUser letterAssignUserZCJL = baseMapper.selectOne(queryZCJLUser); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java index f45edb7c..de8d3074 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java @@ -130,7 +130,7 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl loanNoticeQueryWrapper = new QueryWrapper<>(); loanNoticeQueryWrapper.eq("business_id",businessId).eq("role_id", PromptSuccess.FG_JL_ID); @@ -143,7 +143,7 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl 0){ QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("business_id",businessId).eq("role_id", PromptSuccess.FG_JL_ID); @@ -151,7 +151,13 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl queryWrapperCWB = new QueryWrapper<>(); + queryWrapperCWB.eq("business_id",businessId).eq("role_id", PromptSuccess.CWB_ID); + DgPaymentConfirmationConsider paymentConfirmationConsiderCWB = paymentConfirmationConsiderMapper.selectOne(queryWrapperCWB); + paymentConfirmationConsiderCWB.setStatus(StatusCode.SP_REJECT); + int updateById = paymentConfirmationConsiderMapper.updateById(paymentConfirmationConsiderCWB); //更新成功,返回操作结果 log.info(updateById > 0 ? "驳回更新财务部经理成功" : "驳回更新财务部经理失败"); return updateById > 0; diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java index 8c3c5a16..4477d338 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java @@ -137,7 +137,6 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ + //更新法规部经理数据 + //根据业务id查询法规部经理数据 + QueryWrapper guaranteeLetterAssignUserQueryWrapperFg = new QueryWrapper<>(); + guaranteeLetterAssignUserQueryWrapperFg.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID); + DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserFg = guaranteeLetterAssignUserMapper.selectOne(guaranteeLetterAssignUserQueryWrapperFg); + dgGuaranteeLetterAssignUserFg.setStatus(StatusCode.SP_REVIEWED); + guaranteeLetterAssignUserMapper.updateById(dgGuaranteeLetterAssignUserFg); + + //更新a角 + //根据业务id查询A用户数据 + QueryWrapper guaranteeLetterAssignUserQueryWrapperA = new QueryWrapper<>(); + guaranteeLetterAssignUserQueryWrapperA.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID); + DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserA = guaranteeLetterAssignUserMapper.selectOne(guaranteeLetterAssignUserQueryWrapperA); + dgGuaranteeLetterAssignUserA.setStatus(StatusCode.SP_REVIEWED); + guaranteeLetterAssignUserMapper.updateById(dgGuaranteeLetterAssignUserA); + + //更新b角 + //根据业务id查询B用户数据 + QueryWrapper guaranteeLetterAssignUserQueryWrapperB = new QueryWrapper<>(); + guaranteeLetterAssignUserQueryWrapperB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID); + DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserB = guaranteeLetterAssignUserMapper.selectOne(guaranteeLetterAssignUserQueryWrapperB); + dgGuaranteeLetterAssignUserB.setStatus(StatusCode.SP_REVIEWED); + guaranteeLetterAssignUserMapper.updateById(dgGuaranteeLetterAssignUserB); + QueryWrapper guaranteeLetterAssignUserQueryWrapper = new QueryWrapper<>(); guaranteeLetterAssignUserQueryWrapper.eq("business_id",businessId).eq("role_id", PromptSuccess.ZC_JL_ID); DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUser = guaranteeLetterAssignUserMapper.selectOne(guaranteeLetterAssignUserQueryWrapper); @@ -242,8 +265,14 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ + QueryWrapper queryWrapperCwb = new QueryWrapper<>(); + queryWrapperCwb.eq("business_id",businessId).eq("role_id", PromptSuccess.CWB_ID); + DgPaymentConfirmationConsider paymentConfirmationConsiderCwb = baseMapper.selectOne(queryWrapper); + paymentConfirmationConsiderCwb.setStatus(StatusCode.SP_REVIEWED); + baseMapper.updateById(paymentConfirmationConsiderCwb); + DgLoanNotice loanNotice = new DgLoanNotice(); loanNotice.setCompanyId(companyId); loanNotice.setBusinessId(businessId); @@ -268,8 +297,14 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ + QueryWrapper queryWrapperCwb = new QueryWrapper<>(); + queryWrapperCwb.eq("business_id",businessId).eq("role_id", PromptSuccess.CWB_ID); + DgPaymentConfirmationConsider paymentConfirmationConsiderCwb = baseMapper.selectOne(queryWrapper); + paymentConfirmationConsiderCwb.setStatus(StatusCode.SP_REVIEWED); + baseMapper.updateById(paymentConfirmationConsiderCwb); + QueryWrapper loanNoticeQueryWrapper = new QueryWrapper<>(); loanNoticeQueryWrapper.eq("business_id",businessId).eq("role_id", PromptSuccess.FG_JL_ID); DgLoanNotice loanNotice = dgLoanNoticeMapper.selectOne(loanNoticeQueryWrapper);