huminmin
2026-06-05 24019a8c1d8e78656e85b29ee7be223e0dd253a0
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
package com.ruoyi.report.controller;
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.report.dto.DeviceRecordDto;
import com.ruoyi.report.service.ReportDeviceRecordService;
import com.ruoyi.report.vo.DeviceRecordVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
 
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
 
/**
 * 设备使用记录控制器
 */
@RequestMapping("/report/deviceRecord")
@RestController
@AllArgsConstructor
@Api(tags = "设备使用记录报表")
public class ReportDeviceRecordController {
 
    private ReportDeviceRecordService reportDeviceRecordService;
 
    /**
     * 分页查询设备使用记录
     */
    @ApiOperation(value = "分页查询设备使用记录")
    @GetMapping("/page")
    public Result page(DeviceRecordDto dto, Page page) {
        return Result.success(reportDeviceRecordService.pageDeviceRecord(page, dto));
    }
 
    /**
     * 设备使用统计
     */
    @ApiOperation(value = "设备使用统计")
    @GetMapping("/statistics")
    public Result statistics(DeviceRecordDto dto) {
        return Result.success(reportDeviceRecordService.getStatistics(dto));
    }
 
    /**
     * 导出记录
     */
    @ApiOperation(value = "导出记录")
    @GetMapping("/export")
    public void export(DeviceRecordDto dto, HttpServletResponse response) {
        reportDeviceRecordService.exportDeviceRecord(dto, response);
    }
 
}