Commit 36c20a93 by lzy

绑定设备

parent a5907113
...@@ -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("pageRoomDevice")
public ApiResponseEntity<PageVO<PlatDeviceDTO>> pageDevice(@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);
} }
@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("unbindingDevice")
public ApiResponseEntity<?> unbindingDevice(@RequestBody PlatUnbindingDeviceDTO dto) { public ApiResponseEntity<?> unbindingDevice(@RequestBody PlatUnbindingDeviceDTO dto) {
platRoomBedDeviceService.unbindingDevice(dto); platRoomBedDeviceService.unbindingDevice(dto);
return ApiResponseUtils.success(); return ApiResponseUtils.success();
......
...@@ -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;
} }
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