ca35a6cd by xu

可信空间连接器入住接口

1 parent 7cb4b6c0
...@@ -94,6 +94,14 @@ public class TdsConnectorIdentityManagementController { ...@@ -94,6 +94,14 @@ public class TdsConnectorIdentityManagementController {
94 return CommonRes.success(true); 94 return CommonRes.success(true);
95 } 95 }
96 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 }
104
97 //endregion 105 //endregion
98 106
99 } 107 }
......
...@@ -112,6 +112,8 @@ public class TdsConnectorIdentityRQVO extends FlowRQBaseVO { ...@@ -112,6 +112,8 @@ public class TdsConnectorIdentityRQVO extends FlowRQBaseVO {
112 @Schema(description = "是否变更数据【N 正常数据,Y 变更数据】") 112 @Schema(description = "是否变更数据【N 正常数据,Y 变更数据】")
113 private String isChangeData; 113 private String isChangeData;
114 114
115 private String funcCode;
116
115 /******** 库表存储属性 需处理 *****/ 117 /******** 库表存储属性 需处理 *****/
116 118
117 /******** 自定义扩展 *****/ 119 /******** 自定义扩展 *****/
......
...@@ -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 if(StringUtils.isBlank(rqVO.getFuncCode())) {
184 approvalDTO.setFuncCode(SysFuncCode); 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 }
...@@ -470,14 +481,6 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements ...@@ -470,14 +481,6 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements
470 UserInfo userInfo = UserContextHolder.get(); 481 UserInfo userInfo = UserContextHolder.get();
471 userInfo.setCurrentTenantGuid(entity.getTenantGuid()); 482 userInfo.setCurrentTenantGuid(entity.getTenantGuid());
472 UserContextHolder.set(userInfo); 483 UserContextHolder.set(userInfo);
473 //修改原始数据为变更中状态
474 if(ApprovalStateEnum.CHECKING.getValue().equals(dto.getApprovalState())){
475 if("Y".equals(entity.getIsChangeData())) {
476 MfTdsConnectorIdentity oldEntity = mfTdsConnectorIdentityService.getById(entity.getSourceBizGuid());
477 oldEntity.setBizApproveState("B");
478 mfTdsConnectorIdentityService.updateById(oldEntity);
479 }
480 }
481 //如果是变更数据需要更新原来数据信息 484 //如果是变更数据需要更新原来数据信息
482 //审批通过 485 //审批通过
483 if(ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState())){ 486 if(ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState())){
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!