ExamReportingTqesAppService.cs 817 B

123456789101112131415161718192021222324
  1. namespace YBEE.EQM.Application;
  2. /// <summary>
  3. /// TQES报表服务
  4. /// </summary>
  5. [ApiDescriptionSettings(Name = "exam-reporting-tqes")]
  6. [Route("exam/reporting/tqes")]
  7. public class ExamReportingTqesAppService(IExamReportingTqesService examReportingTqesService) : IDynamicApiController
  8. {
  9. /// <summary>
  10. /// 根据监测计划ID导出全区优势薄弱
  11. /// </summary>
  12. /// <param name="examPlanId"></param>
  13. /// <returns></returns>
  14. [AllowAnonymous]
  15. public async Task<IActionResult> ExportTotalAdvWeak([FromQuery][Required] int examPlanId)
  16. {
  17. var (fileName, fileBytes) = await examReportingTqesService.ExportTotalAdvWeak(examPlanId);
  18. return new FileContentResult(fileBytes, "application/octet-stream")
  19. {
  20. FileDownloadName = fileName,
  21. };
  22. }
  23. }