namespace YBEE.EQM.Application; /// /// 统计报表之分数段报表服务 /// [ApiDescriptionSettings(Name = "exam-reporting-avg-range")] [Route("exam/reporting/avg/range")] public class ExamReportingAvgRangeAppService(IExamReportingAvgRangeService examReportingAvgRangeService) : IDynamicApiController { /// /// 导出全区表格 /// /// 监测计划ID /// public async Task ExportTotal([FromQuery][Required] int examPlanId) { var (fileName, fileBytes) = await examReportingAvgRangeService.ExportTotal(examPlanId); return new FileContentResult(fileBytes, "application/octet-stream") { FileDownloadName = fileName, }; } /// /// 导出各校分数段统计表 /// /// 监测计划ID /// /// public async Task ExportOrg([FromQuery][Required] int examPlanId) { var (fileName, fileBytes) = await examReportingAvgRangeService.ExportOrg(examPlanId); return new FileContentResult(fileBytes, "application/octet-stream") { FileDownloadName = fileName, }; } }