| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.DeviceManage; |
| | | import com.whyc.service.DeviceManageService; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设备管理 |
| | | * 设备管理信息表 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("deviceManage") |
| | |
| | | @Autowired |
| | | private DeviceManageService service; |
| | | |
| | | @GetMapping("list") |
| | | @ApiOperation(value = "查询左边菜单列表") |
| | | public Response<List<DeviceManage>> getList(){ |
| | | return service.getList(); |
| | | } |
| | | |
| | | /*@GetMapping("page") |
| | | @ApiOperation(value = "查询分页") |
| | | public Response<PageInfo<DeviceManage>> getPage(@RequestParam int pageNum, @RequestParam int pageSize){ |
| | | return service.getPage(pageNum,pageSize); |
| | | }*/ |
| | | |
| | | @PostMapping("pageByCondition") |
| | | @ApiOperation(value = "查询分页-根据筛选条件") |
| | | public Response<PageInfo<DeviceManage>> getPageByCondition(@RequestParam int pageNum,@RequestParam int pageSize,@RequestBody DeviceManage deviceManage){ |
| | | return service.getPageByCondition(pageNum,pageSize,deviceManage); |
| | | } |
| | | |
| | | |
| | | @GetMapping("site") |
| | | @ApiOperation(value = "查询所有区域") |
| | | public Response getSite(){ |
| | | return service.getSite(); |
| | | } |
| | | |
| | | |
| | | @PostMapping |
| | | @ApiOperation(value="添加-入库") |
| | | public Response add(@RequestBody DeviceManage deviceManage){ |
| | | return service.add(deviceManage); |
| | | } |
| | | |
| | | @PutMapping |
| | | @PutMapping("delete") |
| | | @ApiOperation(value="报废-出库") |
| | | public Response delete(@RequestParam Integer deviceId){ |
| | | return service.delete(deviceId); |