Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
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
2d789d91
authored
Sep 20, 2023
by
lzy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
空间树-到床位
parent
22ff5980
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatSpaceServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatSpaceServiceImpl.java
View file @
2d789d91
...
@@ -12,6 +12,7 @@ import com.makeit.entity.platform.space.PlatBed;
...
@@ -12,6 +12,7 @@ import com.makeit.entity.platform.space.PlatBed;
import
com.makeit.entity.platform.space.PlatRoom
;
import
com.makeit.entity.platform.space.PlatRoom
;
import
com.makeit.entity.platform.space.PlatSpace
;
import
com.makeit.entity.platform.space.PlatSpace
;
import
com.makeit.enums.CodeMessageEnum
;
import
com.makeit.enums.CodeMessageEnum
;
import
com.makeit.enums.CommonEnum
;
import
com.makeit.enums.platform.space.PlatSpaceEnum
;
import
com.makeit.enums.platform.space.PlatSpaceEnum
;
import
com.makeit.exception.BusinessException
;
import
com.makeit.exception.BusinessException
;
import
com.makeit.mapper.platform.space.PlatSpaceMapper
;
import
com.makeit.mapper.platform.space.PlatSpaceMapper
;
...
@@ -174,7 +175,9 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
...
@@ -174,7 +175,9 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
List
<
PlatRoom
>
listRoom
=
platRoomService
.
list
(
new
LambdaQueryWrapper
<>());
List
<
PlatRoom
>
listRoom
=
platRoomService
.
list
(
new
LambdaQueryWrapper
<>());
//床位
//床位
List
<
PlatBed
>
listBeds
=
platBedService
.
list
(
new
LambdaQueryWrapper
<>());
LambdaQueryWrapper
<
PlatBed
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
eq
(
PlatBed:
:
getStatus
,
CommonEnum
.
YES
.
getValue
());
List
<
PlatBed
>
listBeds
=
platBedService
.
list
(
queryWrapper1
);
Map
<
String
,
List
<
PlatBed
>>
mapBed
=
listBeds
.
stream
().
collect
(
Collectors
.
groupingBy
(
PlatBed:
:
getRoomId
));
Map
<
String
,
List
<
PlatBed
>>
mapBed
=
listBeds
.
stream
().
collect
(
Collectors
.
groupingBy
(
PlatBed:
:
getRoomId
));
List
<
PlatSpaceVO
>
listRoomVo
=
new
ArrayList
<>();
List
<
PlatSpaceVO
>
listRoomVo
=
new
ArrayList
<>();
...
@@ -202,7 +205,8 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
...
@@ -202,7 +205,8 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
//父级
//父级
List
<
PlatSpaceVO
>
listParent
=
listSpaceVo
.
stream
().
filter
(
item
->
StringUtil
.
isEmpty
(
item
.
getParentId
())).
collect
(
Collectors
.
toList
());
List
<
PlatSpaceVO
>
listParent
=
listSpaceVo
.
stream
().
filter
(
item
->
StringUtil
.
isEmpty
(
item
.
getParentId
())).
collect
(
Collectors
.
toList
());
//子集
//子集
List
<
PlatSpaceVO
>
listChild
=
listSpaceVo
.
stream
().
filter
(
item
->
item
.
getParentId
()
!=
null
).
collect
(
Collectors
.
toList
());
List
<
PlatSpaceVO
>
listChild
=
listSpaceVo
.
stream
().
filter
(
item
->
item
.
getParentId
()
!=
null
).
collect
(
Collectors
.
toList
());
...
...
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