/// <summary> /// 取学年学期未征订的学生用书申报 /// </summary> /// <param name="term"></param> /// <returns></returns> public List <StudentDeclarationJiaoWu> GetNotSubscriptionStudentDeclarationJiaoWu(string term) { //学年学期 var yearTerm = new SchoolYearTerm(term); var context1 = _stuDeclJiaoWuRepo.Context; var context2 = _stuDeclRepo.Context; //是否归档等于0 var query = _stuDeclJiaoWuRepo.Find(t => t.SchoolYearTerm.Year == yearTerm.Year && t.SchoolYearTerm.Term == yearTerm.Term && t.Sfgd == "0" //0确认征订教材,2确认不要教材,1确认取消教材 ); //已征订 var decl = _stuDeclRepo.Find(t => t.DeclarationJiaoWu.SchoolYearTerm.Year == yearTerm.Year && t.DeclarationJiaoWu.SchoolYearTerm.Term == yearTerm.Term ).Select(d => d.ID); //未征订 var result = from d in query where !decl.Contains(d.ID) select d; return(result.ToList()); }