/// <summary> /// 取教师用书申报 /// </summary> /// <param name="courId">课程ID</param> /// <param name="depaId">部门ID</param> /// <param name="term">学年学期</param> /// <returns></returns> private List <DeclarationJiaoWu> GetTeacherDeclarations(Guid courId, Guid depaId, string term) { var yearTerm = new SchoolYearTerm(term); var declarations = _teacherRepo.Find(t => t.SchoolYearTerm.Year == yearTerm.Year && t.SchoolYearTerm.Term == yearTerm.Term && t.Course_Id == courId && t.Department_Id == depaId ); return(declarations.Cast <DeclarationJiaoWu>().ToList()); }
/// <summary> /// 取学年学期未征订的教师用书申报 /// </summary> /// <param name="term"></param> /// <returns></returns> public List <TeacherDeclarationJiaoWu> GetNotSubscriptionTeacherDeclarationJiaoWu(string term) { //学年学期 var yearTerm = new SchoolYearTerm(term); //是否归档等于4 var query = _teaDeclJiaoWuRepo.Find(t => t.SchoolYearTerm.Year == yearTerm.Year && t.SchoolYearTerm.Term == yearTerm.Term && t.Sfgd == "4" //0申报中,1学院审核中,2教材科审核中,3教务处审核中,4审核完成,A学院审核未通过,B教学建设科审核未通过,C教务处审核未通过 ); //已征订 var decl = _teaDeclRepo.Find(t => t.DeclarationJiaoWu.SchoolYearTerm.Year == yearTerm.Year && t.DeclarationJiaoWu.SchoolYearTerm.Term == yearTerm.Term ).Select(t => t.ID); //未征订 var result = from d in query where !decl.Contains(d.ID) select d; return(result.ToList()); }