ReportDocumentController.java 1007 B

1234567891011121314151617181920212223242526272829
  1. package cn.cslg.pas.controller;
  2. import cn.cslg.pas.common.core.base.Constants;
  3. import cn.cslg.pas.common.model.cronModel.Records;
  4. import cn.cslg.pas.common.utils.Response;
  5. import cn.cslg.pas.service.ReportExportService;
  6. import io.swagger.v3.oas.annotations.Operation;
  7. import lombok.extern.slf4j.Slf4j;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.web.bind.annotation.*;
  10. import java.io.IOException;
  11. @Slf4j
  12. @RequestMapping(Constants.API_XiaoSHI + "/reportDocument")
  13. @RestController
  14. public class ReportDocumentController {
  15. @Autowired
  16. private ReportExportService reportExportService;
  17. @GetMapping(value = "/exportReport")
  18. @Operation(summary = "导出报告")
  19. public Response exportReport(Integer projectId, Integer templeId) throws IOException {
  20. Records records =new Records();
  21. String guid =reportExportService.exportReport(projectId, templeId);
  22. records.setData(guid);
  23. return Response.success(records);
  24. }
  25. }