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