Commit 36c20a93 by lzy

绑定设备

parent a5907113
......@@ -28,20 +28,28 @@ import java.util.List;
*/
@Api(tags = "绑定设备")
@RestController
@RequestMapping("/plat/binding/device")
@RequestMapping("/plat/binding/device/")
public class PlatRoomBedDeviceController {
@Autowired
private PlatRoomBedDeviceService platRoomBedDeviceService;
@ApiOperation("设备列表(选择设备)")
@PostMapping("pageDevice")
public ApiResponseEntity<PageVO<PlatDeviceDTO>> pageDevice(@RequestBody PageReqDTO<PlatSpaceDeviceQueryDTO> page) {
@ApiOperation("设备列表(选择设备)-房间绑定")
@PostMapping("pageRoomDevice")
public ApiResponseEntity<PageVO<PlatDeviceDTO>> pageRoomDevice(@RequestBody PageReqDTO<PlatSpaceDeviceQueryDTO> page) {
page.getData().setIsRoom(CommonEnum.YES.getValue());
PageVO<PlatDeviceDTO> data = platRoomBedDeviceService.pageDevice(page);
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("已绑定设备列表")
@PostMapping("listBindDevice")
public ApiResponseEntity<List<PlatDeviceDTO>> listBindDevice(@RequestBody PlatBedDeviceQueryDTO dto) {
......@@ -57,7 +65,7 @@ public class PlatRoomBedDeviceController {
}
@ApiOperation("解绑设备")
@PostMapping("bindingDevice")
@PostMapping("unbindingDevice")
public ApiResponseEntity<?> unbindingDevice(@RequestBody PlatUnbindingDeviceDTO dto) {
platRoomBedDeviceService.unbindingDevice(dto);
return ApiResponseUtils.success();
......
......@@ -31,6 +31,6 @@ public class PlatSpaceDeviceQueryDTO {
@ApiModelProperty(value = "是否房间绑定 0-床位绑定 1-房间绑定")
private String isRoom;
@ApiModelProperty(value = "房间ID 绑定的床位使用")
@ApiModelProperty(value = "房间ID 绑定床位时使用")
private String roomId;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment