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
f13afe9d
authored
2025-09-23 17:01:03 +0800
by
xiaojie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
【数据资产】
企业认证修改领域和附件信息
1 parent
4e555e65
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
100 additions
and
18 deletions
src/main/java/com/csbr/qingcloud/portal/service/EnterpriseAttachmentService.java
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseAttachmentServiceImpl.java
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseChangeApproveServiceImpl.java
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseServiceImpl.java
src/main/java/com/csbr/qingcloud/portal/service/EnterpriseAttachmentService.java
View file @
f13afe9
...
...
@@ -89,10 +89,11 @@ public interface EnterpriseAttachmentService {
/**
* 批量新增开发主体附件信息
* @param attachmentRQVOS
* @param enterprise
* @param guid
* @param tenantGuid
* @param isRequired
*/
void
batchSave
(
List
<
EnterpriseAttachmentRQVO
>
attachmentRQVOS
,
MfEnterprise
enterprise
,
Boolean
isRequired
);
void
batchSave
(
List
<
EnterpriseAttachmentRQVO
>
attachmentRQVOS
,
String
guid
,
String
tenantGuid
,
Boolean
isRequired
);
/**
* 删除开发主体附件信息
...
...
@@ -103,10 +104,11 @@ public interface EnterpriseAttachmentService {
/**
* 批量修改开发主体附件信息
* @param attachmentRQVOS
* @param enterprise
* @param guid
* @param tenantGuid
* @param isRequired
*/
void
batchUpdate
(
List
<
EnterpriseAttachmentRQVO
>
attachmentRQVOS
,
MfEnterprise
enterprise
,
Boolean
isRequired
);
void
batchUpdate
(
List
<
EnterpriseAttachmentRQVO
>
attachmentRQVOS
,
String
guid
,
String
tenantGuid
,
Boolean
isRequired
);
/**
* 根据企业认证guid查询附件信息
...
...
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseAttachmentServiceImpl.java
View file @
f13afe9
...
...
@@ -280,12 +280,12 @@ public class EnterpriseAttachmentServiceImpl implements EnterpriseAttachmentServ
@Override
@Transactional
public
void
batchSave
(
List
<
EnterpriseAttachmentRQVO
>
attachmentRQVOS
,
MfEnterprise
enterprise
,
Boolean
isRequired
)
{
public
void
batchSave
(
List
<
EnterpriseAttachmentRQVO
>
attachmentRQVOS
,
String
guid
,
String
tenantGuid
,
Boolean
isRequired
)
{
if
(
ObjectUtils
.
isNotEmpty
(
attachmentRQVOS
))
{
List
<
MfEnterpriseAttachment
>
attachmentList
=
new
ArrayList
<>();
for
(
EnterpriseAttachmentRQVO
attachmentRQVO
:
attachmentRQVOS
)
{
attachmentRQVO
.
setEnterpriseGuid
(
enterprise
.
getGuid
()
);
attachmentRQVO
.
setTenantGuid
(
enterprise
.
getTenantGuid
()
);
attachmentRQVO
.
setEnterpriseGuid
(
guid
);
attachmentRQVO
.
setTenantGuid
(
tenantGuid
);
// 获取文件大小
// 下载文件流
String
fileUrl
=
attachmentRQVO
.
getFileUrl
();
...
...
@@ -324,12 +324,12 @@ public class EnterpriseAttachmentServiceImpl implements EnterpriseAttachmentServ
@Override
@Transactional
public
void
batchUpdate
(
List
<
EnterpriseAttachmentRQVO
>
attachmentRQVOS
,
MfEnterprise
enterprise
,
Boolean
isRequired
)
{
public
void
batchUpdate
(
List
<
EnterpriseAttachmentRQVO
>
attachmentRQVOS
,
String
guid
,
String
tenantGuid
,
Boolean
isRequired
)
{
// 删除开发主体附件信息
removeByEnterpriseGuids
(
Collections
.
singletonList
(
enterprise
.
getGuid
()
));
removeByEnterpriseGuids
(
Collections
.
singletonList
(
guid
));
// 批量新增开发主体附件信息
batchSave
(
attachmentRQVOS
,
enterprise
,
isRequired
);
batchSave
(
attachmentRQVOS
,
guid
,
tenantGuid
,
isRequired
);
}
@Override
...
...
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseChangeApproveServiceImpl.java
View file @
f13afe9
...
...
@@ -34,6 +34,7 @@ import org.apache.commons.collections.CollectionUtils;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
java.util.*
;
...
...
@@ -61,6 +62,9 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro
@Autowired
private
InvokeUtil
invokeUtil
;
@Value
(
"${enterpriseAttachment.isRequired:true}"
)
private
Boolean
isRequired
;
@Resource
private
MfEnterpriseChangeApproveService
mfEnterpriseChangeApproveService
;
...
...
@@ -113,6 +117,12 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro
entity
.
setGuid
(
vo
.
getGuid
());
mfEnterpriseChangeApproveService
.
save
(
entity
);
// 保存新数据的附件和领域数据
List
<
EnterpriseAttachmentRQVO
>
attachmentRQVOS
=
beanVO
.
getAttachmentRQVOS
();
enterpriseAttachmentService
.
batchSave
(
attachmentRQVOS
,
entity
.
getGuid
(),
entity
.
getTenantGuid
(),
isRequired
);
List
<
EnterpriseDomainRQVO
>
domainRQVOS
=
beanVO
.
getDomainRQVOS
();
enterpriseDomainService
.
batchSave
(
domainRQVOS
,
entity
.
getGuid
());
//保存原数据
beanVO
=
JSON
.
parseObject
(
vo
.
getOldBizDataJson
(),
EnterpriseRQVO
.
class
);
entity
=
csbrBeanUtil
.
convert
(
beanVO
,
MfEnterpriseChangeApprove
.
class
);
...
...
@@ -122,6 +132,12 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro
entity
.
setTenantGuid
(
tenantGuid
);
mfEnterpriseChangeApproveService
.
save
(
entity
);
// 保存旧数据的附件和领域数据
List
<
EnterpriseAttachmentRQVO
>
attachmentRQVOSOld
=
beanVO
.
getAttachmentRQVOS
();
enterpriseAttachmentService
.
batchSave
(
attachmentRQVOSOld
,
entity
.
getGuid
(),
entity
.
getTenantGuid
(),
isRequired
);
List
<
EnterpriseDomainRQVO
>
domainRQVOSOld
=
beanVO
.
getDomainRQVOS
();
enterpriseDomainService
.
batchSave
(
domainRQVOSOld
,
entity
.
getGuid
());
log
.
info
(
"========entity, {}"
,
entity
);
MfEnterprise
bean
=
mfEnterpriseService
.
getById
(
entity
.
getSourceGuid
());
bean
.
setBizApproveState
(
"B"
);
...
...
@@ -151,7 +167,21 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro
vo
.
setGuid
(
bean
.
getGuid
());
vo
.
setApproveGuid
(
bean
.
getApproveGuid
());
vo
.
setSourceGuid
(
bean
.
getSourceGuid
());
vo
.
setBizDataJson
(
convertToVO
(
bean
));
if
(
ObjectUtils
.
isNotEmpty
(
bean
))
{
EnterpriseRSVO
enterpriseRSVO
=
csbrBeanUtil
.
convert
(
bean
,
EnterpriseRSVO
.
class
);
// 查询附件信息
Map
<
String
,
List
<
EnterpriseAttachmentRSVO
>>
attachmentByEnterpriseGuids
=
enterpriseAttachmentService
.
getMapByEnterpriseGuids
(
Collections
.
singletonList
(
enterpriseRSVO
.
getGuid
()));
if
(
ObjectUtils
.
isNotEmpty
(
attachmentByEnterpriseGuids
)
&&
attachmentByEnterpriseGuids
.
containsKey
(
enterpriseRSVO
.
getGuid
()))
{
enterpriseRSVO
.
setAttachmentRSVOS
(
attachmentByEnterpriseGuids
.
get
(
enterpriseRSVO
.
getGuid
()));
}
// 查询领域信息
Map
<
String
,
List
<
EnterpriseDomainRSVO
>>
domainByEnterpriseGuids
=
enterpriseDomainService
.
getMapByEnterpriseGuids
(
Collections
.
singletonList
(
enterpriseRSVO
.
getGuid
()));
if
(
ObjectUtils
.
isNotEmpty
(
domainByEnterpriseGuids
)
&&
domainByEnterpriseGuids
.
containsKey
(
enterpriseRSVO
.
getGuid
()))
{
enterpriseRSVO
.
setDomainRSVOS
(
domainByEnterpriseGuids
.
get
(
enterpriseRSVO
.
getGuid
()));
}
vo
.
setBizDataJson
(
JSON
.
toJSONString
(
enterpriseRSVO
));
}
//取原数据
queryWrapper
=
new
LambdaQueryWrapper
<>();
...
...
@@ -159,7 +189,19 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro
queryWrapper
.
eq
(
MfEnterpriseChangeApprove:
:
getDataType
,
"1"
);
tempList
=
mfEnterpriseChangeApproveService
.
list
(
queryWrapper
);
if
(
CollectionUtils
.
isNotEmpty
(
tempList
)){
vo
.
setOldBizDataJson
(
convertToVO
(
tempList
.
get
(
0
)));
EnterpriseRSVO
enterpriseRSVO
=
csbrBeanUtil
.
convert
(
tempList
.
get
(
0
),
EnterpriseRSVO
.
class
);
// 查询附件信息
Map
<
String
,
List
<
EnterpriseAttachmentRSVO
>>
attachmentByEnterpriseGuids
=
enterpriseAttachmentService
.
getMapByEnterpriseGuids
(
Collections
.
singletonList
(
enterpriseRSVO
.
getGuid
()));
if
(
ObjectUtils
.
isNotEmpty
(
attachmentByEnterpriseGuids
)
&&
attachmentByEnterpriseGuids
.
containsKey
(
enterpriseRSVO
.
getGuid
()))
{
enterpriseRSVO
.
setAttachmentRSVOS
(
attachmentByEnterpriseGuids
.
get
(
enterpriseRSVO
.
getGuid
()));
}
// 查询领域信息
Map
<
String
,
List
<
EnterpriseDomainRSVO
>>
domainByEnterpriseGuids
=
enterpriseDomainService
.
getMapByEnterpriseGuids
(
Collections
.
singletonList
(
enterpriseRSVO
.
getGuid
()));
if
(
ObjectUtils
.
isNotEmpty
(
domainByEnterpriseGuids
)
&&
domainByEnterpriseGuids
.
containsKey
(
enterpriseRSVO
.
getGuid
()))
{
enterpriseRSVO
.
setDomainRSVOS
(
domainByEnterpriseGuids
.
get
(
enterpriseRSVO
.
getGuid
()));
}
vo
.
setOldBizDataJson
(
JSON
.
toJSONString
(
enterpriseRSVO
));
}
return
vo
;
...
...
@@ -189,6 +231,21 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro
vo
.
setBizApproveState
(
"Y"
);
mfEnterpriseService
.
updateById
(
vo
);
// 修改附件和领域数据
Map
<
String
,
List
<
EnterpriseAttachmentRSVO
>>
attachmentByEnterpriseGuids
=
enterpriseAttachmentService
.
getMapByEnterpriseGuids
(
Collections
.
singletonList
(
entity
.
getGuid
()));
if
(
ObjectUtils
.
isNotEmpty
(
attachmentByEnterpriseGuids
)
&&
attachmentByEnterpriseGuids
.
containsKey
(
entity
.
getGuid
()))
{
List
<
EnterpriseAttachmentRSVO
>
attachmentRSVOS
=
attachmentByEnterpriseGuids
.
get
(
entity
.
getGuid
());
List
<
EnterpriseAttachmentRQVO
>
attachmentRQVOS
=
csbrBeanUtil
.
convert
(
attachmentRSVOS
,
EnterpriseAttachmentRQVO
.
class
);
enterpriseAttachmentService
.
batchUpdate
(
attachmentRQVOS
,
entity
.
getSourceGuid
(),
entity
.
getTenantGuid
(),
isRequired
);
}
Map
<
String
,
List
<
EnterpriseDomainRSVO
>>
domainByEnterpriseGuids
=
enterpriseDomainService
.
getMapByEnterpriseGuids
(
Collections
.
singletonList
(
entity
.
getGuid
()));
if
(
ObjectUtils
.
isNotEmpty
(
domainByEnterpriseGuids
)
&&
domainByEnterpriseGuids
.
containsKey
(
entity
.
getGuid
()))
{
List
<
EnterpriseDomainRSVO
>
domainRSVOS
=
domainByEnterpriseGuids
.
get
(
entity
.
getGuid
());
List
<
EnterpriseDomainRQVO
>
domainRQVOS
=
csbrBeanUtil
.
convert
(
domainRSVOS
,
EnterpriseDomainRQVO
.
class
);
enterpriseDomainService
.
batchUpdate
(
domainRQVOS
,
entity
.
getSourceGuid
());
}
//同步更新会员表
enterpriseService
.
updateTenant
(
vo
);
}
...
...
@@ -214,6 +271,10 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro
}
mfEnterpriseChangeApproveService
.
removeById
(
guid
);
// 删除领域和附件信息
enterpriseAttachmentService
.
removeByEnterpriseGuids
(
Collections
.
singletonList
(
entity
.
getGuid
()));
enterpriseDomainService
.
removeByEnterpriseGuids
(
Collections
.
singletonList
(
entity
.
getGuid
()));
// 修改企业认证审批状态
LambdaQueryWrapper
<
MfEnterpriseChangeApprove
>
lambdaQueryWrapper
=
Wrappers
.
lambdaQuery
(
MfEnterpriseChangeApprove
.
class
);
lambdaQueryWrapper
.
eq
(
MfEnterpriseChangeApprove:
:
getSourceGuid
,
entity
.
getSourceGuid
());
...
...
@@ -269,6 +330,21 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro
vo
.
setCrossPlatformApproveState
(
"Y"
);
mfEnterpriseService
.
updateById
(
vo
);
// 修改附件和领域数据
Map
<
String
,
List
<
EnterpriseAttachmentRSVO
>>
attachmentByEnterpriseGuids
=
enterpriseAttachmentService
.
getMapByEnterpriseGuids
(
Collections
.
singletonList
(
entity
.
getGuid
()));
if
(
ObjectUtils
.
isNotEmpty
(
attachmentByEnterpriseGuids
)
&&
attachmentByEnterpriseGuids
.
containsKey
(
entity
.
getGuid
()))
{
List
<
EnterpriseAttachmentRSVO
>
attachmentRSVOS
=
attachmentByEnterpriseGuids
.
get
(
entity
.
getGuid
());
List
<
EnterpriseAttachmentRQVO
>
attachmentRQVOS
=
csbrBeanUtil
.
convert
(
attachmentRSVOS
,
EnterpriseAttachmentRQVO
.
class
);
enterpriseAttachmentService
.
batchUpdate
(
attachmentRQVOS
,
entity
.
getSourceGuid
(),
entity
.
getTenantGuid
(),
isRequired
);
}
Map
<
String
,
List
<
EnterpriseDomainRSVO
>>
domainByEnterpriseGuids
=
enterpriseDomainService
.
getMapByEnterpriseGuids
(
Collections
.
singletonList
(
entity
.
getGuid
()));
if
(
ObjectUtils
.
isNotEmpty
(
domainByEnterpriseGuids
)
&&
domainByEnterpriseGuids
.
containsKey
(
entity
.
getGuid
()))
{
List
<
EnterpriseDomainRSVO
>
domainRSVOS
=
domainByEnterpriseGuids
.
get
(
entity
.
getGuid
());
List
<
EnterpriseDomainRQVO
>
domainRQVOS
=
csbrBeanUtil
.
convert
(
domainRSVOS
,
EnterpriseDomainRQVO
.
class
);
enterpriseDomainService
.
batchUpdate
(
domainRQVOS
,
entity
.
getSourceGuid
());
}
//同步更新会员表
enterpriseService
.
updateTenant
(
vo
);
}
...
...
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseServiceImpl.java
View file @
f13afe9
...
...
@@ -641,11 +641,15 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
enterpriseRSVO
=
csbrBeanUtil
.
convert
(
mfEnterpriseChangeApprove
,
EnterpriseRSVO
.
class
);
enterpriseRSVO
.
setBizApproveState
(
mfEnterprise
.
getBizApproveState
());
if
(
ObjectUtils
.
isNotEmpty
(
attachmentByEnterpriseGuids
)
&&
attachmentByEnterpriseGuids
.
containsKey
(
mfEnterpriseChangeApprove
.
getSourceGuid
()))
{
enterpriseRSVO
.
setAttachmentRSVOS
(
attachmentByEnterpriseGuids
.
get
(
mfEnterpriseChangeApprove
.
getSourceGuid
()));
attachmentByEnterpriseGuids
=
enterpriseAttachmentService
.
getMapByEnterpriseGuids
(
Collections
.
singletonList
(
mfEnterpriseChangeApprove
.
getGuid
()));
// 查询领域信息
domainByEnterpriseGuids
=
enterpriseDomainService
.
getMapByEnterpriseGuids
(
Collections
.
singletonList
(
mfEnterpriseChangeApprove
.
getGuid
()));
if
(
ObjectUtils
.
isNotEmpty
(
attachmentByEnterpriseGuids
)
&&
attachmentByEnterpriseGuids
.
containsKey
(
mfEnterpriseChangeApprove
.
getGuid
()))
{
enterpriseRSVO
.
setAttachmentRSVOS
(
attachmentByEnterpriseGuids
.
get
(
mfEnterpriseChangeApprove
.
getGuid
()));
}
if
(
ObjectUtils
.
isNotEmpty
(
domainByEnterpriseGuids
)
&&
domainByEnterpriseGuids
.
containsKey
(
mfEnterpriseChangeApprove
.
get
Source
Guid
()))
{
enterpriseRSVO
.
setDomainRSVOS
(
domainByEnterpriseGuids
.
get
(
mfEnterpriseChangeApprove
.
get
Source
Guid
()));
if
(
ObjectUtils
.
isNotEmpty
(
domainByEnterpriseGuids
)
&&
domainByEnterpriseGuids
.
containsKey
(
mfEnterpriseChangeApprove
.
getGuid
()))
{
enterpriseRSVO
.
setDomainRSVOS
(
domainByEnterpriseGuids
.
get
(
mfEnterpriseChangeApprove
.
getGuid
()));
}
}
}
...
...
@@ -889,7 +893,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
// 新增附件信息
List
<
EnterpriseAttachmentRQVO
>
attachmentRQVOS
=
rqVO
.
getAttachmentRQVOS
();
enterpriseAttachmentService
.
batchSave
(
attachmentRQVOS
,
entity
,
isRequired
);
enterpriseAttachmentService
.
batchSave
(
attachmentRQVOS
,
entity
.
getGuid
(),
entity
.
getTenantGuid
()
,
isRequired
);
// 新增领域信息
List
<
EnterpriseDomainRQVO
>
domainRQVOS
=
rqVO
.
getDomainRQVOS
();
...
...
@@ -967,7 +971,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
// 新增附件信息
List
<
EnterpriseAttachmentRQVO
>
attachmentRQVOS
=
rqVO
.
getAttachmentRQVOS
();
enterpriseAttachmentService
.
batchUpdate
(
attachmentRQVOS
,
entity
,
isRequired
);
enterpriseAttachmentService
.
batchUpdate
(
attachmentRQVOS
,
entity
.
getGuid
(),
entity
.
getTenantGuid
()
,
isRequired
);
// 新增领域信息
List
<
EnterpriseDomainRQVO
>
domainRQVOS
=
rqVO
.
getDomainRQVOS
();
...
...
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