6 天以前 0c23c1e9b9e06ffc570edac28ee45555b772b99c
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
package com.ruoyi.safety.controller;
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.safety.pojo.SafetyAssessmentReport;
import com.ruoyi.safety.service.SafetyAssessmentReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
/**
 * 安环管理-考核报告接口。
 */
@RestController
@Api(tags = "安环管理-考核报告")
@RequestMapping("/safety/learning/report")
public class SafetyAssessmentReportController extends SafetyControllerSupport {
 
    @Autowired
    private SafetyAssessmentReportService reportService;
 
    /**
     * 分页查询考核报告。
     */
    @Log(title = "安环管理-考核报告-分页查询", businessType = BusinessType.OTHER)
    @ApiOperation("分页查询考核报告")
    @GetMapping("/list")
    public AjaxResult list(Page<SafetyAssessmentReport> page, SafetyAssessmentReport query,
                           @RequestParam(value = "pageNum", required = false) Long pageNum,
                           @RequestParam(value = "pageSize", required = false) Long pageSize) {
        return AjaxResult.success(reportService.queryPage(buildPage(page, pageNum, pageSize), query));
    }
 
    /**
     * 查询考核报告详情。
     */
    @Log(title = "安环管理-考核报告-详情", businessType = BusinessType.OTHER)
    @ApiOperation("查询考核报告详情")
    @GetMapping("/detail/{id}")
    public AjaxResult detail(@PathVariable Long id) {
        return AjaxResult.success(reportService.getById(id));
    }
}