EducationStageYearsAppService.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using YBEE.EQM.Core;
  2. namespace YBEE.EQM.Application;
  3. /// <summary>
  4. /// 学制管理服务
  5. /// </summary>
  6. [ApiDescriptionSettings(Name = "base-education-stage-years")]
  7. [Route("base/education-stage/years")]
  8. public class EducationStageYearsAppService : IDynamicApiController
  9. {
  10. private readonly IEducationStageYearsService _educationStageYearsService;
  11. public EducationStageYearsAppService(IEducationStageYearsService educationStageYearsService)
  12. {
  13. _educationStageYearsService = educationStageYearsService;
  14. }
  15. /// <summary>
  16. /// 根据学段获取学制
  17. /// </summary>
  18. /// <param name="educationStage"></param>
  19. /// <returns></returns>
  20. public async Task<EducationStageYearsOutput> GetByEducationStage([FromQuery][Required] EducationStage educationStage)
  21. {
  22. return await _educationStageYearsService.GetByEducationStage(educationStage);
  23. }
  24. /// <summary>
  25. /// 获取学制列表
  26. /// </summary>
  27. /// <returns></returns>
  28. public async Task<List<EducationStageYearsOutput>> GetAllList()
  29. {
  30. return await _educationStageYearsService.GetAllList();
  31. }
  32. }