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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package com.ruoyi.safety.controller;
 
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.service.SafetyInspectionRecordService;
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/inspection/statistics")
public class SafetyInspectionStatisticsController {
 
    @Autowired
    private SafetyInspectionRecordService recordService;
 
    /**
     * 查询今日巡检统计。
     */
    @Log(title = "安环管理-巡检统计-今日统计", businessType = BusinessType.OTHER)
    @ApiOperation("查询今日巡检统计")
    @GetMapping("/today")
    public AjaxResult todayStatistics() {
        return AjaxResult.success(recordService.getTodayStatistics());
    }
 
    /**
     * 查询巡检趋势统计。
     */
    @Log(title = "安环管理-巡检统计-趋势统计", businessType = BusinessType.OTHER)
    @ApiOperation("查询巡检趋势统计")
    @GetMapping("/trend")
    public AjaxResult trendStatistics(@RequestParam(value = "startDate", required = false) String startDate,
                                      @RequestParam(value = "endDate", required = false) String endDate) {
        return AjaxResult.success(recordService.getTrendStatistics(startDate, endDate));
    }
 
    /**
     * 查询巡检类型分布。
     */
    @Log(title = "安环管理-巡检统计-类型分布", businessType = BusinessType.OTHER)
    @ApiOperation("查询巡检类型分布")
    @GetMapping("/type")
    public AjaxResult typeStatistics(@RequestParam(value = "startDate", required = false) String startDate,
                                     @RequestParam(value = "endDate", required = false) String endDate) {
        return AjaxResult.success(recordService.getTypeStatistics(startDate, endDate));
    }
 
    /**
     * 查询巡检人员履职统计。
     */
    @Log(title = "安环管理-巡检统计-人员履职", businessType = BusinessType.OTHER)
    @ApiOperation("查询巡检人员履职统计")
    @GetMapping("/inspector")
    public AjaxResult inspectorStatistics(@RequestParam(value = "startDate", required = false) String startDate,
                                          @RequestParam(value = "endDate", required = false) String endDate) {
        return AjaxResult.success(recordService.getInspectorStatistics(startDate, endDate));
    }
}