using YBEE.EQM.Core;
namespace YBEE.EQM.Application;
///
/// 年级信息服务
///
[ApiDescriptionSettings(Name = "base-grade")]
[Route("base/grade")]
public class GradeAppService : IDynamicApiController
{
private readonly IGradeService _gradeService;
public GradeAppService(IGradeService gradeService)
{
_gradeService = gradeService;
}
///
/// 根据ID获取年级信息
///
///
///
public async Task GetById([FromQuery][Required] int id)
{
return await _gradeService.GetById(id);
}
///
/// 根据学段获取年级列表
///
///
///
public async Task> GetListByEducationStage([FromQuery][Required] EducationStage stage)
{
return await _gradeService.GetListByEducationStage(stage);
}
///
/// 根据学期和学段获取年级年份
///
///
///
public async Task> QueryGradeYearList(QueryGradeYearInput input)
{
return await _gradeService.QueryGradeYearList(input);
}
///
/// 获取全部年级列表
///
///
public async Task> GetAllList()
{
return await _gradeService.GetAllList();
}
}