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