111
k94314517
2023-08-18 8dc8985eb32198788bef7ad21cf3f1726d840b6f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package doumeemes.api.ext;
 
import doumeemes.api.BaseController;
import doumeemes.core.annotation.excel.ExcelExporter;
import doumeemes.core.annotation.pr.PreventRepeat;
import doumeemes.core.model.ApiResponse;
import doumeemes.core.model.PageWrap;
import doumeemes.core.model.PageData;
import doumeemes.dao.business.model.EndcheckDetail;
import doumeemes.dao.ext.dto.QueryEndcheckDetailExtDTO;
import doumeemes.dao.ext.vo.EndcheckDetailExtListVO;
import doumeemes.service.business.EndcheckDetailService;
import doumeemes.service.ext.EndcheckDetailExtService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;    
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
 
import java.util.ArrayList;
import java.util.List;
 
/**
 * 工单类-终检明细表 Ext接口
 * @author 江蹄蹄
 * @since 2022/07/07 16:15
 */
@RestController
@RequestMapping("/ext/endCheckDetailExt")
@Api(tags = "工单类-终检明细表 Ext接口")
public class EndcheckDetailExtController extends BaseController {
 
    @Autowired
    private EndcheckDetailExtService endcheckDetailExtService;
    
    @Autowired
    private EndcheckDetailService endcheckDetailService;
 
    @PreventRepeat
    @ApiOperation("新建")
    @PostMapping("/create")
    @RequiresPermissions("ext:endcheckdetailext:create")
    public ApiResponse create(@RequestBody EndcheckDetail endcheckDetail) {
        return ApiResponse.success(endcheckDetailService.create(endcheckDetail));
    }
 
    @ApiOperation("根据ID删除")
    @GetMapping("/delete/{id}")
    @RequiresPermissions("ext:endcheckdetailext:delete")
    public ApiResponse deleteById(@PathVariable Integer id) {
        endcheckDetailService.deleteById(id);
        return ApiResponse.success(null);
    }
 
 
    @ApiOperation("根据ID修改")
    @PostMapping("/updateById")
    @RequiresPermissions("ext:endcheckdetailext:update")
    public ApiResponse updateById(@RequestBody EndcheckDetail endcheckDetail) {
        endcheckDetailService.updateById(endcheckDetail);
        return ApiResponse.success(null);
    }
 
    @ApiOperation("分页查询")
    @PostMapping("/page")
    @RequiresPermissions("ext:endcheckdetailext:query")
    public ApiResponse<PageData<EndcheckDetailExtListVO>> findPage (@RequestBody PageWrap<QueryEndcheckDetailExtDTO> pageWrap) {
        return ApiResponse.success(endcheckDetailExtService.findPage(pageWrap));
    }
 
 
    @ApiOperation("根据ID查询")
    @GetMapping("/{id}")
    @RequiresPermissions("ext:endcheckdetailext:query")
    public ApiResponse findById(@PathVariable Integer id) {
        return ApiResponse.success(endcheckDetailService.findById(id));
    }
}