可信空间连接器入住接口
Showing
5 changed files
with
37 additions
and
3 deletions
| ... | @@ -93,6 +93,14 @@ public class TdsConnectorIdentityManagementController { | ... | @@ -93,6 +93,14 @@ public class TdsConnectorIdentityManagementController { | 
| 93 | tdsConnectorIdentityManagementService.updateVoucher(rqVO); | 93 | tdsConnectorIdentityManagementService.updateVoucher(rqVO); | 
| 94 | return CommonRes.success(true); | 94 | return CommonRes.success(true); | 
| 95 | } | 95 | } | 
| 96 | |||
| 97 | @PostMapping("/cross-flow-call-back") | ||
| 98 | @SystemLog(value = "连接器身份管理-流程结束后进行业务回调(跨服务审批)") | ||
| 99 | @Operation(summary = "连接器身份管理-流程结束后进行业务回调(跨服务审批)", hidden = true) | ||
| 100 | public CommonRes<Boolean> crossFlowCallBack(@RequestBody @Valid BizCallbackDTO dto) { | ||
| 101 | tdsConnectorIdentityManagementService.crossFlowCallBack(dto); | ||
| 102 | return CommonRes.success(true); | ||
| 103 | } | ||
| 96 | 104 | ||
| 97 | //endregion | 105 | //endregion | 
| 98 | 106 | ... | ... | 
| ... | @@ -111,6 +111,8 @@ public class TdsConnectorIdentityRQVO extends FlowRQBaseVO { | ... | @@ -111,6 +111,8 @@ public class TdsConnectorIdentityRQVO extends FlowRQBaseVO { | 
| 111 | */ | 111 | */ | 
| 112 | @Schema(description = "是否变更数据【N 正常数据,Y 变更数据】") | 112 | @Schema(description = "是否变更数据【N 正常数据,Y 变更数据】") | 
| 113 | private String isChangeData; | 113 | private String isChangeData; | 
| 114 | |||
| 115 | private String funcCode; | ||
| 114 | 116 | ||
| 115 | /******** 库表存储属性 需处理 *****/ | 117 | /******** 库表存储属性 需处理 *****/ | 
| 116 | 118 | ... | ... | 
| ... | @@ -76,4 +76,6 @@ public interface TdsConnectorIdentityManagementService { | ... | @@ -76,4 +76,6 @@ public interface TdsConnectorIdentityManagementService { | 
| 76 | * @param rqVO | 76 | * @param rqVO | 
| 77 | */ | 77 | */ | 
| 78 | void updateVoucher(TdsConnectorIdentityManagementVoucherRQVO rqVO); | 78 | void updateVoucher(TdsConnectorIdentityManagementVoucherRQVO rqVO); | 
| 79 | |||
| 80 | void crossFlowCallBack(BizCallbackDTO dto); | ||
| 79 | } | 81 | } | ... | ... | 
| ... | @@ -19,6 +19,7 @@ import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityManagementQueryVO | ... | @@ -19,6 +19,7 @@ import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityManagementQueryVO | 
| 19 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityManagementRQVO; | 19 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityManagementRQVO; | 
| 20 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityManagementRSVO; | 20 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityManagementRSVO; | 
| 21 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityManagementVoucherRQVO; | 21 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityManagementVoucherRQVO; | 
| 22 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorIdentity; | ||
| 22 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorIdentityManagement; | 23 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorIdentityManagement; | 
| 23 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsConnectorIdentityManagementService; | 24 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsConnectorIdentityManagementService; | 
| 24 | import com.csbr.qingcloud.portal.service.TdsConnectorIdentityManagementService; | 25 | import com.csbr.qingcloud.portal.service.TdsConnectorIdentityManagementService; | 
| ... | @@ -267,6 +268,13 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl | ... | @@ -267,6 +268,13 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl | 
| 267 | mfTdsConnectorIdentityManagementService.updateById(entity); | 268 | mfTdsConnectorIdentityManagementService.updateById(entity); | 
| 268 | } | 269 | } | 
| 269 | 270 | ||
| 271 | @Override | ||
| 272 | public void crossFlowCallBack(BizCallbackDTO dto) { | ||
| 273 | MfTdsConnectorIdentityManagement entity = mfTdsConnectorIdentityManagementService.getById(dto.getBizGuid()); | ||
| 274 | entity.setCrossPlatformApproveState(dto.getApprovalState()); | ||
| 275 | mfTdsConnectorIdentityManagementService.updateById(entity); | ||
| 276 | } | ||
| 277 | |||
| 270 | /** | 278 | /** | 
| 271 | * 获取发起流程参数 | 279 | * 获取发起流程参数 | 
| 272 | * @author xup | 280 | * @author xup | ... | ... | 
| ... | @@ -181,7 +181,11 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | ... | @@ -181,7 +181,11 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | 
| 181 | */ | 181 | */ | 
| 182 | private AddApprovalDTO getAddApprovalDTO(MfTdsConnectorIdentity entity, TdsConnectorIdentityRQVO rqVO) { | 182 | private AddApprovalDTO getAddApprovalDTO(MfTdsConnectorIdentity entity, TdsConnectorIdentityRQVO rqVO) { | 
| 183 | AddApprovalDTO approvalDTO = new AddApprovalDTO(FLOW_TYPE, entity.getGuid()); | 183 | AddApprovalDTO approvalDTO = new AddApprovalDTO(FLOW_TYPE, entity.getGuid()); | 
| 184 | approvalDTO.setFuncCode(SysFuncCode); | 184 | if(StringUtils.isBlank(rqVO.getFuncCode())) { | 
| 185 | approvalDTO.setFuncCode(SysFuncCode); | ||
| 186 | }else{ | ||
| 187 | approvalDTO.setFuncCode(rqVO.getFuncCode()); | ||
| 188 | } | ||
| 185 | // 流程消息中的变量替换参数 | 189 | // 流程消息中的变量替换参数 | 
| 186 | String msParam = String.format("%s,%s",bizCommonRedisUtil.getTenantName(entity.getTenantGuid()),null); | 190 | String msParam = String.format("%s,%s",bizCommonRedisUtil.getTenantName(entity.getTenantGuid()),null); | 
| 187 | approvalDTO.setFlowMessageBody(msParam); | 191 | approvalDTO.setFlowMessageBody(msParam); | 
| ... | @@ -299,6 +303,12 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | ... | @@ -299,6 +303,12 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | 
| 299 | mfTdsConnectorIdentityService.updateById(sourceEntity); | 303 | mfTdsConnectorIdentityService.updateById(sourceEntity); | 
| 300 | } | 304 | } | 
| 301 | } | 305 | } | 
| 306 | //主平台审批通过更新数据 | ||
| 307 | if("MAIN".equals(platformType)) { | ||
| 308 | if(ApprovalStateEnum.PASSED.getValue().equals(bizApproveVO.getApprovalState())){ | ||
| 309 | changSourceConnectorInentity(entity); | ||
| 310 | } | ||
| 311 | } | ||
| 302 | // 同步更新审批状态 | 312 | // 同步更新审批状态 | 
| 303 | entity.setBizApproveState(bizApproveVO.getApprovalState()); | 313 | entity.setBizApproveState(bizApproveVO.getApprovalState()); | 
| 304 | mfTdsConnectorIdentityService.updateById(entity); | 314 | mfTdsConnectorIdentityService.updateById(entity); | 
| ... | @@ -444,6 +454,7 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | ... | @@ -444,6 +454,7 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | 
| 444 | MfTdsConnectorIdentity oldTdsConnectorIdentity = beforeChangeSaveTdsConnectorIdentity(rqVO); | 454 | MfTdsConnectorIdentity oldTdsConnectorIdentity = beforeChangeSaveTdsConnectorIdentity(rqVO); | 
| 445 | //发起连接器入住申请 | 455 | //发起连接器入住申请 | 
| 446 | rqVO.setIsChangeData("Y"); | 456 | rqVO.setIsChangeData("Y"); | 
| 457 | rqVO.setFuncCode(SysFuncCode+"BG"); | ||
| 447 | saveTdsConnectorIdentity(rqVO); | 458 | saveTdsConnectorIdentity(rqVO); | 
| 448 | afterChangeSaveTdsConnectorIdentity(rqVO,oldTdsConnectorIdentity); | 459 | afterChangeSaveTdsConnectorIdentity(rqVO,oldTdsConnectorIdentity); | 
| 449 | } | 460 | } | 
| ... | @@ -471,8 +482,11 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | ... | @@ -471,8 +482,11 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | 
| 471 | userInfo.setCurrentTenantGuid(entity.getTenantGuid()); | 482 | userInfo.setCurrentTenantGuid(entity.getTenantGuid()); | 
| 472 | UserContextHolder.set(userInfo); | 483 | UserContextHolder.set(userInfo); | 
| 473 | //如果是变更数据需要更新原来数据信息 | 484 | //如果是变更数据需要更新原来数据信息 | 
| 474 | if("Y".equals(entity.getIsChangeData())) { | 485 | //审批通过 | 
| 475 | changSourceConnectorInentity(entity); | 486 | if(ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState())){ | 
| 487 | if("Y".equals(entity.getIsChangeData())) { | ||
| 488 | changSourceConnectorInentity(entity); | ||
| 489 | } | ||
| 476 | } | 490 | } | 
| 477 | //驳回和撤销是,修改原来数据状态 | 491 | //驳回和撤销是,修改原来数据状态 | 
| 478 | if(ApprovalStateEnum.REJECT.getValue().equals(dto.getApprovalState()) | 492 | if(ApprovalStateEnum.REJECT.getValue().equals(dto.getApprovalState()) | ... | ... | 
- 
Please register or sign in to post a comment