Merge remote-tracking branch 'origin/develop' into develop
Showing
4 changed files
with
57 additions
and
5 deletions
... | @@ -96,6 +96,14 @@ public class EnterpriseController { | ... | @@ -96,6 +96,14 @@ public class EnterpriseController { |
96 | return CommonRes.success(true); | 96 | return CommonRes.success(true); |
97 | } | 97 | } |
98 | 98 | ||
99 | @PostMapping("/cross-flow-call-back") | ||
100 | @SystemLog(value = "企业信息-流程结束后进行业务回调(跨服务审批)") | ||
101 | @Operation(summary = "企业信息-流程结束后进行业务回调(跨服务审批)", hidden = true) | ||
102 | public CommonRes<Boolean> crossFlowCallBack(@RequestBody @Valid BizCallbackDTO dto) { | ||
103 | enterpriseService.crossFlowCallBack(dto); | ||
104 | return CommonRes.success(true); | ||
105 | } | ||
106 | |||
99 | @PostMapping("/move-old-data") | 107 | @PostMapping("/move-old-data") |
100 | @SystemLog(value = "将此账号提交的数据需求迁移到新的企业") | 108 | @SystemLog(value = "将此账号提交的数据需求迁移到新的企业") |
101 | @Operation(summary = "将此账号提交的数据需求迁移到新的企业", hidden = true) | 109 | @Operation(summary = "将此账号提交的数据需求迁移到新的企业", hidden = true) | ... | ... |
... | @@ -71,6 +71,12 @@ public interface EnterpriseService { | ... | @@ -71,6 +71,12 @@ public interface EnterpriseService { |
71 | */ | 71 | */ |
72 | void flowCallBack(BizCallbackDTO dto); | 72 | void flowCallBack(BizCallbackDTO dto); |
73 | 73 | ||
74 | /** | ||
75 | * 流程结束后进行业务回调(跨服务审批) | ||
76 | * @param dto | ||
77 | */ | ||
78 | void crossFlowCallBack(BizCallbackDTO dto); | ||
79 | |||
74 | Boolean check(EnterpriseRQVO vo); | 80 | Boolean check(EnterpriseRQVO vo); |
75 | 81 | ||
76 | List<ChangeInfoVO> getChange(String tenantName); | 82 | List<ChangeInfoVO> getChange(String tenantName); | ... | ... |
... | @@ -85,9 +85,6 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -85,9 +85,6 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
85 | @Resource | 85 | @Resource |
86 | private WorkflowFeign workflowFeign; | 86 | private WorkflowFeign workflowFeign; |
87 | 87 | ||
88 | @Value("${isCrossPlatform:}") | ||
89 | private Boolean isCrossPlatform; | ||
90 | |||
91 | /** | 88 | /** |
92 | * 数据需求分页查询 | 89 | * 数据需求分页查询 |
93 | * @author xcq | 90 | * @author xcq |
... | @@ -291,7 +288,7 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -291,7 +288,7 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
291 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(FUNCTION_NAME)); | 288 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(FUNCTION_NAME)); |
292 | } | 289 | } |
293 | String orderNo = null; | 290 | String orderNo = null; |
294 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState()) && !dto.getIsZqPlatformApprove() && !isCrossPlatform) { | 291 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState()) && !dto.getIsZqPlatformApprove() && StringUtils.isEmpty(entity.getZqName())) { |
295 | //生成加工单 | 292 | //生成加工单 |
296 | orderNo = addOrder(mfDemandService.getById(dto.getBizGuid()),dto); | 293 | orderNo = addOrder(mfDemandService.getById(dto.getBizGuid()),dto); |
297 | } | 294 | } | ... | ... |
... | @@ -322,7 +322,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -322,7 +322,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
322 | if (!flag) { | 322 | if (!flag) { |
323 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, messageSourceUtil.updateMessage(String.format("%s的业务审批状态", FUNCTION_NAME))); | 323 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, messageSourceUtil.updateMessage(String.format("%s的业务审批状态", FUNCTION_NAME))); |
324 | } | 324 | } |
325 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState())) { | 325 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState()) && !dto.getIsZqPlatformApprove() && StringUtils.isEmpty(entity.getZqName())) { |
326 | String tenantName = personelFeign.getAllTenantGuidNameMap().getData().get(entity.getTenantGuid()); | 326 | String tenantName = personelFeign.getAllTenantGuidNameMap().getData().get(entity.getTenantGuid()); |
327 | if("非认证会员".equals(tenantName)){ | 327 | if("非认证会员".equals(tenantName)){ |
328 | //删除原帐号并新增正式会员 | 328 | //删除原帐号并新增正式会员 |
... | @@ -349,6 +349,47 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -349,6 +349,47 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
349 | 349 | ||
350 | } | 350 | } |
351 | 351 | ||
352 | @Override | ||
353 | public void crossFlowCallBack(BizCallbackDTO dto) { | ||
354 | MfEnterprise entity = mfEnterpriseService.getById(dto.getBizGuid()); | ||
355 | if (entity == null) { | ||
356 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(FUNCTION_NAME)); | ||
357 | } | ||
358 | // 同步更新审批状态 | ||
359 | LambdaUpdateWrapper<MfEnterprise> updateWrapper = new LambdaUpdateWrapper<>(); | ||
360 | updateWrapper.set(MfEnterprise::getBizApproveState, dto.getApprovalState()); | ||
361 | updateWrapper.set(MfEnterprise::getCrossPlatformApproveState, dto.getApprovalState()); | ||
362 | updateWrapper.eq(MfEnterprise::getGuid, dto.getBizGuid()); | ||
363 | boolean flag = mfEnterpriseService.update(updateWrapper); | ||
364 | if (!flag) { | ||
365 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, messageSourceUtil.updateMessage(String.format("%s的业务审批状态", FUNCTION_NAME))); | ||
366 | } | ||
367 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState())) { | ||
368 | String tenantName = personelFeign.getAllTenantGuidNameMap().getData().get(entity.getTenantGuid()); | ||
369 | if("非认证会员".equals(tenantName)){ | ||
370 | //删除原帐号并新增正式会员 | ||
371 | TenantRQVO vo = csbrBeanUtil.convert(entity,TenantRQVO.class); | ||
372 | //新增会员时guid必须保证为空 | ||
373 | vo.setGuid(null); | ||
374 | vo.setTenantType(null); | ||
375 | vo.setContactTel(entity.getContactTel()); | ||
376 | vo.setBizGuid(dto.getBizGuid()); | ||
377 | vo.setPersonIncharge(entity.getJuridicalPerson()); | ||
378 | vo.setBizState("Y"); | ||
379 | vo.setRegistrationDate(DateUtil.getDateToLocal(entity.getRegistrationDate())); | ||
380 | vo.setTenantLicList(getTenantLicList(entity.getBusinessLicenseJson())); | ||
381 | vo.setCompanyAddress(String.format("%s/%s/%s",entity.getProvince(),entity.getCity(),entity.getDistrict())); | ||
382 | vo.setProvince(null); | ||
383 | vo.setCity(null); | ||
384 | vo.setDistrict(null); | ||
385 | personelFeign.authTenant(vo).getData(); | ||
386 | } | ||
387 | else{ | ||
388 | updateTenant(entity); | ||
389 | } | ||
390 | } | ||
391 | } | ||
392 | |||
352 | private List<TenantLicRQVO> getTenantLicList(String json) { | 393 | private List<TenantLicRQVO> getTenantLicList(String json) { |
353 | if(StringUtils.isBlank(json)){ | 394 | if(StringUtils.isBlank(json)){ |
354 | return null; | 395 | return null; | ... | ... |
-
Please register or sign in to post a comment