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