|
|
@ -754,25 +754,76 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe |
|
|
|
* @param bizRegionNames |
|
|
|
*/ |
|
|
|
private void commitSy(TbsActivity activity,SysUser sysUser,VtbVerification verification,String saleRegionNames,String bizRegionNames){ |
|
|
|
Map<String, Object> data = buildSeeYonVerificationData(activity, sysUser, verification, saleRegionNames, bizRegionNames); |
|
|
|
|
|
|
|
BaseCreateProcessBo createProcess = new BaseCreateProcessBo(); |
|
|
|
createProcess.setTemplateCode(TbsSeeYonConst.CostCheckConf.Code()); |
|
|
|
createProcess.setMemberLoginName(sysUser.getSyAccount()); |
|
|
|
createProcess.setSubjectTitle(TbsSeeYonConst.PRE_TITLE_VERIFICATION + verification.getRemark()); |
|
|
|
createProcess.setTargetId(verification.getId()+""); |
|
|
|
createProcess.setDataJson(JsonUtil.objectToJson(data)); |
|
|
|
R<String> flowIdResult = seeYonService.baseCreateProcess(createProcess); |
|
|
|
if(flowIdResult.getStatus()!=200){ |
|
|
|
Assert.throwEx("远程服务调用失败"); |
|
|
|
} |
|
|
|
String flowId = flowIdResult.getData(); |
|
|
|
String formId = null; |
|
|
|
R<String> formIdResult = seeYonService.getFormId(TbsSeeYonConst.CostCheckConf.Code(),verification.getId()); |
|
|
|
if(formIdResult.getStatus()==200){ |
|
|
|
formId = formIdResult.getData(); |
|
|
|
} |
|
|
|
verification.setSyFlowId(flowId); |
|
|
|
verification.setSyFormId(formId); |
|
|
|
//创建流程后回调
|
|
|
|
BaseCreateCallbackBo callbackBo = new BaseCreateCallbackBo(TbsSeeYonConst.CostCheckConf.Code(),verification.getId()+""); |
|
|
|
seeYonService.createCallbackStatus(callbackBo); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Map<String, Object> buildSeeYonVerificationData(String activityId) { |
|
|
|
SysUser sysUser = sysUserService.getById(AuthContextUtils.getSysUserId()); |
|
|
|
|
|
|
|
TbsActivity activity = activityService.getById(activityId); |
|
|
|
BmsSupplier supplier = bmsSupplierService.getById(activity.getSupplierId()); |
|
|
|
|
|
|
|
String saleRegionId = supplier.handleSaleRegionId(); |
|
|
|
BmsRegion saleRegion = regionMapper.selectById(saleRegionId); |
|
|
|
String saleBizNames = saleRegion!=null?saleRegion.getPathNames():"null_申请时未录入"; |
|
|
|
|
|
|
|
String bizRegionId = supplier.handleBizRegionId(); |
|
|
|
BmsRegion2 bizRegion = region2Mapper.selectById(bizRegionId); |
|
|
|
String bizBizNames = bizRegion!=null?bizRegion.getPathNames():"null_申请时未录入"; |
|
|
|
|
|
|
|
VtbVerification temp = new VtbVerification(); |
|
|
|
temp.setActivityId(activity.getId()); |
|
|
|
temp.setSupplierName(supplier.getSupplierName()); |
|
|
|
temp.setSupplierCode(supplier.getSupplierCode()); |
|
|
|
//temp.setAmount(activity.get);
|
|
|
|
return buildSeeYonVerificationData(activity,sysUser,temp,saleBizNames,bizBizNames); |
|
|
|
} |
|
|
|
|
|
|
|
@NotNull |
|
|
|
@Override |
|
|
|
public Map<String, Object> buildSeeYonVerificationData(TbsActivity activity, SysUser sysUser, VtbVerification verification, String saleRegionNames, String bizRegionNames) { |
|
|
|
Map<String, Object> data = new HashMap<>(20); |
|
|
|
data.put("costApplyCode",verification.getVerificationCode()); |
|
|
|
data.put("applyUserCode",sysUser.getCode()); |
|
|
|
data.put("applyUserName",sysUser.getName()); |
|
|
|
data.put("supplierName",verification.getSupplierName()); |
|
|
|
data.put("supplierCode",verification.getSupplierCode()); |
|
|
|
data.put("title",activity.getActTitle()); |
|
|
|
data.put("costApplyCode", verification.getVerificationCode()); |
|
|
|
data.put("applyUserCode", sysUser.getCode()); |
|
|
|
data.put("applyUserName", sysUser.getName()); |
|
|
|
data.put("supplierName", verification.getSupplierName()); |
|
|
|
data.put("supplierCode", verification.getSupplierCode()); |
|
|
|
data.put("title", activity.getActTitle()); |
|
|
|
data.put("rowDate",DateUtils.format(LocalDateTime.now(), DateFormatString.DATE_TIME)); |
|
|
|
data.put("rowState","03"); |
|
|
|
data.put("orgId",verification.getId()); |
|
|
|
data.put("targetId",verification.getId()); |
|
|
|
data.put("targetCode",verification.getVerificationCode()); |
|
|
|
data.put("orgId", verification.getId()); |
|
|
|
data.put("targetId", verification.getId()); |
|
|
|
data.put("targetCode", verification.getVerificationCode()); |
|
|
|
data.put("exsp1",TbsSeeYonConst.CostCheckConf.Code()); |
|
|
|
data.put("jinE",verification.getAmount().toString()); |
|
|
|
data.put("money",verification.getAmount().toString()); |
|
|
|
data.put("jinE", verification.getAmount().toString()); |
|
|
|
data.put("money", verification.getAmount().toString()); |
|
|
|
|
|
|
|
//读取费用申请时的费率
|
|
|
|
LambdaQueryWrapper<TbsCostPercent> costPercentLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
costPercentLambdaQueryWrapper.eq(TbsCostPercent::getCostApplyId,activity.getCostApplyId()); |
|
|
|
costPercentLambdaQueryWrapper.eq(TbsCostPercent::getCostApplyId, activity.getCostApplyId()); |
|
|
|
List<TbsCostPercent> costPercentList = costPercentMapper.selectList(costPercentLambdaQueryWrapper); |
|
|
|
if(costPercentList.size()>0){ |
|
|
|
TbsCostPercent costPercent = costPercentList.get(0); |
|
|
@ -789,13 +840,13 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe |
|
|
|
} |
|
|
|
|
|
|
|
//拓展添加审批关联
|
|
|
|
data.put("biz_region",bizRegionNames); |
|
|
|
data.put("exsp2",saleRegionNames); |
|
|
|
data.put("biz_region", bizRegionNames); |
|
|
|
data.put("exsp2", saleRegionNames); |
|
|
|
data.put("data_state",TbsActivityState.STATE_1_Checking); |
|
|
|
|
|
|
|
//添加跳转地址业务
|
|
|
|
String urlKey = "exsp5"; |
|
|
|
String baseJumpUrl = JumpToUtil.getJumpUrl(projectProperties.getWebUrl(),TbsSeeYonConst.CostCheckConf.Code(),verification.getId()+""); |
|
|
|
String baseJumpUrl = JumpToUtil.getJumpUrl(projectProperties.getWebUrl(),TbsSeeYonConst.CostCheckConf.Code(), verification.getId()+""); |
|
|
|
data.put("exsp5",urlKey); |
|
|
|
data.put("cmsLink",baseJumpUrl); |
|
|
|
|
|
|
@ -810,28 +861,7 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
data.put("sub",subList); |
|
|
|
|
|
|
|
BaseCreateProcessBo createProcess = new BaseCreateProcessBo(); |
|
|
|
createProcess.setTemplateCode(TbsSeeYonConst.CostCheckConf.Code()); |
|
|
|
createProcess.setMemberLoginName(sysUser.getSyAccount()); |
|
|
|
createProcess.setSubjectTitle(TbsSeeYonConst.PRE_TITLE_VERIFICATION + verification.getRemark()); |
|
|
|
createProcess.setTargetId(verification.getId()+""); |
|
|
|
createProcess.setDataJson(JsonUtil.objectToJson(data)); |
|
|
|
R<String> flowIdResult = seeYonService.baseCreateProcess(createProcess); |
|
|
|
if(flowIdResult.getStatus()!=200){ |
|
|
|
Assert.throwEx("远程服务调用失败"); |
|
|
|
} |
|
|
|
String flowId = flowIdResult.getData(); |
|
|
|
String formId = null; |
|
|
|
R<String> formIdResult = seeYonService.getFormId(TbsSeeYonConst.CostCheckConf.Code(),verification.getId()); |
|
|
|
if(formIdResult.getStatus()==200){ |
|
|
|
formId = formIdResult.getData(); |
|
|
|
} |
|
|
|
verification.setSyFlowId(flowId); |
|
|
|
verification.setSyFormId(formId); |
|
|
|
//创建流程后回调
|
|
|
|
BaseCreateCallbackBo callbackBo = new BaseCreateCallbackBo(TbsSeeYonConst.CostCheckConf.Code(),verification.getId()+""); |
|
|
|
seeYonService.createCallbackStatus(callbackBo); |
|
|
|
return data; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|