|
|
@ -754,6 +754,57 @@ 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()); |
|
|
@ -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; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|