Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d94a3c48
authored
Aug 04, 2023
by
wangli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mp2jpa
1 parent
3bae1d7e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessBlockServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessBlockServiceImpl.java
View file @
d94a3c4
...
...
@@ -35,9 +35,6 @@ public class BusinessBlockServiceImpl implements BusinessBlockService {
private
MapBlockInfoMPDao
mapBlockInfoMPDao
;
@Autowired
private
OrgGroupMPDao
orgGroupMPDao
;
@Autowired
private
MapLayerMPDao
mapLayerMPDao
;
@Autowired
...
...
@@ -102,8 +99,8 @@ public class BusinessBlockServiceImpl implements BusinessBlockService {
// 获取groupId集合
Set
<
String
>
groupIds
=
teams
.
stream
().
map
(
OrgTeamEntity:
:
getGroupId
).
collect
(
Collectors
.
toSet
());
List
<
OrgGroup
>
groups
=
orgGroupMPDao
.
selectByGroupIds
(
new
ArrayList
<>(
groupIds
));
Map
<
String
,
String
>
groupMapping
=
groups
.
stream
().
collect
(
Collectors
.
toMap
(
OrgGroup
:
:
getGroupId
,
OrgGroup
:
:
getGroupName
));
List
<
OrgGroup
Entity
>
groups
=
orgGroupDao
.
findByGroupIdIn
(
new
ArrayList
<>(
groupIds
));
Map
<
String
,
String
>
groupMapping
=
groups
.
stream
().
collect
(
Collectors
.
toMap
(
OrgGroup
Entity:
:
getGroupId
,
OrgGroupEntity
:
:
getGroupName
));
Page
<
MapBlockInfo
>
pg
=
new
Page
<>(
page
,
size
);
LambdaQueryWrapper
<
MapBlockInfo
>
lqwBlock
=
new
LambdaQueryWrapper
<>();
...
...
@@ -285,11 +282,15 @@ public class BusinessBlockServiceImpl implements BusinessBlockService {
}
// 获取自定义图层(只有branch才能创建自定义图层)
LambdaQueryWrapper
<
OrgGroup
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
eq
(
levelType
.
equals
(
"cluster"
),
OrgGroup:
:
getClusterId
,
levelValue
);
lqw
.
eq
(
levelType
.
equals
(
"branch"
),
OrgGroup:
:
getBranchId
,
levelValue
);
lqw
.
eq
(
levelType
.
equals
(
"group"
),
OrgGroup:
:
getGroupId
,
levelValue
);
Set
<
String
>
branchIds
=
orgGroupMPDao
.
selectList
(
lqw
).
stream
().
map
(
OrgGroup:
:
getBranchId
).
collect
(
Collectors
.
toSet
());
List
<
OrgGroupEntity
>
groups
=
new
ArrayList
<>();
if
(
levelType
.
equals
(
"cluster"
))
{
groups
=
orgGroupDao
.
findAllByClusterId
(
levelValue
);
}
else
if
(
levelType
.
equals
(
"branch"
)){
groups
=
orgGroupDao
.
findAllByBranchId
(
levelValue
);
}
else
if
(
levelType
.
equals
(
"group"
))
{
groups
=
orgGroupDao
.
findAllByGroupId
(
levelValue
);
}
Set
<
String
>
branchIds
=
groups
.
stream
().
map
(
OrgGroupEntity:
:
getBranchId
).
collect
(
Collectors
.
toSet
());
if
(
branchIds
.
isEmpty
())
{
return
Result
.
success
(
items
);
}
...
...
Write
Preview
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