namespace YBEE.EQM.Application; /// /// 高中模拟分析导出服务 /// [ApiDescriptionSettings(Name = "ncee-export")] [Route("ncee/export")] public class NceeExportAppService(INceeExportService nceeExportService) : IDynamicApiController { private readonly INceeExportService _nceeExportService = nceeExportService; /// /// 导出联盟区县模拟划线报表 /// /// /// public async Task ExportAllianceDistrict([FromQuery][Required] int nceePlanId) { var (fileName, fileBytes) = await _nceeExportService.ExportAllianceDistrict(nceePlanId); return new FileContentResult(fileBytes, "application/octet-stream") { FileDownloadName = fileName, }; } /// /// 导出已选科的模拟划线报表 /// /// 导出参数 /// public async Task ExportDirectionSeleted(NceeExportInput input) { var (fileName, fileBytes) = await _nceeExportService.ExportDirectionSeleted(input); return new FileContentResult(fileBytes, "application/octet-stream") { FileDownloadName = fileName, }; } /// /// 导出未选科的模拟划线报表 /// /// /// public async Task ExportDirectionUnseleted([FromQuery][Required] int nceePlanId) { var (fileName, fileBytes) = await _nceeExportService.ExportDirectionUnseleted(nceePlanId); return new FileContentResult(fileBytes, "application/octet-stream") { FileDownloadName = fileName, }; } }