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
deb40ef6
authored
2025-03-12 13:19:41 +0800
by
xiaojie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
【数据资产】
1、企业信息-流程结束后进行业务回调(跨服务审批)
1 parent
5f39ff09
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
1 deletions
src/main/java/com/csbr/qingcloud/portal/controller/EnterpriseController.java
src/main/java/com/csbr/qingcloud/portal/service/EnterpriseService.java
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseServiceImpl.java
src/main/java/com/csbr/qingcloud/portal/controller/EnterpriseController.java
View file @
deb40ef
...
...
@@ -96,6 +96,14 @@ public class EnterpriseController {
return
CommonRes
.
success
(
true
);
}
@PostMapping
(
"/cross-flow-call-back"
)
@SystemLog
(
value
=
"企业信息-流程结束后进行业务回调(跨服务审批)"
)
@Operation
(
summary
=
"企业信息-流程结束后进行业务回调(跨服务审批)"
,
hidden
=
true
)
public
CommonRes
<
Boolean
>
crossFlowCallBack
(
@RequestBody
@Valid
BizCallbackDTO
dto
)
{
enterpriseService
.
crossFlowCallBack
(
dto
);
return
CommonRes
.
success
(
true
);
}
@PostMapping
(
"/move-old-data"
)
@SystemLog
(
value
=
"将此账号提交的数据需求迁移到新的企业"
)
@Operation
(
summary
=
"将此账号提交的数据需求迁移到新的企业"
,
hidden
=
true
)
...
...
src/main/java/com/csbr/qingcloud/portal/service/EnterpriseService.java
View file @
deb40ef
...
...
@@ -71,6 +71,12 @@ public interface EnterpriseService {
*/
void
flowCallBack
(
BizCallbackDTO
dto
);
/**
* 流程结束后进行业务回调(跨服务审批)
* @param dto
*/
void
crossFlowCallBack
(
BizCallbackDTO
dto
);
Boolean
check
(
EnterpriseRQVO
vo
);
List
<
ChangeInfoVO
>
getChange
(
String
tenantName
);
...
...
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseServiceImpl.java
View file @
deb40ef
...
...
@@ -321,7 +321,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
if
(!
flag
)
{
throw
new
CsbrSystemException
(
SystemError
.
DATA_UPDATE_ERROR
,
messageSourceUtil
.
updateMessage
(
String
.
format
(
"%s的业务审批状态"
,
FUNCTION_NAME
)));
}
if
(
ApprovalStateEnum
.
PASSED
.
getValue
().
equals
(
dto
.
getApprovalState
()))
{
if
(
ApprovalStateEnum
.
PASSED
.
getValue
().
equals
(
dto
.
getApprovalState
())
&&
!
dto
.
getIsZqPlatformApprove
()
&&
StringUtils
.
isEmpty
(
entity
.
getZqName
())
)
{
String
tenantName
=
personelFeign
.
getAllTenantGuidNameMap
().
getData
().
get
(
entity
.
getTenantGuid
());
if
(
"非认证会员"
.
equals
(
tenantName
)){
//删除原帐号并新增正式会员
...
...
@@ -348,6 +348,47 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
}
@Override
public
void
crossFlowCallBack
(
BizCallbackDTO
dto
)
{
MfEnterprise
entity
=
mfEnterpriseService
.
getById
(
dto
.
getBizGuid
());
if
(
entity
==
null
)
{
throw
new
CsbrSystemException
(
SystemError
.
DATA_NOT_EXISTS
,
messageSourceUtil
.
notExistsToSelectMessage
(
FUNCTION_NAME
));
}
// 同步更新审批状态
LambdaUpdateWrapper
<
MfEnterprise
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
set
(
MfEnterprise:
:
getBizApproveState
,
dto
.
getApprovalState
());
updateWrapper
.
set
(
MfEnterprise:
:
getCrossPlatformApproveState
,
dto
.
getApprovalState
());
updateWrapper
.
eq
(
MfEnterprise:
:
getGuid
,
dto
.
getBizGuid
());
boolean
flag
=
mfEnterpriseService
.
update
(
updateWrapper
);
if
(!
flag
)
{
throw
new
CsbrSystemException
(
SystemError
.
DATA_UPDATE_ERROR
,
messageSourceUtil
.
updateMessage
(
String
.
format
(
"%s的业务审批状态"
,
FUNCTION_NAME
)));
}
if
(
ApprovalStateEnum
.
PASSED
.
getValue
().
equals
(
dto
.
getApprovalState
()))
{
String
tenantName
=
personelFeign
.
getAllTenantGuidNameMap
().
getData
().
get
(
entity
.
getTenantGuid
());
if
(
"非认证会员"
.
equals
(
tenantName
)){
//删除原帐号并新增正式会员
TenantRQVO
vo
=
csbrBeanUtil
.
convert
(
entity
,
TenantRQVO
.
class
);
//新增会员时guid必须保证为空
vo
.
setGuid
(
null
);
vo
.
setTenantType
(
null
);
vo
.
setContactTel
(
entity
.
getContactTel
());
vo
.
setBizGuid
(
dto
.
getBizGuid
());
vo
.
setPersonIncharge
(
entity
.
getJuridicalPerson
());
vo
.
setBizState
(
"Y"
);
vo
.
setRegistrationDate
(
DateUtil
.
getDateToLocal
(
entity
.
getRegistrationDate
()));
vo
.
setTenantLicList
(
getTenantLicList
(
entity
.
getBusinessLicenseJson
()));
vo
.
setCompanyAddress
(
String
.
format
(
"%s/%s/%s"
,
entity
.
getProvince
(),
entity
.
getCity
(),
entity
.
getDistrict
()));
vo
.
setProvince
(
null
);
vo
.
setCity
(
null
);
vo
.
setDistrict
(
null
);
personelFeign
.
authTenant
(
vo
).
getData
();
}
else
{
updateTenant
(
entity
);
}
}
}
private
List
<
TenantLicRQVO
>
getTenantLicList
(
String
json
)
{
if
(
StringUtils
.
isBlank
(
json
)){
return
null
;
...
...
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