ExamScoreExportAppService.cs 726 B

12345678910111213141516171819202122
  1. namespace YBEE.EQM.Application;
  2. /// <summary>
  3. /// 导出成绩服务
  4. /// </summary>
  5. /// <param name="examScoreExportService"></param>
  6. public class ExamScoreExportAppService(IExamScoreExportService examScoreExportService) : IDynamicApiController
  7. {
  8. /// <summary>
  9. /// 导出TQES输入文件
  10. /// </summary>
  11. /// <param name="input">监测计划ID</param>
  12. /// <returns></returns>
  13. public async Task<IActionResult> ExportTqesFile(ExamScoreExportTqesFileInput input)
  14. {
  15. var (fileName, fileBytes) = await examScoreExportService.ExportTqesFile(input);
  16. return new FileContentResult(fileBytes, "application/octet-stream")
  17. {
  18. FileDownloadName = fileName,
  19. };
  20. }
  21. }