/// <summary> /// 获取可预见的年份 /// <para>作 者:zhiwei.Tang</para> /// <para>创建时间:2019-02-20</para> /// </summary> public static List <int> GetPredictYears(string schoolId) { var years = new TblDatHolidayRepository() .Get(schoolId) .Result .Select(x => x.Year) .ToList(); return(PredictYear.Get(years)); }
/// <summary> /// 根据校区编号获取可预见的年份 /// <para>作 者:Huang GaoLiang </para> /// <para>创建时间:2018-09-07 </para> /// </summary> /// <param name="schoolId">校区编号</param> /// <returns>返回年度编号集合</returns> /// <exception cref="AMS.Core.BussinessException"> /// 异常ID:9,校区编号为空 /// </exception> public static List <int> GetPredictYears(string schoolId) { // 如果校区编号为空 if (string.IsNullOrWhiteSpace(schoolId)) { throw new BussinessException((byte)ModelType.Datum, 9); } //获取当前校区授权学期下的年份 TblDatTermRepository termRepository = new TblDatTermRepository(); List <int> yearList = termRepository.GetShoolNoByTblDatTerm(schoolId) .OrderByDescending(m => m.CreateTime) .Select(m => m.Year) .Distinct() .ToList(); return(PredictYear.Get(yearList)); }