【数据资产】
1、企业信息-流程结束后进行业务回调(跨服务审批)
Showing
3 changed files
with
56 additions
and
1 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); | ... | ... |
| ... | @@ -321,7 +321,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -321,7 +321,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 321 | if (!flag) { | 321 | if (!flag) { |
| 322 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, messageSourceUtil.updateMessage(String.format("%s的业务审批状态", FUNCTION_NAME))); | 322 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, messageSourceUtil.updateMessage(String.format("%s的业务审批状态", FUNCTION_NAME))); |
| 323 | } | 323 | } |
| 324 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState())) { | 324 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState()) && !dto.getIsZqPlatformApprove() && StringUtils.isEmpty(entity.getZqName())) { |
| 325 | String tenantName = personelFeign.getAllTenantGuidNameMap().getData().get(entity.getTenantGuid()); | 325 | String tenantName = personelFeign.getAllTenantGuidNameMap().getData().get(entity.getTenantGuid()); |
| 326 | if("非认证会员".equals(tenantName)){ | 326 | if("非认证会员".equals(tenantName)){ |
| 327 | //删除原帐号并新增正式会员 | 327 | //删除原帐号并新增正式会员 |
| ... | @@ -348,6 +348,47 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -348,6 +348,47 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 348 | 348 | ||
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | @Override | ||
| 352 | public void crossFlowCallBack(BizCallbackDTO dto) { | ||
| 353 | MfEnterprise entity = mfEnterpriseService.getById(dto.getBizGuid()); | ||
| 354 | if (entity == null) { | ||
| 355 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(FUNCTION_NAME)); | ||
| 356 | } | ||
| 357 | // 同步更新审批状态 | ||
| 358 | LambdaUpdateWrapper<MfEnterprise> updateWrapper = new LambdaUpdateWrapper<>(); | ||
| 359 | updateWrapper.set(MfEnterprise::getBizApproveState, dto.getApprovalState()); | ||
| 360 | updateWrapper.set(MfEnterprise::getCrossPlatformApproveState, dto.getApprovalState()); | ||
| 361 | updateWrapper.eq(MfEnterprise::getGuid, dto.getBizGuid()); | ||
| 362 | boolean flag = mfEnterpriseService.update(updateWrapper); | ||
| 363 | if (!flag) { | ||
| 364 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, messageSourceUtil.updateMessage(String.format("%s的业务审批状态", FUNCTION_NAME))); | ||
| 365 | } | ||
| 366 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState())) { | ||
| 367 | String tenantName = personelFeign.getAllTenantGuidNameMap().getData().get(entity.getTenantGuid()); | ||
| 368 | if("非认证会员".equals(tenantName)){ | ||
| 369 | //删除原帐号并新增正式会员 | ||
| 370 | TenantRQVO vo = csbrBeanUtil.convert(entity,TenantRQVO.class); | ||
| 371 | //新增会员时guid必须保证为空 | ||
| 372 | vo.setGuid(null); | ||
| 373 | vo.setTenantType(null); | ||
| 374 | vo.setContactTel(entity.getContactTel()); | ||
| 375 | vo.setBizGuid(dto.getBizGuid()); | ||
| 376 | vo.setPersonIncharge(entity.getJuridicalPerson()); | ||
| 377 | vo.setBizState("Y"); | ||
| 378 | vo.setRegistrationDate(DateUtil.getDateToLocal(entity.getRegistrationDate())); | ||
| 379 | vo.setTenantLicList(getTenantLicList(entity.getBusinessLicenseJson())); | ||
| 380 | vo.setCompanyAddress(String.format("%s/%s/%s",entity.getProvince(),entity.getCity(),entity.getDistrict())); | ||
| 381 | vo.setProvince(null); | ||
| 382 | vo.setCity(null); | ||
| 383 | vo.setDistrict(null); | ||
| 384 | personelFeign.authTenant(vo).getData(); | ||
| 385 | } | ||
| 386 | else{ | ||
| 387 | updateTenant(entity); | ||
| 388 | } | ||
| 389 | } | ||
| 390 | } | ||
| 391 | |||
| 351 | private List<TenantLicRQVO> getTenantLicList(String json) { | 392 | private List<TenantLicRQVO> getTenantLicList(String json) { |
| 352 | if(StringUtils.isBlank(json)){ | 393 | if(StringUtils.isBlank(json)){ |
| 353 | return null; | 394 | return null; | ... | ... |
-
Please register or sign in to post a comment