| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.EncryptionReq; |
| | | import com.doumee.config.annotation.EncryptionResp; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | |
| | | @PreventRepeat |
| | | @ApiOperation("新建") |
| | | @PostMapping("/create") |
| | | @EncryptionResp |
| | | @EncryptionReq |
| | | @RequiresPermissions("business:workorderlog:create") |
| | | public ApiResponse create(@RequestBody WorkorderLog workorderLog) { |
| | | return ApiResponse.success(workorderLogService.create(workorderLog)); |
| | |
| | | |
| | | @ApiOperation("根据ID删除") |
| | | @GetMapping("/delete/{id}") |
| | | @EncryptionResp |
| | | @EncryptionReq |
| | | @RequiresPermissions("business:workorderlog:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | workorderLogService.deleteById(id); |
| | |
| | | |
| | | @ApiOperation("批量删除") |
| | | @GetMapping("/delete/batch") |
| | | @EncryptionResp |
| | | @EncryptionReq |
| | | @RequiresPermissions("business:workorderlog:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | workorderLogService.deleteByIdInBatch(this.getIdList(ids)); |
| | |
| | | |
| | | @ApiOperation("根据ID修改") |
| | | @PostMapping("/updateById") |
| | | @EncryptionResp |
| | | @EncryptionReq |
| | | @RequiresPermissions("business:workorderlog:update") |
| | | public ApiResponse updateById(@RequestBody WorkorderLog workorderLog) { |
| | | workorderLogService.updateById(workorderLog); |
| | |
| | | |
| | | @ApiOperation("分页查询") |
| | | @PostMapping("/page") |
| | | @EncryptionResp |
| | | @EncryptionReq |
| | | @RequiresPermissions("business:workorderlog:query") |
| | | public ApiResponse<PageData<WorkorderLog>> findPage (@RequestBody PageWrap<WorkorderLog> pageWrap) { |
| | | return ApiResponse.success(workorderLogService.findPage(pageWrap)); |
| | |
| | | |
| | | @ApiOperation("导出Excel") |
| | | @PostMapping("/exportExcel") |
| | | @EncryptionReq |
| | | @RequiresPermissions("business:workorderlog:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<WorkorderLog> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(WorkorderLog.class).export(workorderLogService.findPage(pageWrap).getRecords(), "工单操作历史表", response); |
| | |
| | | |
| | | @ApiOperation("根据ID查询") |
| | | @GetMapping("/{id}") |
| | | @EncryptionResp |
| | | @EncryptionReq |
| | | @RequiresPermissions("business:workorderlog:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(workorderLogService.findById(id)); |