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
c1ef5622
authored
Sep 27, 2023
by
lzy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
设备列表
parent
39264af7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
server-module/src/main/java/com/makeit/module/controller/space/PlatRoomBedDeviceController.java
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatRoomBedDeviceServiceImpl.java
server-module/src/main/java/com/makeit/module/controller/space/PlatRoomBedDeviceController.java
View file @
c1ef5622
...
@@ -37,7 +37,7 @@ public class PlatRoomBedDeviceController {
...
@@ -37,7 +37,7 @@ public class PlatRoomBedDeviceController {
@ApiOperation
(
"设备列表(选择设备)-房间绑定"
)
@ApiOperation
(
"设备列表(选择设备)-房间绑定"
)
@PostMapping
(
"pageRoomDevice"
)
@PostMapping
(
"pageRoomDevice"
)
public
ApiResponseEntity
<
PageVO
<
PlatDeviceDTO
>>
pageRoomDevice
(
@RequestBody
PageReqDTO
<
PlatSpaceDeviceQueryDTO
>
page
)
{
public
ApiResponseEntity
<
PageVO
<
PlatDeviceDTO
>>
pageRoomDevice
(
@RequestBody
PageReqDTO
<
PlatSpaceDeviceQueryDTO
>
page
)
{
//
page.getData().setIsRoom(CommonEnum.YES.getValue());
page
.
getData
().
setIsRoom
(
CommonEnum
.
YES
.
getValue
());
PageVO
<
PlatDeviceDTO
>
data
=
platRoomBedDeviceService
.
pageDevice
(
page
);
PageVO
<
PlatDeviceDTO
>
data
=
platRoomBedDeviceService
.
pageDevice
(
page
);
return
ApiResponseUtils
.
success
(
data
);
return
ApiResponseUtils
.
success
(
data
);
}
}
...
...
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatRoomBedDeviceServiceImpl.java
View file @
c1ef5622
...
@@ -98,11 +98,9 @@ public class PlatRoomBedDeviceServiceImpl extends ServiceImpl<PlatRoomBedDeviceM
...
@@ -98,11 +98,9 @@ public class PlatRoomBedDeviceServiceImpl extends ServiceImpl<PlatRoomBedDeviceM
LambdaQueryWrapper
<
PlatRoomBedDevice
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
PlatRoomBedDevice
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
select
(
PlatRoomBedDevice:
:
getDeviceId
);
queryWrapper1
.
select
(
PlatRoomBedDevice:
:
getDeviceId
);
if
(
StringUtil
.
isNotEmpty
(
dto
.
getRoomId
()))
{
queryWrapper1
.
eq
(
PlatRoomBedDevice:
:
getRoomId
,
dto
.
getRoomId
());
}
if
(
CommonEnum
.
NO
.
getValue
().
equals
(
dto
.
getIsRoom
()))
{
if
(
CommonEnum
.
NO
.
getValue
().
equals
(
dto
.
getIsRoom
()))
{
queryWrapper1
.
isNotNull
(
PlatRoomBedDevice:
:
getBedId
);
queryWrapper1
.
isNotNull
(
PlatRoomBedDevice:
:
getBedId
);
queryWrapper1
.
eq
(
PlatRoomBedDevice:
:
getRoomId
,
dto
.
getRoomId
());
}
}
List
<
PlatRoomBedDevice
>
list
=
list
(
queryWrapper1
);
List
<
PlatRoomBedDevice
>
list
=
list
(
queryWrapper1
);
List
<
String
>
listEquipmentIds
=
list
.
stream
().
map
(
item
->
item
.
getDeviceId
()).
collect
(
Collectors
.
toList
());
List
<
String
>
listEquipmentIds
=
list
.
stream
().
map
(
item
->
item
.
getDeviceId
()).
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