ExamSpecialStudentCenterAppService.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using YBEE.EQM.Core;
  2. namespace YBEE.EQM.Application;
  3. /// <summary>
  4. /// 特殊学生管理服务(用于中心管理)
  5. /// </summary>
  6. [ApiDescriptionSettings(Name = "exam-special-student-center")]
  7. [Route("exam/special/student/center")]
  8. public class ExamSpecialStudentCenterAppService(IExamSpecialStudentCenterService examSpecialStudentCenterService) : IDynamicApiController
  9. {
  10. /// <summary>
  11. /// 分页查询列表
  12. /// </summary>
  13. /// <param name="input"></param>
  14. /// <returns></returns>
  15. public async Task<PageResult<ExamSpecialStudentFullOutput>> QueryPageList(ExamSpecialStudentPageInput input)
  16. {
  17. return await examSpecialStudentCenterService.QueryPageList(input);
  18. }
  19. /// <summary>
  20. /// 获取状态数量
  21. /// </summary>
  22. /// <returns></returns>
  23. public async Task<List<StatusCount>> QueryStatusCount(ExamSpecialStudentPageInput input)
  24. {
  25. return await examSpecialStudentCenterService.QueryStatusCount(input);
  26. }
  27. /// <summary>
  28. /// 导出数据表格(简表)
  29. /// </summary>
  30. /// <param name="input"></param>
  31. /// <returns></returns>
  32. public async Task<IActionResult> ExportSimple(ExamSpecialStudentPageInput input)
  33. {
  34. var (fileName, fileBytes) = await examSpecialStudentCenterService.ExportSimple(input);
  35. return new FileContentResult(fileBytes, "application/octet-stream")
  36. {
  37. FileDownloadName = fileName,
  38. };
  39. }
  40. /// <summary>
  41. /// 导出数据表格(完整)
  42. /// </summary>
  43. /// <param name="input"></param>
  44. /// <returns></returns>
  45. public async Task<IActionResult> ExportFull(ExamSpecialStudentPageInput input)
  46. {
  47. var (fileName, fileBytes) = await examSpecialStudentCenterService.ExportFull(input);
  48. return new FileContentResult(fileBytes, "application/octet-stream")
  49. {
  50. FileDownloadName = fileName,
  51. };
  52. }
  53. }