ExamGradeAppService.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. namespace YBEE.EQM.Application;
  2. /// <summary>
  3. /// 监测年级管理服务
  4. /// </summary>
  5. [ApiDescriptionSettings(Name = "exam-grade")]
  6. [Route("exam/grade")]
  7. public class ExamGradeAppService : IDynamicApiController
  8. {
  9. private readonly IExamGradeService _examGradeService;
  10. public ExamGradeAppService(IExamGradeService examGradeService)
  11. {
  12. _examGradeService = examGradeService;
  13. }
  14. /// <summary>
  15. /// 批量添加监测年级
  16. /// </summary>
  17. /// <param name="input"></param>
  18. /// <returns></returns>
  19. public async Task AddList(AddExamGradeListInput input)
  20. {
  21. await _examGradeService.AddList(input);
  22. }
  23. /// <summary>
  24. /// 移出监测年级
  25. /// </summary>
  26. /// <param name="input"></param>
  27. /// <returns></returns>
  28. public async Task Remove(DelExamGradeInput input)
  29. {
  30. await _examGradeService.Remove(input);
  31. }
  32. /// <summary>
  33. /// 保存监测年级设置
  34. /// </summary>
  35. /// <param name="input"></param>
  36. /// <returns></returns>
  37. public async Task SaveSetting(ExamGradeSettingInput input)
  38. {
  39. await _examGradeService.SaveSetting(input);
  40. }
  41. /// <summary>
  42. /// 根据ID获取监测年级
  43. /// </summary>
  44. /// <param name="id"></param>
  45. /// <returns></returns>
  46. public async Task<ExamGradeOutput> GetById(int id)
  47. {
  48. return await _examGradeService.GetById(id);
  49. }
  50. /// <summary>
  51. /// 根据监测计划ID获取全部监测年级
  52. /// </summary>
  53. /// <param name="examPlanId"></param>
  54. /// <returns></returns>
  55. public async Task<List<ExamGradeOutput>> GetListByExamPlanId([FromQuery][Required] int examPlanId)
  56. {
  57. return await _examGradeService.GetListByExamPlanId(examPlanId);
  58. }
  59. }