Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-enterprise
Commits
631bee6a
Commit
631bee6a
authored
Aug 17, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初始化项目新增
parent
43f2fb4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletions
+16
-1
EnterpriseInitApiServiceImpl.java
...rise/service/outer/impl/EnterpriseInitApiServiceImpl.java
+16
-1
No files found.
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/EnterpriseInitApiServiceImpl.java
View file @
631bee6a
...
...
@@ -19,7 +19,10 @@ import org.apache.logging.log4j.Logger;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
* @author guojx
...
...
@@ -259,7 +262,19 @@ public class EnterpriseInitApiServiceImpl implements EnterpriseInitApiService{
@Override
public
ServiceResponse
<
Void
>
initEnterpriseData
(
List
<
Integer
>
enterpriseIdList
)
{
if
(
CollectionUtils
.
isNotEmpty
(
enterpriseIdList
))
{
enterpriseIdList
.
forEach
(
e
->
enterpriseInitService
.
initEnterpriseConfigInfo
(
e
));
enterpriseIdList
.
forEach
(
e
->
{
List
<
TabEnterpriseInit
>
list
=
enterpriseInitService
.
listByParentId
(
null
,
e
);
Set
<
String
>
hasConfig
=
new
HashSet
<>();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
hasConfig
=
list
.
stream
().
filter
(
con
->
con
.
getIsInitConfig
()
==
1
).
map
(
con
->
con
.
getConfigCode
()).
collect
(
Collectors
.
toSet
());
}
enterpriseInitService
.
initEnterpriseConfigInfo
(
e
);
//已经配置过的数据需要还原
if
(
CollectionUtils
.
isNotEmpty
(
hasConfig
))
{
hasConfig
.
stream
().
forEach
(
temp
->
enterpriseInitService
.
initByCode
(
temp
,
e
));
}
});
}
return
ServiceResponse
.
success
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment