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
36c20a93
authored
Sep 08, 2023
by
lzy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
绑定设备
parent
a5907113
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
server-module/src/main/java/com/makeit/module/controller/space/PlatRoomBedDeviceController.java
server-service/src/main/java/com/makeit/dto/platform/space/PlatSpaceDeviceQueryDTO.java
server-module/src/main/java/com/makeit/module/controller/space/PlatRoomBedDeviceController.java
View file @
36c20a93
...
@@ -28,20 +28,28 @@ import java.util.List;
...
@@ -28,20 +28,28 @@ import java.util.List;
*/
*/
@Api
(
tags
=
"绑定设备"
)
@Api
(
tags
=
"绑定设备"
)
@RestController
@RestController
@RequestMapping
(
"/plat/binding/device"
)
@RequestMapping
(
"/plat/binding/device
/
"
)
public
class
PlatRoomBedDeviceController
{
public
class
PlatRoomBedDeviceController
{
@Autowired
@Autowired
private
PlatRoomBedDeviceService
platRoomBedDeviceService
;
private
PlatRoomBedDeviceService
platRoomBedDeviceService
;
@ApiOperation
(
"设备列表(选择设备)"
)
@ApiOperation
(
"设备列表(选择设备)
-房间绑定
"
)
@PostMapping
(
"pageDevice"
)
@PostMapping
(
"page
Room
Device"
)
public
ApiResponseEntity
<
PageVO
<
PlatDeviceDTO
>>
pageDevice
(
@RequestBody
PageReqDTO
<
PlatSpaceDeviceQueryDTO
>
page
)
{
public
ApiResponseEntity
<
PageVO
<
PlatDeviceDTO
>>
page
Room
Device
(
@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
);
}
}
@ApiOperation
(
"设备列表(选择设备)-床位绑定"
)
@PostMapping
(
"pageBedDevice"
)
public
ApiResponseEntity
<
PageVO
<
PlatDeviceDTO
>>
pageBedDevice
(
@RequestBody
PageReqDTO
<
PlatSpaceDeviceQueryDTO
>
page
)
{
page
.
getData
().
setIsRoom
(
CommonEnum
.
NO
.
getValue
());
PageVO
<
PlatDeviceDTO
>
data
=
platRoomBedDeviceService
.
pageDevice
(
page
);
return
ApiResponseUtils
.
success
(
data
);
}
@ApiOperation
(
"已绑定设备列表"
)
@ApiOperation
(
"已绑定设备列表"
)
@PostMapping
(
"listBindDevice"
)
@PostMapping
(
"listBindDevice"
)
public
ApiResponseEntity
<
List
<
PlatDeviceDTO
>>
listBindDevice
(
@RequestBody
PlatBedDeviceQueryDTO
dto
)
{
public
ApiResponseEntity
<
List
<
PlatDeviceDTO
>>
listBindDevice
(
@RequestBody
PlatBedDeviceQueryDTO
dto
)
{
...
@@ -57,7 +65,7 @@ public class PlatRoomBedDeviceController {
...
@@ -57,7 +65,7 @@ public class PlatRoomBedDeviceController {
}
}
@ApiOperation
(
"解绑设备"
)
@ApiOperation
(
"解绑设备"
)
@PostMapping
(
"bindingDevice"
)
@PostMapping
(
"
un
bindingDevice"
)
public
ApiResponseEntity
<?>
unbindingDevice
(
@RequestBody
PlatUnbindingDeviceDTO
dto
)
{
public
ApiResponseEntity
<?>
unbindingDevice
(
@RequestBody
PlatUnbindingDeviceDTO
dto
)
{
platRoomBedDeviceService
.
unbindingDevice
(
dto
);
platRoomBedDeviceService
.
unbindingDevice
(
dto
);
return
ApiResponseUtils
.
success
();
return
ApiResponseUtils
.
success
();
...
...
server-service/src/main/java/com/makeit/dto/platform/space/PlatSpaceDeviceQueryDTO.java
View file @
36c20a93
...
@@ -31,6 +31,6 @@ public class PlatSpaceDeviceQueryDTO {
...
@@ -31,6 +31,6 @@ public class PlatSpaceDeviceQueryDTO {
@ApiModelProperty
(
value
=
"是否房间绑定 0-床位绑定 1-房间绑定"
)
@ApiModelProperty
(
value
=
"是否房间绑定 0-床位绑定 1-房间绑定"
)
private
String
isRoom
;
private
String
isRoom
;
@ApiModelProperty
(
value
=
"房间ID 绑定
的床位
使用"
)
@ApiModelProperty
(
value
=
"房间ID 绑定
床位时
使用"
)
private
String
roomId
;
private
String
roomId
;
}
}
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