|
|
|
@ -156,7 +156,6 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran |
|
|
|
|
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapper); |
|
|
|
|
//操作用户为当前用户
|
|
|
|
|
guaranteeLetterAssignUser.setUserId(currentUser); |
|
|
|
|
guaranteeLetterAssignUser.setStatus(StatusCode.SP_REVIEWED); |
|
|
|
|
guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED); |
|
|
|
|
guaranteeLetterAssignUser.setAuditOpinion(auditOpinion); |
|
|
|
|
//获取公司id
|
|
|
|
@ -192,7 +191,6 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran |
|
|
|
|
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapper); |
|
|
|
|
//操作用户为当前用户
|
|
|
|
|
guaranteeLetterAssignUser.setUserId(currentUser); |
|
|
|
|
guaranteeLetterAssignUser.setStatus(StatusCode.SP_REVIEWED); |
|
|
|
|
guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED); |
|
|
|
|
guaranteeLetterAssignUser.setAuditOpinion(auditOpinion); |
|
|
|
|
//根据当前用户更新审核状态和操作状态及审核意见
|
|
|
|
@ -200,7 +198,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran |
|
|
|
|
//同时往审核流程进程表新增一条记录
|
|
|
|
|
String account = DgApplyAmountInfoController.getAccount(); |
|
|
|
|
AuditProcessUtil.save(businessId,account,"法规部经理",auditOpinion,8); |
|
|
|
|
//更新成功,更新ab角数据
|
|
|
|
|
//更新成功,更新ab角数据及资产部经理数据
|
|
|
|
|
if (i > 0){ |
|
|
|
|
//更新a角
|
|
|
|
|
//根据业务id查询A用户数据
|
|
|
|
@ -222,7 +220,18 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran |
|
|
|
|
dgGuaranteeLetterAssignUserB.setOperatingStatus(StatusCode.CZ_ON_HAND); |
|
|
|
|
//清空上次的审批意见
|
|
|
|
|
dgGuaranteeLetterAssignUserB.setAuditOpinion(""); |
|
|
|
|
int update = baseMapper.updateById(dgGuaranteeLetterAssignUserB); |
|
|
|
|
baseMapper.updateById(dgGuaranteeLetterAssignUserB); |
|
|
|
|
|
|
|
|
|
//更新资产部经理
|
|
|
|
|
//根据业务id查询资产部经理数据
|
|
|
|
|
QueryWrapper<DgGuaranteeLetterAssignUser> 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<DgGuaran |
|
|
|
|
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapper); |
|
|
|
|
//操作用户为当前用户
|
|
|
|
|
guaranteeLetterAssignUser.setUserId(currentUser); |
|
|
|
|
guaranteeLetterAssignUser.setStatus(StatusCode.SP_REVIEWED); |
|
|
|
|
guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED); |
|
|
|
|
guaranteeLetterAssignUser.setAuditOpinion(auditOpinion); |
|
|
|
|
//根据当前用户更新审核状态和操作状态及审核意见
|
|
|
|
@ -287,8 +295,32 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran |
|
|
|
|
AuditProcessUtil.save(businessId,account,"资产部经理",auditOpinion,8); |
|
|
|
|
//获取公司id
|
|
|
|
|
Integer companyId = guaranteeLetterAssignUser.getCompanyId(); |
|
|
|
|
//更新成功,添加回款确认数据
|
|
|
|
|
//更新成功,添加回款确认数据及更新整个业务的审核状态
|
|
|
|
|
if (i > 0){ |
|
|
|
|
//更新法规部经理数据
|
|
|
|
|
//根据业务id查询法规部经理数据
|
|
|
|
|
QueryWrapper<DgGuaranteeLetterAssignUser> 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<DgGuaranteeLetterAssignUser> 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<DgGuaranteeLetterAssignUser> 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<DgGuaran |
|
|
|
|
//同时往审核流程进程表新增一条记录
|
|
|
|
|
String account = DgApplyAmountInfoController.getAccount(); |
|
|
|
|
AuditProcessUtil.save(businessId,account,"资产部经理",auditOpinion,8); |
|
|
|
|
//更新成功,更新回款确认数据
|
|
|
|
|
//更新成功,更新回款确认数据及更新整个业务的审核状态
|
|
|
|
|
if (i > 0){ |
|
|
|
|
//更新法规部经理数据
|
|
|
|
|
//根据业务id查询法规部经理数据
|
|
|
|
|
QueryWrapper<DgGuaranteeLetterAssignUser> 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<DgGuaranteeLetterAssignUser> 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<DgGuaranteeLetterAssignUser> 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<DgPaymentConfirmationConsider> paymentConfirmationConsiderQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
paymentConfirmationConsiderQueryWrapper.eq("business_id",businessId).eq("role_id",PromptSuccess.CWB_ID); |
|
|
|
@ -335,7 +391,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//驳回操作,更新数据及更新AB用户数据
|
|
|
|
|
//驳回操作,更新数据及更新AB用户数据及法规部经理数据
|
|
|
|
|
if (StatusCode.SP_REJECT.equals(status)){ |
|
|
|
|
//根据角色及业务id查询需要更新数据
|
|
|
|
|
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapper = new QueryWrapper<>(); |
|
|
|
@ -353,6 +409,14 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran |
|
|
|
|
AuditProcessUtil.save(businessId,account,"资产部经理",auditOpinion,8); |
|
|
|
|
//更新成功,更新AB角数据
|
|
|
|
|
if (i > 0){ |
|
|
|
|
//更新法规部经理数据
|
|
|
|
|
//根据业务id查询法规部经理数据
|
|
|
|
|
QueryWrapper<DgGuaranteeLetterAssignUser> 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<DgGuaranteeLetterAssignUser> guaranteeLetterAssignUserQueryWrapperA = new QueryWrapper<>(); |
|
|
|
|
guaranteeLetterAssignUserQueryWrapperA.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID); |
|
|
|
@ -396,7 +460,6 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran |
|
|
|
|
queryWrapperUser.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID); |
|
|
|
|
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapperUser); |
|
|
|
|
guaranteeLetterAssignUser.setUserId(currentUser); |
|
|
|
|
guaranteeLetterAssignUser.setStatus(StatusCode.SP_REVIEWED); |
|
|
|
|
guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED); |
|
|
|
|
guaranteeLetterAssignUser.setAuditOpinion(auditOpinion); |
|
|
|
|
//获取公司id
|
|
|
|
@ -410,12 +473,12 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran |
|
|
|
|
//更新成功后,判断b角用户是否确认
|
|
|
|
|
if (i > 0){ |
|
|
|
|
QueryWrapper<DgGuaranteeLetterAssignUser> 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<DgGuaran |
|
|
|
|
if (i > 0){ |
|
|
|
|
QueryWrapper<DgGuaranteeLetterAssignUser> 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<DgGuaranteeLetterAssignUser> 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<DgGuaran |
|
|
|
|
queryWrapperUser.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID); |
|
|
|
|
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapperUser); |
|
|
|
|
guaranteeLetterAssignUser.setUserId(currentUser); |
|
|
|
|
guaranteeLetterAssignUser.setStatus(StatusCode.SP_REVIEWED); |
|
|
|
|
guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED); |
|
|
|
|
guaranteeLetterAssignUser.setAuditOpinion(auditOpinion); |
|
|
|
|
//获取公司id
|
|
|
|
@ -542,11 +604,11 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran |
|
|
|
|
if (i > 0){ |
|
|
|
|
QueryWrapper<DgGuaranteeLetterAssignUser> 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<DgGuaran |
|
|
|
|
if (i > 0){ |
|
|
|
|
QueryWrapper<DgGuaranteeLetterAssignUser> 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<DgGuaranteeLetterAssignUser> queryZCJLUser = new QueryWrapper<>(); |
|
|
|
|
queryZCJLUser.eq("business_id",businessId).eq("role_id",PromptSuccess.ZC_JL_ID); |
|
|
|
|
DgGuaranteeLetterAssignUser letterAssignUserZCJL = baseMapper.selectOne(queryZCJLUser); |
|
|
|
|