| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.DeviceConditionDTO; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.DeviceResourceApply; |
| | | import com.whyc.service.DeviceResourceApplyService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | /** |
| | | * 设备资源申请 |
| | |
| | | @Api(tags = "设备资源") |
| | | public class DeviceResourceApplyController { |
| | | |
| | | @GetMapping("all") |
| | | @Autowired |
| | | private DeviceResourceApplyService service; |
| | | |
| | | @PostMapping("all") |
| | | @ApiOperation(value = "查询所有设备状态分页-筛选") |
| | | public Response getAllDeviceStatus(){ |
| | | return null; |
| | | public Response getAllDeviceStatus(@RequestParam Integer pageNum,@RequestParam Integer pageSize, |
| | | @RequestBody DeviceConditionDTO deviceConditionDTO){ |
| | | return service.getAllDeviceStatus(pageNum,pageSize,deviceConditionDTO); |
| | | } |
| | | |
| | | @GetMapping |
| | | @ApiOperation(value = "查询设备状态-根据设备id") |
| | | @ApiIgnore |
| | | public Response getDeviceStatus(@RequestParam Integer deviceId){ |
| | | return null; |
| | | } |
| | |
| | | @ApiOperation(value = "提交申请") |
| | | public Response apply(@RequestBody DeviceResourceApply resourceApply){ |
| | | |
| | | return null; |
| | | return service.apply(resourceApply); |
| | | } |
| | | |
| | | @GetMapping("applyPage") |
| | | @PostMapping("applyPage") |
| | | @ApiOperation(value = "查询申请列表分页-筛选") |
| | | //TODO 封装筛选条件到DTO |
| | | public Response getApplyPage(@RequestParam Integer pageNum,@RequestParam Integer pageSize){ |
| | | return null; |
| | | public Response getApplyPage(@RequestParam Integer pageNum,@RequestParam Integer pageSize, |
| | | @RequestBody DeviceConditionDTO condition){ |
| | | return service.getApplyPage(pageNum,pageSize,condition); |
| | | } |
| | | |
| | | @PutMapping("approve") |