Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
ms-data-circulation-portal-service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
fdeba13e
authored
2025-10-14 17:17:06 +0800
by
xu
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'feature-tds-v1.0.0' into 'develop'
可信空间连接器入住接口 See merge request
!17
2 parents
cab0aaa5
ce50f5a6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
12 deletions
src/main/java/com/csbr/qingcloud/portal/controller/TdsConnectorIdentityController.java
src/main/java/com/csbr/qingcloud/portal/service/TdsConnectorIdentityService.java
src/main/java/com/csbr/qingcloud/portal/service/impl/TdsConnectorIdentityServiceImpl.java
src/main/java/com/csbr/qingcloud/portal/controller/TdsConnectorIdentityController.java
View file @
fdeba13
...
...
@@ -57,6 +57,14 @@ public class TdsConnectorIdentityController {
return
CommonRes
.
success
(
true
);
}
@PostMapping
(
"/cross-flow-call-back"
)
@SystemLog
(
value
=
"连接器身份信息-流程结束后进行业务回调(跨服务审批)"
)
@Operation
(
summary
=
"连接器身份信息-流程结束后进行业务回调(跨服务审批)"
,
hidden
=
true
)
public
CommonRes
<
Boolean
>
crossFlowCallBack
(
@RequestBody
@Valid
BizCallbackDTO
dto
)
{
tdsConnectorIdentityService
.
crossFlowCallBack
(
dto
);
return
CommonRes
.
success
(
true
);
}
@DeleteMapping
(
"/delete"
)
@SystemLog
(
value
=
"连接器身份信息-批量删除"
)
@Operation
(
summary
=
"连接器身份信息-批量删除"
)
...
...
src/main/java/com/csbr/qingcloud/portal/service/TdsConnectorIdentityService.java
View file @
fdeba13
...
...
@@ -106,4 +106,10 @@ public interface TdsConnectorIdentityService {
* @return
*/
TdsConnectorIdentityRSVO
checkConnector
();
/**
* 跨平台业务调用
* @param dto
*/
void
crossFlowCallBack
(
BizCallbackDTO
dto
);
}
...
...
src/main/java/com/csbr/qingcloud/portal/service/impl/TdsConnectorIdentityServiceImpl.java
View file @
fdeba13
...
...
@@ -25,7 +25,9 @@ import csbr.cloud.entity.domain.base.vo.PageListVO;
import
com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorIdentity
;
import
com.csbr.qingcloud.portal.mybatis.service.MfTdsConnectorIdentityService
;
import
com.csbr.qingcloud.portal.service.TdsConnectorIdentityService
;
import
csbr.cloud.entity.domain.user.UserInfo
;
import
csbr.cloud.entity.enums.ApprovalStateEnum
;
import
csbr.cloud.entity.utils.UserContextHolder
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
jakarta.annotation.Resource
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -153,6 +155,9 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements
beforeSave
(
rqVO
);
MfTdsConnectorIdentity
entity
=
convertToEntity
(
rqVO
);
rqVO
.
setGuid
(
entity
.
getGuid
());
if
(
"N"
.
equals
(
entity
.
getIsChangeData
())
&&
flowBaseVO
.
getImmediateApprove
())
{
entity
.
setConnectorIdentity
(
IdentificationCodeUtil
.
genConnectorCode
(
entity
.
getLegalSocialCreditCode
(),
IdentificationCodeUtil
.
medIndustry
));
}
mfTdsConnectorIdentityService
.
csbrAddEntity
(
entity
);
// 发起审批流程或保存草稿
AddApprovalDTO
approvalDTO
=
getAddApprovalDTO
(
entity
,
rqVO
);
...
...
@@ -209,6 +214,10 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements
beforeUpdate
(
rqVO
);
MfTdsConnectorIdentity
oldEntity
=
mfTdsConnectorIdentityService
.
getById
(
rqVO
.
getGuid
());
MfTdsConnectorIdentity
entity
=
convertToEntity
(
rqVO
);
if
(
"N"
.
equals
(
entity
.
getIsChangeData
())
&&
StringUtils
.
isBlank
(
entity
.
getConnectorIdentity
())
&&
flowBaseVO
.
getImmediateApprove
())
{
entity
.
setConnectorIdentity
(
IdentificationCodeUtil
.
genConnectorCode
(
entity
.
getLegalSocialCreditCode
(),
IdentificationCodeUtil
.
medIndustry
));
}
mfTdsConnectorIdentityService
.
csbrUpdateEntity
(
entity
);
// 发起审批流程或保存草稿
AddApprovalDTO
approvalDTO
=
getAddApprovalDTO
(
entity
,
rqVO
);
...
...
@@ -279,18 +288,6 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements
if
(
entity
==
null
)
{
throw
new
CsbrSystemException
(
SystemError
.
DATA_NOT_EXISTS
,
messageSourceUtil
.
notExistsToSelectMessage
(
FUNCTION_NAME
));
}
// 同步更新审批状态
entity
.
setBizApproveState
(
bizApproveVO
.
getApprovalState
());
if
(
ApprovalStateEnum
.
PASSED
.
getValue
().
equals
(
bizApproveVO
.
getApprovalState
()))
{
if
(
"N"
.
equals
(
entity
.
getIsChangeData
()))
{
entity
.
setConnectorIdentity
(
IdentificationCodeUtil
.
genConnectorCode
(
entity
.
getLegalSocialCreditCode
(),
IdentificationCodeUtil
.
medIndustry
));
}
//如果是变更数据需要更新原来数据信息
if
(
"Y"
.
equals
(
entity
.
getIsChangeData
()))
{
changSourceConnectorInentity
(
entity
);
}
}
//驳回和撤销是,修改原来数据状态
if
(
ApprovalStateEnum
.
REJECT
.
getValue
().
equals
(
bizApproveVO
.
getApprovalState
())
||
ApprovalStateEnum
.
CANCEL
.
getValue
().
equals
(
bizApproveVO
.
getApprovalState
()))
{
if
(
"Y"
.
equals
(
entity
.
getIsChangeData
()))
{
...
...
@@ -299,6 +296,8 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements
mfTdsConnectorIdentityService
.
updateById
(
sourceEntity
);
}
}
// 同步更新审批状态
entity
.
setBizApproveState
(
bizApproveVO
.
getApprovalState
());
mfTdsConnectorIdentityService
.
updateById
(
entity
);
}
...
...
@@ -460,6 +459,29 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements
return
convertToVO
(
list
.
get
(
0
));
}
@Override
public
void
crossFlowCallBack
(
BizCallbackDTO
dto
)
{
MfTdsConnectorIdentity
entity
=
mfTdsConnectorIdentityService
.
getById
(
dto
.
getBizGuid
());
entity
.
setCrossPlatformApproveState
(
dto
.
getApprovalState
());
mfTdsConnectorIdentityService
.
updateById
(
entity
);
UserInfo
userInfo
=
UserContextHolder
.
get
();
userInfo
.
setCurrentTenantGuid
(
entity
.
getTenantGuid
());
UserContextHolder
.
set
(
userInfo
);
//如果是变更数据需要更新原来数据信息
if
(
"Y"
.
equals
(
entity
.
getIsChangeData
()))
{
changSourceConnectorInentity
(
entity
);
}
//驳回和撤销是,修改原来数据状态
if
(
ApprovalStateEnum
.
REJECT
.
getValue
().
equals
(
dto
.
getApprovalState
())
||
ApprovalStateEnum
.
CANCEL
.
getValue
().
equals
(
dto
.
getApprovalState
()))
{
if
(
"Y"
.
equals
(
entity
.
getIsChangeData
()))
{
MfTdsConnectorIdentity
sourceEntity
=
mfTdsConnectorIdentityService
.
getById
(
entity
.
getSourceBizGuid
());
sourceEntity
.
setBizApproveState
(
ApprovalStateEnum
.
PASSED
.
getValue
());
mfTdsConnectorIdentityService
.
updateById
(
sourceEntity
);
}
}
}
@Transactional
public
void
afterChangeSaveTdsConnectorIdentity
(
TdsConnectorIdentityRQVO
rqVO
,
MfTdsConnectorIdentity
oldTdsConnectorIdentity
)
{
//修改变更前数据状态为已废弃
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment