1234567891011121314151617181920212223242526272829 |
- package cn.cslg.pas.controller;
- import cn.cslg.pas.common.core.base.Constants;
- import cn.cslg.pas.common.model.cronModel.Records;
- import cn.cslg.pas.common.utils.Response;
- import cn.cslg.pas.service.ReportExportService;
- import io.swagger.v3.oas.annotations.Operation;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.io.IOException;
- @Slf4j
- @RequestMapping(Constants.API_XiaoSHI + "/reportDocument")
- @RestController
- public class ReportDocumentController {
- @Autowired
- private ReportExportService reportExportService;
- @GetMapping(value = "/exportReport")
- @Operation(summary = "导出报告")
- public Response exportReport(Integer projectId, Integer templeId) throws IOException {
- Records records =new Records();
- String guid =reportExportService.exportReport(projectId, templeId);
- records.setData(guid);
- return Response.success(records);
- }
- }
|