xiangpei
2024-08-30 1ffc844e3483cd3ac7cc73b5fb17c62e09d1ff2f
ycl-server/src/main/java/com/ycl/platform/controller/ReportController.java
@@ -1,27 +1,24 @@
package com.ycl.platform.controller;
import com.ycl.platform.domain.entity.Report;
import com.ycl.platform.domain.entity.TMonitor;
import com.ycl.platform.domain.vo.ReportVO;
import com.ycl.platform.domain.vo.TMonitorVO;
import com.ycl.system.domain.group.Update;
import com.ycl.system.domain.group.Add;
import com.ycl.utils.poi.ExcelUtil;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import lombok.RequiredArgsConstructor;
import java.util.List;
import org.springframework.validation.annotation.Validated;
import jakarta.validation.constraints.NotEmpty;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.ycl.platform.service.ReportService;
import com.ycl.system.Result;
import com.ycl.platform.domain.form.ReportAuditingForm;
import com.ycl.platform.domain.form.ReportForm;
import com.ycl.platform.domain.query.ReportQuery;
import com.ycl.platform.domain.vo.ReportVO;
import com.ycl.platform.service.ReportService;
import com.ycl.system.Result;
import com.ycl.system.domain.group.Add;
import com.ycl.system.domain.group.Update;
import com.ycl.utils.poi.ExcelUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.NotEmpty;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * 报备 前端控制器
@@ -43,6 +40,20 @@
    @PreAuthorize("@ss.hasPermi('system:report:add')")
    public Result add(@RequestBody @Validated(Add.class) ReportForm form) {
        return reportService.add(form);
    }
    @PostMapping("/import")
    @ApiOperation(value = "导入", notes = "导入")
    @PreAuthorize("@ss.hasPermi('system:report:add')")
    public Result importData(ReportForm form) {
        return reportService.importData(form);
    }
    @PostMapping("/importTemplate")
    @ApiOperation(value = "导入模板", notes = "导入模板")
    @PreAuthorize("@ss.hasPermi('system:report:add')")
    public void importTemplate(HttpServletResponse response) {
        reportService.importTemplate(response);
    }
    @PutMapping
@@ -87,6 +98,20 @@
        return reportService.all();
    }
    @GetMapping("/auditing/record/{id}")
    @ApiOperation(value = "审核记录", notes = "审核记录")
    @PreAuthorize("@ss.hasPermi('system:report:record')")
    public Result auditingRecord(@PathVariable("id") Integer id) {
        return reportService.auditingRecord(id);
    }
    @PostMapping("/auditing")
    @ApiOperation(value = "审核", notes = "审核")
    @PreAuthorize("@ss.hasPermi('system:report:auditing')")
    public Result auditing(@RequestBody @Validated ReportAuditingForm form) {
        return reportService.auditing(form);
    }
    @PostMapping("/export")
    @ApiOperation(value = "导出", notes = "导出")
    @PreAuthorize("@ss.hasPermi('system:report:export')")