|
|
@ -178,22 +178,50 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran |
|
|
|
wrapperA.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID); |
|
|
|
wrapperA.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID); |
|
|
|
DgGuaranteeAssignUser dgGuaranteeAssignUserA = guaranteeAssignUserMapper.selectOne(wrapperA); |
|
|
|
DgGuaranteeAssignUser dgGuaranteeAssignUserA = guaranteeAssignUserMapper.selectOne(wrapperA); |
|
|
|
Integer userA = dgGuaranteeAssignUserA.getEmpId(); |
|
|
|
Integer userA = dgGuaranteeAssignUserA.getEmpId(); |
|
|
|
//添加a角
|
|
|
|
|
|
|
|
DgGuaranteeLetterAssignUser guaranteeLetterUser = new DgGuaranteeLetterAssignUser(); |
|
|
|
DgGuaranteeLetterAssignUser guaranteeLetterUser = new DgGuaranteeLetterAssignUser(); |
|
|
|
guaranteeLetterUser.setRoleId(PromptSuccess.DB_A_ID); |
|
|
|
//根据业务id查询A用户数据
|
|
|
|
guaranteeLetterUser.setUserId(userA); |
|
|
|
QueryWrapper<DgGuaranteeLetterAssignUser> guaranteeLetterAssignUserQueryWrapperA = new QueryWrapper<>(); |
|
|
|
guaranteeLetterUser.setBusinessId(businessId); |
|
|
|
guaranteeLetterAssignUserQueryWrapperA.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID); |
|
|
|
guaranteeLetterUser.setCompanyId(companyId); |
|
|
|
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserA = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperA); |
|
|
|
baseMapper.insert(guaranteeLetterUser); |
|
|
|
//如果a角数据不存在,则进行添加
|
|
|
|
//获取之前指定的a角用户
|
|
|
|
if (dgGuaranteeLetterAssignUserA==null){ |
|
|
|
|
|
|
|
//添加a角
|
|
|
|
|
|
|
|
guaranteeLetterUser.setRoleId(PromptSuccess.DB_A_ID); |
|
|
|
|
|
|
|
guaranteeLetterUser.setUserId(userA); |
|
|
|
|
|
|
|
guaranteeLetterUser.setBusinessId(businessId); |
|
|
|
|
|
|
|
guaranteeLetterUser.setCompanyId(companyId); |
|
|
|
|
|
|
|
baseMapper.insert(guaranteeLetterUser); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
//存在则进行更新
|
|
|
|
|
|
|
|
dgGuaranteeLetterAssignUserA.setStatus(StatusCode.SP_IN_REVIEW); |
|
|
|
|
|
|
|
dgGuaranteeLetterAssignUserA.setOperatingStatus(StatusCode.CZ_ON_HAND); |
|
|
|
|
|
|
|
//清空上次的审批意见
|
|
|
|
|
|
|
|
dgGuaranteeLetterAssignUserA.setAuditOpinion(""); |
|
|
|
|
|
|
|
baseMapper.updateById(dgGuaranteeLetterAssignUserA); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取之前指定的b角用户
|
|
|
|
QueryWrapper<DgGuaranteeAssignUser> wrapperB = new QueryWrapper<>(); |
|
|
|
QueryWrapper<DgGuaranteeAssignUser> wrapperB = new QueryWrapper<>(); |
|
|
|
wrapperB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID); |
|
|
|
wrapperB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID); |
|
|
|
DgGuaranteeAssignUser dgGuaranteeAssignUserB = guaranteeAssignUserMapper.selectOne(wrapperB); |
|
|
|
DgGuaranteeAssignUser dgGuaranteeAssignUserB = guaranteeAssignUserMapper.selectOne(wrapperB); |
|
|
|
Integer userB = dgGuaranteeAssignUserB.getEmpId(); |
|
|
|
Integer userB = dgGuaranteeAssignUserB.getEmpId(); |
|
|
|
//添加b角
|
|
|
|
int insert = 0; |
|
|
|
guaranteeLetterUser.setUserId(userB); |
|
|
|
//根据业务id查询B用户数据
|
|
|
|
guaranteeLetterUser.setRoleId(PromptSuccess.DB_B_ID); |
|
|
|
QueryWrapper<DgGuaranteeLetterAssignUser> guaranteeLetterAssignUserQueryWrapperB = new QueryWrapper<>(); |
|
|
|
int insert = baseMapper.insert(guaranteeLetterUser); |
|
|
|
guaranteeLetterAssignUserQueryWrapperB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID); |
|
|
|
|
|
|
|
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserB = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperB); |
|
|
|
|
|
|
|
if (dgGuaranteeLetterAssignUserB==null){ |
|
|
|
|
|
|
|
//添加b角
|
|
|
|
|
|
|
|
guaranteeLetterUser.setUserId(userB); |
|
|
|
|
|
|
|
guaranteeLetterUser.setRoleId(PromptSuccess.DB_B_ID); |
|
|
|
|
|
|
|
insert = baseMapper.insert(guaranteeLetterUser); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
dgGuaranteeLetterAssignUserB.setStatus(StatusCode.SP_IN_REVIEW); |
|
|
|
|
|
|
|
dgGuaranteeLetterAssignUserB.setOperatingStatus(StatusCode.CZ_ON_HAND); |
|
|
|
|
|
|
|
//清空上次的审批意见
|
|
|
|
|
|
|
|
dgGuaranteeLetterAssignUserB.setAuditOpinion(""); |
|
|
|
|
|
|
|
insert = baseMapper.updateById(dgGuaranteeLetterAssignUserB); |
|
|
|
|
|
|
|
} |
|
|
|
//更新成功,返回操作结果
|
|
|
|
//更新成功,返回操作结果
|
|
|
|
log.info(insert > 0 ? "法规部经理成功生成担保函" : "法规部经理生成担保函失败"); |
|
|
|
log.info(insert > 0 ? "法规部经理成功生成担保函" : "法规部经理生成担保函失败"); |
|
|
|
return insert > 0; |
|
|
|
return insert > 0; |
|
|
@ -342,13 +370,23 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran |
|
|
|
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserB = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperB); |
|
|
|
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserB = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperB); |
|
|
|
dgGuaranteeLetterAssignUserB.setStatus(StatusCode.SP_REVIEWED); |
|
|
|
dgGuaranteeLetterAssignUserB.setStatus(StatusCode.SP_REVIEWED); |
|
|
|
baseMapper.updateById(dgGuaranteeLetterAssignUserB); |
|
|
|
baseMapper.updateById(dgGuaranteeLetterAssignUserB); |
|
|
|
|
|
|
|
int insert = 0; |
|
|
|
//添加财务部经理的回款数据
|
|
|
|
//添加财务部经理的回款数据,如果财务部数据存在则进行更新
|
|
|
|
DgPaymentConfirmationConsider paymentConfirmationConsider = new DgPaymentConfirmationConsider(); |
|
|
|
QueryWrapper<DgPaymentConfirmationConsider> queryWrapperCWB = new QueryWrapper<>(); |
|
|
|
paymentConfirmationConsider.setRoleId(PromptSuccess.CWB_ID); |
|
|
|
queryWrapperCWB.eq("business_id",businessId).eq("role_id", PromptSuccess.CWB_ID); |
|
|
|
paymentConfirmationConsider.setBusinessId(businessId); |
|
|
|
DgPaymentConfirmationConsider paymentConfirmationConsiderCWB = paymentConfirmationConsiderMapper.selectOne(queryWrapperCWB); |
|
|
|
paymentConfirmationConsider.setCompanyId(companyId); |
|
|
|
if (paymentConfirmationConsiderCWB==null){ |
|
|
|
int insert = paymentConfirmationConsiderMapper.insert(paymentConfirmationConsider); |
|
|
|
DgPaymentConfirmationConsider paymentConfirmationConsider = new DgPaymentConfirmationConsider(); |
|
|
|
|
|
|
|
paymentConfirmationConsider.setRoleId(PromptSuccess.CWB_ID); |
|
|
|
|
|
|
|
paymentConfirmationConsider.setBusinessId(businessId); |
|
|
|
|
|
|
|
paymentConfirmationConsider.setCompanyId(companyId); |
|
|
|
|
|
|
|
insert = paymentConfirmationConsiderMapper.insert(paymentConfirmationConsider); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
paymentConfirmationConsiderCWB.setOperatingStatus(StatusCode.CZ_ON_HAND); |
|
|
|
|
|
|
|
paymentConfirmationConsiderCWB.setStatus(StatusCode.SP_IN_REVIEW); |
|
|
|
|
|
|
|
paymentConfirmationConsiderCWB.setAuditOpinion(""); |
|
|
|
|
|
|
|
insert = paymentConfirmationConsiderMapper.updateById(paymentConfirmationConsiderCWB); |
|
|
|
|
|
|
|
} |
|
|
|
//更新成功,返回操作结果
|
|
|
|
//更新成功,返回操作结果
|
|
|
|
log.info(insert > 0 ? "资产部经理成功添加回款数据" : "资产部经理添加回款数据失败"); |
|
|
|
log.info(insert > 0 ? "资产部经理成功添加回款数据" : "资产部经理添加回款数据失败"); |
|
|
|
return insert > 0; |
|
|
|
return insert > 0; |
|
|
@ -498,13 +536,24 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran |
|
|
|
tempB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID).select("operating_status"); |
|
|
|
tempB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID).select("operating_status"); |
|
|
|
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUser = baseMapper.selectOne(tempB); |
|
|
|
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUser = baseMapper.selectOne(tempB); |
|
|
|
Integer bStatus = dgGuaranteeLetterAssignUser.getOperatingStatus(); |
|
|
|
Integer bStatus = dgGuaranteeLetterAssignUser.getOperatingStatus(); |
|
|
|
//b用户审核通过,添加资产部经理数据
|
|
|
|
//b用户审核通过,添加资产部经理数据,数据存在进行更新
|
|
|
|
if (StatusCode.CZ_PROCESSED.equals(bStatus)){ |
|
|
|
if (StatusCode.CZ_PROCESSED.equals(bStatus)){ |
|
|
|
DgGuaranteeLetterAssignUser ZCJLGuaranteeLetterAssign = new DgGuaranteeLetterAssignUser(); |
|
|
|
int insert = 0; |
|
|
|
ZCJLGuaranteeLetterAssign.setBusinessId(businessId); |
|
|
|
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapperZC = new QueryWrapper<>(); |
|
|
|
ZCJLGuaranteeLetterAssign.setCompanyId(companyId); |
|
|
|
queryWrapperZC.eq("business_id",businessId).eq("role_id",PromptSuccess.ZC_JL_ID); |
|
|
|
ZCJLGuaranteeLetterAssign.setRoleId(PromptSuccess.ZC_JL_ID); |
|
|
|
DgGuaranteeLetterAssignUser guaranteeLetterAssignUserZC = baseMapper.selectOne(queryWrapperZC); |
|
|
|
int insert = baseMapper.insert(ZCJLGuaranteeLetterAssign); |
|
|
|
if (guaranteeLetterAssignUserZC==null){ |
|
|
|
|
|
|
|
DgGuaranteeLetterAssignUser ZCJLGuaranteeLetterAssign = new DgGuaranteeLetterAssignUser(); |
|
|
|
|
|
|
|
ZCJLGuaranteeLetterAssign.setBusinessId(businessId); |
|
|
|
|
|
|
|
ZCJLGuaranteeLetterAssign.setCompanyId(companyId); |
|
|
|
|
|
|
|
ZCJLGuaranteeLetterAssign.setRoleId(PromptSuccess.ZC_JL_ID); |
|
|
|
|
|
|
|
insert = baseMapper.insert(ZCJLGuaranteeLetterAssign); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
guaranteeLetterAssignUserZC.setStatus(StatusCode.SP_IN_REVIEW); |
|
|
|
|
|
|
|
guaranteeLetterAssignUserZC.setOperatingStatus(StatusCode.CZ_ON_HAND); |
|
|
|
|
|
|
|
guaranteeLetterAssignUserZC.setAuditOpinion(""); |
|
|
|
|
|
|
|
insert = baseMapper.updateById(guaranteeLetterAssignUserZC); |
|
|
|
|
|
|
|
} |
|
|
|
//添加成功,返回操作结果
|
|
|
|
//添加成功,返回操作结果
|
|
|
|
log.info(insert > 0 ? "资产部经理添加成功" : "资产部经理添加失败"); |
|
|
|
log.info(insert > 0 ? "资产部经理添加成功" : "资产部经理添加失败"); |
|
|
|
//b用户审核没通过,返回结果
|
|
|
|
//b用户审核没通过,返回结果
|
|
|
@ -628,11 +677,22 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran |
|
|
|
Integer aStatus = dgGuaranteeLetterAssignUser.getOperatingStatus(); |
|
|
|
Integer aStatus = dgGuaranteeLetterAssignUser.getOperatingStatus(); |
|
|
|
//a用户审核通过,添加资产部经理数据
|
|
|
|
//a用户审核通过,添加资产部经理数据
|
|
|
|
if (StatusCode.CZ_PROCESSED.equals(aStatus)){ |
|
|
|
if (StatusCode.CZ_PROCESSED.equals(aStatus)){ |
|
|
|
DgGuaranteeLetterAssignUser ZCJLGuaranteeLetterAssign = new DgGuaranteeLetterAssignUser(); |
|
|
|
int insert = 0; |
|
|
|
ZCJLGuaranteeLetterAssign.setBusinessId(businessId); |
|
|
|
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapperZC = new QueryWrapper<>(); |
|
|
|
ZCJLGuaranteeLetterAssign.setCompanyId(companyId); |
|
|
|
queryWrapperZC.eq("business_id",businessId).eq("role_id",PromptSuccess.ZC_JL_ID); |
|
|
|
ZCJLGuaranteeLetterAssign.setRoleId(PromptSuccess.ZC_JL_ID); |
|
|
|
DgGuaranteeLetterAssignUser guaranteeLetterAssignUserZC = baseMapper.selectOne(queryWrapperZC); |
|
|
|
int insert = baseMapper.insert(ZCJLGuaranteeLetterAssign); |
|
|
|
if (guaranteeLetterAssignUserZC==null){ |
|
|
|
|
|
|
|
DgGuaranteeLetterAssignUser ZCJLGuaranteeLetterAssign = new DgGuaranteeLetterAssignUser(); |
|
|
|
|
|
|
|
ZCJLGuaranteeLetterAssign.setBusinessId(businessId); |
|
|
|
|
|
|
|
ZCJLGuaranteeLetterAssign.setCompanyId(companyId); |
|
|
|
|
|
|
|
ZCJLGuaranteeLetterAssign.setRoleId(PromptSuccess.ZC_JL_ID); |
|
|
|
|
|
|
|
insert = baseMapper.insert(ZCJLGuaranteeLetterAssign); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
guaranteeLetterAssignUserZC.setStatus(StatusCode.SP_IN_REVIEW); |
|
|
|
|
|
|
|
guaranteeLetterAssignUserZC.setOperatingStatus(StatusCode.CZ_ON_HAND); |
|
|
|
|
|
|
|
guaranteeLetterAssignUserZC.setAuditOpinion(""); |
|
|
|
|
|
|
|
insert = baseMapper.updateById(guaranteeLetterAssignUserZC); |
|
|
|
|
|
|
|
} |
|
|
|
//添加成功,返回操作结果
|
|
|
|
//添加成功,返回操作结果
|
|
|
|
log.info(insert > 0 ? "资产部经理添加成功" : "资产部经理添加失败"); |
|
|
|
log.info(insert > 0 ? "资产部经理添加成功" : "资产部经理添加失败"); |
|
|
|
return insert > 0; |
|
|
|
return insert > 0; |
|
|
|