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);
|
}
|
|
}
|