ExamPatriarchQuestionnaireProgressAppService.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using YBEE.EQM.Core;
  2. namespace YBEE.EQM.Application;
  3. /// <summary>
  4. /// 家长问卷填答进度管理服务
  5. /// </summary>
  6. [ApiDescriptionSettings(Name = "exam-patriarch-questionnaire-progress")]
  7. [Route("exam/patriarch/questionnaire/progress")]
  8. public class ExamPatriarchQuestionnaireProgressAppService : IDynamicApiController
  9. {
  10. private readonly IExamPatriarchQuestionnaireProgressService _examPatriarchQuestionnaireProgressService;
  11. public ExamPatriarchQuestionnaireProgressAppService(IExamPatriarchQuestionnaireProgressService examPatriarchQuestionnaireProgressService)
  12. {
  13. _examPatriarchQuestionnaireProgressService = examPatriarchQuestionnaireProgressService;
  14. }
  15. /// <summary>
  16. /// 查询学生家长问卷明细
  17. /// </summary>
  18. /// <param name="input"></param>
  19. /// <returns></returns>
  20. public async Task<PageResult<ExamStudentPatriarchQuestionnaireProgressOutput>> QueryPageList(ExamStudentPatriarchQuestionnaireProgressPageInput input)
  21. {
  22. return await _examPatriarchQuestionnaireProgressService.QueryPageList(input);
  23. }
  24. /// <summary>
  25. /// 导出未填答学生名单
  26. /// </summary>
  27. /// <param name="input"></param>
  28. /// <returns></returns>
  29. public async Task<IActionResult> ExportUncompletedExcel(ExportExamPatriarchQuestionnaireProgressInput input)
  30. {
  31. var bs = await _examPatriarchQuestionnaireProgressService.ExportUncompletedExcel(input);
  32. return new FileContentResult(bs, "application/octet-stream")
  33. {
  34. FileDownloadName = "学生家长问卷未填答名单.xlsx",
  35. };
  36. }
  37. /// <summary>
  38. /// 获取各班级问卷填答进度
  39. /// </summary>
  40. /// <param name="examPlanId"></param>
  41. /// <returns></returns>
  42. public async Task<List<ExamStudentPatriarchQuestionnaireProgressStatOutput>> GetProgressList([FromQuery][Required] int examPlanId)
  43. {
  44. return await _examPatriarchQuestionnaireProgressService.GetProgressList(examPlanId);
  45. }
  46. }