|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author 江蹄蹄 | 
|---|
|  |  |  | * @date 2023/11/23 18:16 | 
|---|
|  |  |  | * @date 2023/11/30 15:33 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Api(tags = "设备信息表") | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("分页查询") | 
|---|
|  |  |  | @PostMapping("/page") | 
|---|
|  |  |  | @RequiresPermissions("business:device:query") | 
|---|
|  |  |  | //@RequiresPermissions("business:device:query") | 
|---|
|  |  |  | public ApiResponse<PageData<Device>> findPage (@RequestBody PageWrap<Device> pageWrap) { | 
|---|
|  |  |  | return ApiResponse.success(deviceService.findPage(pageWrap)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("导出Excel") | 
|---|
|  |  |  | @PostMapping("/exportExcel") | 
|---|
|  |  |  | @RequiresPermissions("business:device:exportExcel") | 
|---|
|  |  |  | //@RequiresPermissions("business:device:exportExcel") | 
|---|
|  |  |  | public void exportExcel (@RequestBody PageWrap<Device> pageWrap, HttpServletResponse response) { | 
|---|
|  |  |  | ExcelExporter.build(Device.class).export(deviceService.findPage(pageWrap).getRecords(), "设备信息表", response); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | public ApiResponse findById(@PathVariable Integer id) { | 
|---|
|  |  |  | return ApiResponse.success(deviceService.findById(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("获取门禁集合-提供给门禁组") | 
|---|
|  |  |  | @PostMapping("/getList") | 
|---|
|  |  |  | //@RequiresPermissions("business:device:query") | 
|---|
|  |  |  | public ApiResponse findList(@RequestBody Device device) { | 
|---|
|  |  |  | return ApiResponse.success(deviceService.findIdAndNameList(device)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|