31e6d3a6 by xu

可信空间连接器入住接口

1 parent f67e71d8
......@@ -65,6 +65,7 @@ public class TdsConnectorIdentityController {
//变更数据重新提交流程
if("Y".equals(mfTdsConnectorIdentity.getIsChangeData()) && vo.getImmediateApprove()){
vo.setSourceBizGuid(mfTdsConnectorIdentity.getSourceBizGuid());
vo.setIsRestart(true);
tdsConnectorIdentityService.changeSaveTdsConnectorIdentity(vo);
}else {
tdsConnectorIdentityService.updateTdsConnectorIdentity(vo);
......
......@@ -453,12 +453,13 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements
@GlobalTransactional
public void changeSaveTdsConnectorIdentity(FlowRQBaseVO flowBaseVO) {
TdsConnectorIdentityRQVO rqVO = (TdsConnectorIdentityRQVO) flowBaseVO;
String guid = rqVO.getGuid();
MfTdsConnectorIdentity oldTdsConnectorIdentity = beforeChangeSaveTdsConnectorIdentity(rqVO);
//发起连接器入住申请
rqVO.setIsChangeData("Y");
rqVO.setFuncCode(SysFuncCode+"BG");
saveTdsConnectorIdentity(rqVO);
afterChangeSaveTdsConnectorIdentity(rqVO,oldTdsConnectorIdentity);
afterChangeSaveTdsConnectorIdentity(guid,oldTdsConnectorIdentity,rqVO.getIsRestart());
}
@Override
......@@ -507,10 +508,17 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements
}
@Transactional
public void afterChangeSaveTdsConnectorIdentity(TdsConnectorIdentityRQVO rqVO,MfTdsConnectorIdentity oldTdsConnectorIdentity) {
public void afterChangeSaveTdsConnectorIdentity(String guid, MfTdsConnectorIdentity oldTdsConnectorIdentity,
Boolean isRestart) {
//修改变更前数据状态为已废弃
oldTdsConnectorIdentity.setBizApproveState("B");
mfTdsConnectorIdentityService.updateById(oldTdsConnectorIdentity);
//如果是重新提交,需要作废数据
if(isRestart){
final MfTdsConnectorIdentity mfTdsConnectorIdentity = mfTdsConnectorIdentityService.getById(guid);
mfTdsConnectorIdentity.setBizApproveState("D");
mfTdsConnectorIdentityService.updateById(mfTdsConnectorIdentity);
}
}
/**
......@@ -600,9 +608,11 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements
//endregion 2.1.业务合规性验证
//region 2.2.业务数据验证
if (!mfTdsConnectorIdentityService.isExistsData(Collections.singletonList(rqVO.getGuid()), MfTdsConnectorIdentity.class)) {
MfTdsConnectorIdentity mfTdsConnectorIdentity = mfTdsConnectorIdentityService.getById(rqVO.getGuid());
if (ObjectUtils.isEmpty(mfTdsConnectorIdentity)) {
throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToUpdateMessage(FUNCTION_NAME));
}
rqVO.setBizApproveState(mfTdsConnectorIdentity.getBizApproveState());
//endregion 2.2.业务数据验证
//endregion 2.数据验证特殊处理
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!