ZQN
2024-06-17 3a2b86071fca71b4c789762ccb2dfaf7423b0c07
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
package com.project.admin.controller.enforce;
 
import java.util.List;
import java.util.Arrays;
 
import com.project.common.annotation.RepeatSubmit;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.project.common.annotation.Log;
import com.project.common.core.controller.BaseController;
import com.project.common.core.domain.AjaxResult;
import com.project.common.enums.BusinessType;
import com.project.enforce.domain.vo.EnforceCheckLogVo;
import com.project.enforce.domain.bo.editBo.EnforceCheckLogBo;
import com.project.enforce.domain.bo.queryBo.EnforceCheckLogQueryBo;
import com.project.enforce.service.IEnforceCheckLogService;
import com.project.common.utils.poi.ExcelUtil;
import com.project.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
 
/**
 * 执法审批记录Controller
 *
 * @author manton
 */
@Api(value = "执法审批记录控制器", tags = {"执法审批记录管理"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/enforce/check/log")
public class EnforceCheckLogController extends BaseController {
 
    private final IEnforceCheckLogService iEnforceCheckLogService;
 
 
    @ApiOperation("查询执法审批记录列表")
    @GetMapping("/list")
    public TableDataInfo list(EnforceCheckLogQueryBo bo)
    {
        startPage();
        List<EnforceCheckLogVo> list = iEnforceCheckLogService.queryList(bo);
        return getDataTable(list);
    }
 
 
 
    @ApiOperation("导出执法审批记录列表")
    //@PreAuthorize("@ss.hasPermi('enforce:log:export')")
    @Log(title = "执法审批记录", businessType = BusinessType.EXPORT)
    @GetMapping("/export")
    @RepeatSubmit
    public AjaxResult export(EnforceCheckLogQueryBo bo)
    {
        List<EnforceCheckLogVo> list = iEnforceCheckLogService.queryList(bo);
        ExcelUtil<EnforceCheckLogVo> util = new ExcelUtil<EnforceCheckLogVo>(EnforceCheckLogVo.class);
        return util.exportExcel(list, "执法审批记录");
    }
 
 
    @ApiOperation("获取执法审批记录详细信息")
    @GetMapping("/{id}")
    public AjaxResult getInfo(@PathVariable("id" ) Long id)
    {
        return AjaxResult.success(iEnforceCheckLogService.queryById(id));
    }
 
 
    @ApiOperation("新增执法审批记录")
    //@PreAuthorize("@ss.hasPermi('enforce:log:add')")
    @Log(title = "执法审批记录", businessType = BusinessType.INSERT)
    @PostMapping("/add")
    @RepeatSubmit
    public AjaxResult add(@RequestBody EnforceCheckLogBo bo)
    {
        return toAjax(iEnforceCheckLogService.insertByBo(bo) ? 1 : 0);
    }
 
 
    @ApiOperation("修改执法审批记录")
    //@PreAuthorize("@ss.hasPermi('enforce:log:edit')")
    @Log(title = "执法审批记录", businessType = BusinessType.UPDATE)
    @PostMapping("/upd")
    @RepeatSubmit
    public AjaxResult upd(@RequestBody EnforceCheckLogBo bo)
    {
        return toAjax(iEnforceCheckLogService.updateByBo(bo) ? 1 : 0);
    }
 
 
    @ApiOperation("删除执法审批记录")
    //@PreAuthorize("@ss.hasPermi('enforce:log:remove')")
    @Log(title = "执法审批记录" , businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    @RepeatSubmit
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(iEnforceCheckLogService.deleteByIds(Arrays.asList(ids)) ? 1 : 0);
    }
}