1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Linq.Expressions;
- using EMIS.Entities;
- using EMIS.ViewModel;
- using EMIS.ViewModel.CultureplanManage;
- using EMIS.ViewModel.CultureplanManage.PlanManagement;
- using EMIS.ViewModel.UniversityManage.SpecialtyClassManage;
- using EMIS.ViewModel.Students;
- using EMIS.DataLogic.Repositories;
- using EMIS.DataLogic.UniversityManage.SpecialtyClassManage;
- namespace EMIS.DataLogic.CultureplanManage.PlanManagement
- {
- public class SpecialtyPlanDAL
- {
- public SpecialtyPlanRepository SpecialtyPlanRepository { get; set; }
- public SpecialtyPlanTeachingSettingRepository SpecialtyPlanTeachingSettingRepository { get; set; }
- public SpecialtyPlanTeachingModeTypeRepository SpecialtyPlanTeachingModeTypeRepository { get; set; }
- public SpecialtyPlanTeachingPlaceRepository SpecialtyPlanTeachingPlaceRepository { get; set; }
- public SchoolyearRepository SchoolyearRepository { get; set; }
- public CoursematerialRepository CoursematerialRepository { get; set; }
- public DepartmentRepository DepartmentRepository { get; set; }
- public GrademajorRepository GrademajorRepository { get; set; }
- public ClassmajorRepository ClassmajorRepository { get; set; }
- public StudentRepository StudentRepository { get; set; }
- public UserRepository UserRepository { get; set; }
- public FacultymajorRepository FacultymajorRepository { get; set; }
- public CollegeRepository CollegeRepository { get; set; }
- public CampusRepository CampusRepository { get; set; }
- public SpecialtyRepository SpecialtyRepository { get; set; }
- public SpecialtyCourseRepository SpecialtyCourseRepository { get; set; }
- public SpecialtyCourseTeachingSettingRepository SpecialtyCourseTeachingSettingRepository { get; set; }
- public ExecutablePlanRepository ExecutablePlanRepository { get; set; }
- public DictionaryItemRepository DictionaryItemRepository { get; set; }
- /// <summary>
- /// 查询专业计划信息SpecialtyPlanView
- /// 注:普教版本(年级专业)
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<SpecialtyPlanView> GetSpecialtyPlanViewQueryable(Expression<Func<EM_SpecialtyPlan, bool>> exp)
- {
- var query = from sp in SpecialtyPlanRepository.GetList(exp)
- join spst in SpecialtyPlanTeachingSettingRepository.Entities
- on sp.SpecialtyPlanID equals spst.SpecialtyPlanID into tempspst
- from spspst in tempspst.DefaultIfEmpty()
- join sy in SchoolyearRepository.Entities
- on sp.SchoolyearID equals sy.SchoolyearID
- join cou in CoursematerialRepository.Entities
- on sp.CoursematerialID equals cou.CoursematerialID
- join dep in DepartmentRepository.Entities
- on sp.DepartmentID equals dep.DepartmentID into tempdep
- from spdep in tempdep.DefaultIfEmpty()
- join gr in GrademajorRepository.Entities
- on sp.GrademajorID equals gr.GrademajorID
- join stsy in SchoolyearRepository.Entities
- on new { SchoolyearID = gr.GradeID.Value, SchoolcodeID = gr.SemesterID.Value }
- equals new { SchoolyearID = stsy.Years, SchoolcodeID = stsy.SchoolcodeID } into tempstsy
- from startsy in tempstsy.DefaultIfEmpty()
- join grsy in SchoolyearRepository.Entities
- on gr.GraduateSchoolyearID equals grsy.SchoolyearID into tempgrsy
- from gradsy in tempgrsy.DefaultIfEmpty()
- join fa in FacultymajorRepository.Entities
- on gr.FacultymajorID equals fa.FacultymajorID
- join spe in SpecialtyRepository.Entities
- on new { StandardID = fa.StandardID, EducationID = fa.EducationID, LearningformID = fa.LearningformID, LearnSystem = fa.LearnSystem }
- equals new { StandardID = spe.StandardID, EducationID = spe.EducationID, LearningformID = spe.LearningformID, LearnSystem = spe.LearnSystem }
- join dicst in DictionaryItemRepository.GetList(x => x.DictionaryCode == typeof(CF_Standard).Name)
- on fa.StandardID equals dicst.Value into tempst
- from fast in tempst.DefaultIfEmpty()
- join col in CollegeRepository.Entities
- on fa.CollegeID equals col.CollegeID
- join cam in CampusRepository.Entities
- on col.CampusID equals cam.CampusID
- select new SpecialtyPlanView
- {
- SpecialtyPlanID = sp.SpecialtyPlanID,
- PlanApplicationID = sp.PlanApplicationID,
- SchoolyearID = sp.SchoolyearID,
- SchoolyearCode = sy.Code,
- YearID = sy.Years,
- Value = sy.Value,
- SchoolyearNumID = (sy.Value - ((gr.GradeID * 2 - 1) + gr.SemesterID - 1)) / 2 + 1,
- SchoolcodeID = sy.SchoolcodeID,
- StarttermID = sy.Value - ((gr.GradeID * 2 - 1) + gr.SemesterID - 1) + 1,
- GrademajorID = sp.GrademajorID,
- GrademajorCode = gr.Code,
- GrademajorName = gr.Name,
- GradeID = gr.GradeID,
- FacultymajorID = gr.FacultymajorID,
- FacultymajorCode = fa.Code,
- FacultymajorName = fa.Name,
- CollegeID = fa.CollegeID,
- CollegeCode = col.No,
- CollegeName = col.Name,
- CampusID = col.CampusID,
- CampusNo = cam.No,
- CampusName = cam.Name,
- StartSchoolyearID = startsy.SchoolyearID,
- StartSchoolyearCode = startsy.Code,
- StartValue = startsy.Value,
- StartSchoolcodeID = gr.SemesterID,
- GraduatingSemesterID = gr.GraduateSchoolyearID,
- GraduatingSemesterCode = gradsy.Code,
- GraduatingSemesterValue = gradsy.Value,
- SpecialtyID = spe.SpecialtyID,
- StandardID = fa.StandardID,
- StandardName = fast.Name,
- EducationID = fa.EducationID,
- LearningformID = fa.LearningformID,
- LearnSystem = fa.LearnSystem,
- CoursematerialID = sp.CoursematerialID,
- CourseCode = cou.CourseCode,
- CourseName = cou.CourseName,
- CourseStructureID = sp.CourseStructureID,
- CourseCategoryID = sp.CourseCategoryID,
- CourseTypeID = sp.CourseTypeID,
- CourseQualityID = sp.CourseQualityID,
- Credit = spspst.Credit ?? 0,
- TheoryCourse = spspst.TheoryCourse ?? 0,
- Practicehours = spspst.Practicehours ?? 0,
- Trialhours = spspst.Trialhours ?? 0,
- Totalhours = (spspst.TheoryCourse ?? 0) + (spspst.Practicehours ?? 0),
- TheoryWeeklyNum = spspst.TheoryWeeklyNum ?? 0,
- PracticeWeeklyNum = spspst.PracticeWeeklyNum ?? 0,
- TrialWeeklyNum = spspst.TrialWeeklyNum ?? 0,
- SchoolweeksNum = (spspst.TheoryWeeklyNum ?? 0) + (spspst.PracticeWeeklyNum ?? 0),
- WeeklyHours = spspst.WeeklyHours ?? 0,
- WeeklyNum = spspst.WeeklyNum ?? 0,
- StartWeeklyNum = spspst.StartWeeklyNum ?? 0,
- EndWeeklyNum = spspst.EndWeeklyNum ?? 0,
- StartEndWeeklyNum = (spspst.StartWeeklyNum ?? 0) + "-" + (spspst.EndWeeklyNum ?? 0),
- DepartmentID = sp.DepartmentID,
- DepartmentCode = spdep.No,
- DepartmentName = spdep.Name,
- CourseCollegeID = spdep.CollegeID,
- CourseCollegeCode = spdep.CF_College.No,
- CourseCollegeName = spdep.CF_College.Name,
- IsSpecialtycore = sp.IsSpecialtycore ?? false,
- IsCooperation = sp.IsCooperation ?? false,
- IsRequired = sp.IsRequired ?? false,
- IsElective = sp.IsElective ?? false,
- IsNetworkCourse = sp.IsNetworkCourse ?? false,
- IsMainCourse = sp.IsMainCourse ?? false,
- IsNeedMaterial = sp.IsNeedMaterial ?? false,
- CourseFineID = sp.CourseFineID,
- PracticeTypeID = sp.PracticeTypeID,
- TeachinglanguageID = sp.TeachinglanguageID,
- ExaminationModeID = sp.ExaminationModeID,
- ResultTypeID = sp.ResultTypeID,
- HandleModeID = sp.HandleModeID,
- TeachingModeIDList = sp.EM_SpecialtyPlanTeachingModeType.Select(x => x.TeachingModeID).ToList(),
- TeachingPlaceIDList = sp.EM_SpecialtyPlanTeachingPlace.Select(x => x.TeachingPlace).ToList(),
- PlanStatus = sp.EM_ExecutablePlan.Count() > 0 ? (int)EM_PlanStatus.Execute : (int)EM_PlanStatus.NotExecute,
- Remark = sp.Remark,
- RecordStatus = sp.RecordStatus,
- CreateUserID = sp.CreateUserID,
- CreateTime = sp.CreateTime,
- ModifyUserID = sp.ModifyUserID,
- ModifyTime = sp.ModifyTime
- };
- return query;
- }
- /// <summary>
- /// 查询专业计划信息SpecialtyPlanView(统计对应的计划范围、学生人数)
- /// 注:普教版本(年级专业)
- /// </summary>
- /// <param name="expSpecialtyPlan"></param>
- /// <param name="expStudent"></param>
- /// <returns></returns>
- public IQueryable<SpecialtyPlanView> GetSpecialtyPlanViewQueryable(Expression<Func<EM_SpecialtyPlan, bool>> expSpecialtyPlan,
- Expression<Func<CF_Student, bool>> expStudent)
- {
- var query = from sp in SpecialtyPlanRepository.GetList(expSpecialtyPlan)
- join spst in SpecialtyPlanTeachingSettingRepository.Entities
- on sp.SpecialtyPlanID equals spst.SpecialtyPlanID into tempspst
- from spspst in tempspst.DefaultIfEmpty()
- join sy in SchoolyearRepository.Entities
- on sp.SchoolyearID equals sy.SchoolyearID
- join cou in CoursematerialRepository.Entities
- on sp.CoursematerialID equals cou.CoursematerialID
- join dep in DepartmentRepository.Entities
- on sp.DepartmentID equals dep.DepartmentID into tempdep
- from spdep in tempdep.DefaultIfEmpty()
- join gr in GrademajorRepository.Entities
- on sp.GrademajorID equals gr.GrademajorID
- join stsy in SchoolyearRepository.Entities
- on new { SchoolyearID = gr.GradeID.Value, SchoolcodeID = gr.SemesterID.Value }
- equals new { SchoolyearID = stsy.Years, SchoolcodeID = stsy.SchoolcodeID } into tempstsy
- from startsy in tempstsy.DefaultIfEmpty()
- join grsy in SchoolyearRepository.Entities
- on gr.GraduateSchoolyearID equals grsy.SchoolyearID into tempgrsy
- from gradsy in tempgrsy.DefaultIfEmpty()
- join fa in FacultymajorRepository.Entities
- on gr.FacultymajorID equals fa.FacultymajorID
- join spe in SpecialtyRepository.Entities
- on new { StandardID = fa.StandardID, EducationID = fa.EducationID, LearningformID = fa.LearningformID, LearnSystem = fa.LearnSystem }
- equals new { StandardID = spe.StandardID, EducationID = spe.EducationID, LearningformID = spe.LearningformID, LearnSystem = spe.LearnSystem }
- join dicst in DictionaryItemRepository.GetList(x => x.DictionaryCode == typeof(CF_Standard).Name)
- on fa.StandardID equals dicst.Value into tempst
- from fast in tempst.DefaultIfEmpty()
- join col in CollegeRepository.Entities
- on fa.CollegeID equals col.CollegeID
- join cam in CampusRepository.Entities
- on col.CampusID equals cam.CampusID
- join pr in
- (
- from cl in ClassmajorRepository.Entities
- group cl by cl.GrademajorID into gpr
- select new
- {
- GrademajorID = gpr.Key,
- PlanRange = gpr.Count()
- }
- )
- on gr.GrademajorID equals pr.GrademajorID into temppr
- from grpr in temppr.DefaultIfEmpty()
- join stu in
- (
- from stu in StudentRepository.GetList(expStudent)
- group stu by stu.CF_Classmajor.CF_Grademajor.GrademajorID into gstu
- select new
- {
- GrademajorID = gstu.Key,
- StudentCount = gstu.Count()
- }
- )
- on gr.GrademajorID equals stu.GrademajorID into tempstu
- from grstu in tempstu.DefaultIfEmpty()
- select new SpecialtyPlanView
- {
- SpecialtyPlanID = sp.SpecialtyPlanID,
- PlanApplicationID = sp.PlanApplicationID,
- SchoolyearID = sp.SchoolyearID,
- SchoolyearCode = sy.Code,
- YearID = sy.Years,
- Value = sy.Value,
- SchoolyearNumID = (sy.Value - ((gr.GradeID * 2 - 1) + gr.SemesterID - 1)) / 2 + 1,
- SchoolcodeID = sy.SchoolcodeID,
- StarttermID = sy.Value - ((gr.GradeID * 2 - 1) + gr.SemesterID - 1) + 1,
- GrademajorID = sp.GrademajorID,
- GrademajorCode = gr.Code,
- GrademajorName = gr.Name,
- GradeID = gr.GradeID,
- FacultymajorID = gr.FacultymajorID,
- FacultymajorCode = fa.Code,
- FacultymajorName = fa.Name,
- CollegeID = fa.CollegeID,
- CollegeCode = col.No,
- CollegeName = col.Name,
- CampusID = col.CampusID,
- CampusNo = cam.No,
- CampusName = cam.Name,
- StartSchoolyearID = startsy.SchoolyearID,
- StartSchoolyearCode = startsy.Code,
- StartValue = startsy.Value,
- StartSchoolcodeID = gr.SemesterID,
- GraduatingSemesterID = gr.GraduateSchoolyearID,
- GraduatingSemesterCode = gradsy.Code,
- GraduatingSemesterValue = gradsy.Value,
- SpecialtyID = spe.SpecialtyID,
- StandardID = fa.StandardID,
- StandardName = fast.Name,
- EducationID = fa.EducationID,
- LearningformID = fa.LearningformID,
- LearnSystem = fa.LearnSystem,
- CoursematerialID = sp.CoursematerialID,
- CourseCode = cou.CourseCode,
- CourseName = cou.CourseName,
- CourseStructureID = sp.CourseStructureID,
- CourseCategoryID = sp.CourseCategoryID,
- CourseTypeID = sp.CourseTypeID,
- CourseQualityID = sp.CourseQualityID,
- Credit = spspst.Credit ?? 0,
- TheoryCourse = spspst.TheoryCourse ?? 0,
- Practicehours = spspst.Practicehours ?? 0,
- Trialhours = spspst.Trialhours ?? 0,
- Totalhours = (spspst.TheoryCourse ?? 0) + (spspst.Practicehours ?? 0),
- TheoryWeeklyNum = spspst.TheoryWeeklyNum ?? 0,
- PracticeWeeklyNum = spspst.PracticeWeeklyNum ?? 0,
- TrialWeeklyNum = spspst.TrialWeeklyNum ?? 0,
- SchoolweeksNum = (spspst.TheoryWeeklyNum ?? 0) + (spspst.PracticeWeeklyNum ?? 0),
- WeeklyHours = spspst.WeeklyHours ?? 0,
- WeeklyNum = spspst.WeeklyNum ?? 0,
- StartWeeklyNum = spspst.StartWeeklyNum ?? 0,
- EndWeeklyNum = spspst.EndWeeklyNum ?? 0,
- StartEndWeeklyNum = (spspst.StartWeeklyNum ?? 0) + "-" + (spspst.EndWeeklyNum ?? 0),
- DepartmentID = sp.DepartmentID,
- DepartmentCode = spdep.No,
- DepartmentName = spdep.Name,
- CourseCollegeID = spdep.CollegeID,
- CourseCollegeCode = spdep.CF_College.No,
- CourseCollegeName = spdep.CF_College.Name,
- IsSpecialtycore = sp.IsSpecialtycore ?? false,
- IsCooperation = sp.IsCooperation ?? false,
- IsRequired = sp.IsRequired ?? false,
- IsElective = sp.IsElective ?? false,
- IsNetworkCourse = sp.IsNetworkCourse ?? false,
- IsMainCourse = sp.IsMainCourse ?? false,
- IsNeedMaterial = sp.IsNeedMaterial ?? false,
- CourseFineID = sp.CourseFineID,
- PracticeTypeID = sp.PracticeTypeID,
- TeachinglanguageID = sp.TeachinglanguageID,
- ExaminationModeID = sp.ExaminationModeID,
- ResultTypeID = sp.ResultTypeID,
- HandleModeID = sp.HandleModeID,
- TeachingModeIDList = sp.EM_SpecialtyPlanTeachingModeType.Select(x => x.TeachingModeID).ToList(),
- TeachingPlaceIDList = sp.EM_SpecialtyPlanTeachingPlace.Select(x => x.TeachingPlace).ToList(),
- PlanRange = grpr.PlanRange == null ? 0 : grpr.PlanRange,
- StudentCount = grstu.StudentCount == null ? 0 : grstu.StudentCount,
- PlanStatus = sp.EM_ExecutablePlan.Count() > 0 ? (int)EM_PlanStatus.Execute : (int)EM_PlanStatus.NotExecute,
- Remark = sp.Remark,
- RecordStatus = sp.RecordStatus,
- CreateUserID = sp.CreateUserID,
- CreateTime = sp.CreateTime,
- ModifyUserID = sp.ModifyUserID,
- ModifyTime = sp.ModifyTime
- };
- return query;
- }
- /// <summary>
- /// 查询对应的计划范围信息(根据专业计划信息,统计各班级信息对应的学生人数)
- /// 注:普教版本(年级专业)
- /// </summary>
- /// <param name="expSpecialtyPlan"></param>
- /// <param name="expStudent"></param>
- /// <returns></returns>
- public IQueryable<ClassmajorView> GetPlanRangeViewQueryable(Expression<Func<EM_SpecialtyPlan, bool>> expSpecialtyPlan,
- Expression<Func<CF_Student, bool>> expStudent)
- {
- var query = from sp in SpecialtyPlanRepository.GetList(expSpecialtyPlan)
- join gr in GrademajorRepository.Entities
- on sp.GrademajorID equals gr.GrademajorID
- join cl in ClassmajorRepository.Entities
- on gr.GrademajorID equals cl.GrademajorID
- join fa in FacultymajorRepository.Entities
- on gr.FacultymajorID equals fa.FacultymajorID
- join col in CollegeRepository.Entities
- on fa.CollegeID equals col.CollegeID
- join sc in
- (
- from stu in StudentRepository.GetList(expStudent)
- group stu by stu.CF_Classmajor.ClassmajorID into gstu
- select new
- {
- ClassmajorID = gstu.Key,
- StudentCount = gstu.Count()
- })
- on cl.ClassmajorID equals sc.ClassmajorID into tempsc
- from clsc in tempsc.DefaultIfEmpty()
- join us in UserRepository.Entities
- on cl.UserID equals us.UserID into tempus
- from clus in tempus.DefaultIfEmpty()
- join au in UserRepository.Entities
- on cl.AssistantUserID equals au.UserID into tempau
- from clau in tempau.DefaultIfEmpty()
- select new ClassmajorView
- {
- ClassmajorID = cl.ClassmajorID,
- No = cl.No,
- Name = cl.Name,
- Abbreviation = cl.Abbreviation,
- EnglishName = cl.EnglishName,
- ClassNum = cl.ClassNum,
- FacultymajorID = gr.FacultymajorID,
- FacultymajorCode = fa.Code,
- FacultymajorName = fa.Name,
- GrademajorID = gr.GrademajorID,
- GrademajorCode = gr.Code,
- GrademajorName = gr.Name,
- CampusID = col.CampusID,
- CampusNo = col.CF_Campus.No,
- CampusName = col.CF_Campus.Name,
- CollegeID = fa.CollegeID,
- CollegeCode = col.No,
- CollegeName = col.Name,
- GradeID = gr.GradeID,
- SemesterID = gr.SemesterID,
- StandardID = fa.StandardID,
- EducationID = fa.EducationID,
- LearningformID = fa.LearningformID,
- LearnSystem = fa.LearnSystem,
- GraduateSchoolyearID = gr.GraduateSchoolyearID,
- GraduateValue = gr.CF_Schoolyear.Value,
- GraduateSchoolyearCode = gr.CF_Schoolyear.Code,
- UserID = cl.UserID,
- UserName = clus.Name,
- AssistantUserID = cl.AssistantUserID,
- AssistantUserName = clau.Name,
- Fixedclassroom = cl.Fixedclassroom,
- StudentCount = clsc.StudentCount == null ? 0 : clsc.StudentCount,
- Remark = cl.Remark,
- RecordStatus = cl.RecordStatus,
- CreateUserID = cl.CreateUserID,
- CreateTime = cl.CreateTime,
- ModifyUserID = cl.ModifyUserID,
- ModifyTime = cl.ModifyTime
- };
- return query;
- }
- /// <summary>
- /// 查询专业计划对应的学生信息BaseStudentView
- /// 注:普教版本(年级专业)
- /// </summary>
- /// <param name="expSpecialtyPlan"></param>
- /// <param name="expStudent"></param>
- /// <returns></returns>
- public IQueryable<BaseStudentView> GetBaseStudentViewQueryable(Expression<Func<EM_SpecialtyPlan, bool>> expSpecialtyPlan,
- Expression<Func<CF_Student, bool>> expStudent)
- {
- var query = from sp in SpecialtyPlanRepository.GetList(expSpecialtyPlan)
- join gr in GrademajorRepository.Entities
- on sp.GrademajorID equals gr.GrademajorID
- join fa in FacultymajorRepository.Entities
- on gr.FacultymajorID equals fa.FacultymajorID
- join col in CollegeRepository.Entities
- on fa.CollegeID equals col.CollegeID
- join cl in ClassmajorRepository.Entities
- on gr.GrademajorID equals cl.GrademajorID
- join stu in StudentRepository.GetList(expStudent)
- on cl.ClassmajorID equals stu.ClassmajorID
- join us in UserRepository.Entities
- on stu.UserID equals us.UserID
- select new BaseStudentView
- {
- UserID = stu.UserID,
- LoginID = us.LoginID,
- UserName = us.Name,
- SexID = stu.SexID,
- IDNumber = stu.IDNumber,
- StudentStatus = stu.StudentStatus,
- InSchoolStatusID = stu.InSchoolStatusID,
- ClassmajorID = stu.ClassmajorID,
- ClassmajorCode = cl.No,
- ClassmajorName = cl.Name,
- ClassNum = cl.ClassNum == null ? 1 : cl.ClassNum,
- SchoolyearID = gr.GradeID,
- GrademajorID = cl.GrademajorID,
- GrademajorCode = gr.Code,
- GrademajorName = gr.Name,
- FacultymajorID = gr.FacultymajorID,
- FacultymajorCode = fa.Code,
- FacultymajorName = fa.Name,
- CollegeID = fa.CollegeID,
- CollegeNo = col.No,
- CollegeName = col.Name
- };
- return query;
- }
- /// <summary>
- /// 查询对应的未新增专业课程信息
- /// 注:普教版本(年级专业)
- /// </summary>
- /// <param name="expSpecialtyCourse"></param>
- /// <param name="expGrademajor"></param>
- /// <param name="expSpecialtyPlan"></param>
- /// <returns></returns>
- public IQueryable<SpecialtyCourseView> GetSpecialtyCourseViewNoAddQueryable(Expression<Func<EM_SpecialtyCourse, bool>> expSpecialtyCourse,
- Expression<Func<CF_Grademajor, bool>> expGrademajor, Expression<Func<EM_SpecialtyPlan, bool>> expSpecialtyPlan)
- {
- var query = from sc in SpecialtyCourseRepository.GetList(expSpecialtyCourse)
- join spe in SpecialtyRepository.Entities
- on sc.SpecialtyID equals spe.SpecialtyID
- join fa in FacultymajorRepository.Entities
- on new { StandardID = spe.StandardID, EducationID = spe.EducationID, LearningformID = spe.LearningformID, LearnSystem = spe.LearnSystem }
- equals new { StandardID = fa.StandardID, EducationID = fa.EducationID, LearningformID = fa.LearningformID, LearnSystem = fa.LearnSystem }
- join gr in GrademajorRepository.GetList(expGrademajor)
- on fa.FacultymajorID equals gr.FacultymajorID
- join dicst in DictionaryItemRepository.GetList(x => x.DictionaryCode == typeof(CF_Standard).Name)
- on spe.StandardID equals dicst.Value into tempst
- from spest in tempst.DefaultIfEmpty()
- join cou in CoursematerialRepository.Entities
- on sc.CoursematerialID equals cou.CoursematerialID
- join scts in SpecialtyCourseTeachingSettingRepository.Entities
- on sc.SpecialtyCourseID equals scts.SpecialtyCourseID into tempscts
- from scscts in tempscts.DefaultIfEmpty()
- join dep in DepartmentRepository.Entities
- on sc.DepartmentID equals dep.DepartmentID into tempdep
- from scdep in tempdep.DefaultIfEmpty()
- join col in CollegeRepository.Entities
- on scdep.CollegeID equals col.CollegeID into tempcol
- from sccol in tempcol.DefaultIfEmpty()
- join sp in
- (
- from sp in SpecialtyPlanRepository.GetList(expSpecialtyPlan)
- join sy in SchoolyearRepository.Entities
- on sp.SchoolyearID equals sy.SchoolyearID
- join gr in GrademajorRepository.Entities
- on sp.GrademajorID equals gr.GrademajorID
- join fa in FacultymajorRepository.Entities
- on gr.FacultymajorID equals fa.FacultymajorID
- join spe in SpecialtyRepository.Entities
- on new { StandardID = fa.StandardID, EducationID = fa.EducationID, LearningformID = fa.LearningformID, LearnSystem = fa.LearnSystem }
- equals new { StandardID = spe.StandardID, EducationID = spe.EducationID, LearningformID = spe.LearningformID, LearnSystem = spe.LearnSystem }
- join spst in SpecialtyPlanTeachingSettingRepository.Entities
- on sp.SpecialtyPlanID equals spst.SpecialtyPlanID into tempspst
- from spspst in tempspst.DefaultIfEmpty()
- join dep in DepartmentRepository.Entities
- on sp.DepartmentID equals dep.DepartmentID into tempdep
- from spdep in tempdep.DefaultIfEmpty()
- select new
- {
- SpecialtyPlanID = sp.SpecialtyPlanID,
- SchoolyearNumID = (sy.Value - ((gr.GradeID * 2 - 1) + gr.SemesterID - 1)) / 2 + 1,
- SchoolcodeID = sy.SchoolcodeID,
- StarttermID = sy.Value - ((gr.GradeID * 2 - 1) + gr.SemesterID - 1) + 1,
- GrademajorID = sp.GrademajorID,
- GradeID = gr.GradeID,
- SpecialtyID = spe.SpecialtyID,
- StartSchoolcodeID = gr.SemesterID,
- CoursematerialID = sp.CoursematerialID,
- CourseTypeID = sp.CourseTypeID,
- Credit = spspst.Credit,
- DepartmentID = spdep.DepartmentID
- }
- )
- on new { GrademajorID = gr.GrademajorID, StarttermID = sc.StarttermID, CoursematerialID = sc.CoursematerialID }
- equals new { GrademajorID = sp.GrademajorID.Value, StarttermID = sp.StarttermID, CoursematerialID = sp.CoursematerialID } into tempsp
- from scsp in tempsp.DefaultIfEmpty()
- where scsp.SpecialtyPlanID == null
- select new SpecialtyCourseView
- {
- SpecialtyCourseID = sc.SpecialtyCourseID,
- SpecialtyID = sc.SpecialtyID,
- StandardID = spe.StandardID,
- StandardName = spest.Name,
- EducationID = spe.EducationID,
- LearningformID = spe.LearningformID,
- LearnSystem = spe.LearnSystem,
- StarttermID = sc.StarttermID,
- CoursematerialID = sc.CoursematerialID,
- CourseCode = cou.CourseCode,
- CourseName = cou.CourseName,
- CourseStructureID = sc.CourseStructureID,
- CourseCategoryID = sc.CourseCategoryID,
- CourseTypeID = sc.CourseTypeID,
- CourseQualityID = sc.CourseQualityID,
- Credit = scscts.Credit ?? 0,
- TheoryCourse = scscts.TheoryCourse ?? 0,
- Practicehours = scscts.Practicehours ?? 0,
- Trialhours = scscts.Trialhours ?? 0,
- Totalhours = (scscts.TheoryCourse ?? 0) + (scscts.Practicehours ?? 0),
- TheoryWeeklyNum = scscts.TheoryWeeklyNum ?? 0,
- PracticeWeeklyNum = scscts.PracticeWeeklyNum ?? 0,
- TrialWeeklyNum = scscts.TrialWeeklyNum ?? 0,
- SchoolweeksNum = (scscts.TheoryWeeklyNum ?? 0) + (scscts.PracticeWeeklyNum ?? 0),
- WeeklyHours = scscts.WeeklyHours ?? 0,
- WeeklyNum = scscts.WeeklyNum ?? 0,
- StartWeeklyNum = scscts.StartWeeklyNum ?? 0,
- EndWeeklyNum = scscts.EndWeeklyNum ?? 0,
- StartEndWeeklyNum = (scscts.StartWeeklyNum ?? 0) + "-" + (scscts.EndWeeklyNum ?? 0),
- DepartmentID = sc.DepartmentID,
- DepartmentCode = scdep.No,
- DepartmentName = scdep.Name,
- CollegeID = scdep.CollegeID,
- CollegeCode = sccol.No,
- CollegeName = sccol.Name,
- IsSpecialtycore = sc.IsSpecialtycore ?? false,
- IsCooperation = sc.IsCooperation ?? false,
- IsRequired = sc.IsRequired ?? false,
- IsElective = sc.IsElective ?? false,
- IsNetworkCourse = sc.IsNetworkCourse ?? false,
- IsMainCourse = sc.IsMainCourse ?? false,
- IsNeedMaterial = sc.IsNeedMaterial ?? false,
- CourseFineID = sc.CourseFineID,
- PracticeTypeID = sc.PracticeTypeID,
- TeachinglanguageID = sc.TeachinglanguageID,
- ExaminationModeID = sc.ExaminationModeID,
- ResultTypeID = sc.ResultTypeID,
- HandleModeID = sc.HandleModeID,
- TeachingModeIDList = sc.EM_TeachingModeType.Select(x => x.TeachingModeID).ToList(),
- TeachingPlaceIDList = sc.EM_TeachingPlace.Select(x => x.TeachingPlace).ToList(),
- IsEnable = sc.IsEnable ?? false,
- Remark = sc.Remark,
- RecordStatus = sc.RecordStatus,
- CreateUserID = sc.CreateUserID,
- CreateTime = sc.CreateTime,
- ModifyUserID = sc.ModifyUserID,
- ModifyTime = sc.ModifyTime
- };
- return query;
- }
- /// <summary>
- /// 查询专业计划信息SpecialtyPlanView
- /// 注:成教版本(入学学年学期、专业信息)
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<SpecialtyPlanView> GetAdultSpecialtyPlanViewQueryable(Expression<Func<EM_SpecialtyPlan, bool>> exp)
- {
- var query = from sp in SpecialtyPlanRepository.GetList(exp)
- join spst in SpecialtyPlanTeachingSettingRepository.Entities
- on sp.SpecialtyPlanID equals spst.SpecialtyPlanID into tempspst
- from spspst in tempspst.DefaultIfEmpty()
- join sy in SchoolyearRepository.Entities
- on sp.SchoolyearID equals sy.SchoolyearID
- join cou in CoursematerialRepository.Entities
- on sp.CoursematerialID equals cou.CoursematerialID
- join dep in DepartmentRepository.Entities
- on sp.DepartmentID equals dep.DepartmentID into tempdep
- from spdep in tempdep.DefaultIfEmpty()
- join startsy in SchoolyearRepository.Entities
- on sp.StartSchoolyearID equals startsy.SchoolyearID
- join spe in SpecialtyRepository.Entities
- on sp.SpecialtyID equals spe.SpecialtyID
- join dicst in DictionaryItemRepository.GetList(x => x.DictionaryCode == typeof(CF_Standard).Name)
- on spe.StandardID equals dicst.Value into tempst
- from spest in tempst.DefaultIfEmpty()
- select new SpecialtyPlanView
- {
- SpecialtyPlanID = sp.SpecialtyPlanID,
- PlanApplicationID = sp.PlanApplicationID,
- SchoolyearID = sp.SchoolyearID,
- SchoolyearCode = sy.Code,
- YearID = sy.Years,
- Value = sy.Value,
- SchoolyearNumID = (sy.Value - ((startsy.Years * 2 - 1) + startsy.SchoolcodeID - 1)) / 2 + 1,
- SchoolcodeID = sy.SchoolcodeID,
- StarttermID = sy.Value - ((startsy.Years * 2 - 1) + startsy.SchoolcodeID - 1) + 1,
- GrademajorID = sp.GrademajorID,
- GradeID = startsy.Years,
- StartSchoolyearID = startsy.SchoolyearID,
- StartSchoolyearCode = startsy.Code,
- StartValue = startsy.Value,
- StartSchoolcodeID = startsy.SchoolcodeID,
- GraduatingSemesterValue = (int)(((startsy.Years * 2) - 1 + (startsy.SchoolcodeID - 1)) + Math.Ceiling(spe.LearnSystem.Value * 2 - 1)),
- SpecialtyID = sp.SpecialtyID,
- StandardID = spe.StandardID,
- StandardName = spest.Name,
- EducationID = spe.EducationID,
- LearningformID = spe.LearningformID,
- LearnSystem = spe.LearnSystem,
- CoursematerialID = sp.CoursematerialID,
- CourseCode = cou.CourseCode,
- CourseName = cou.CourseName,
- CourseStructureID = sp.CourseStructureID,
- CourseCategoryID = sp.CourseCategoryID,
- CourseTypeID = sp.CourseTypeID,
- CourseQualityID = sp.CourseQualityID,
- Credit = spspst.Credit ?? 0,
- TheoryCourse = spspst.TheoryCourse ?? 0,
- Practicehours = spspst.Practicehours ?? 0,
- Trialhours = spspst.Trialhours ?? 0,
- Totalhours = (spspst.TheoryCourse ?? 0) + (spspst.Practicehours ?? 0),
- TheoryWeeklyNum = spspst.TheoryWeeklyNum ?? 0,
- PracticeWeeklyNum = spspst.PracticeWeeklyNum ?? 0,
- TrialWeeklyNum = spspst.TrialWeeklyNum ?? 0,
- SchoolweeksNum = (spspst.TheoryWeeklyNum ?? 0) + (spspst.PracticeWeeklyNum ?? 0),
- WeeklyHours = spspst.WeeklyHours ?? 0,
- WeeklyNum = spspst.WeeklyNum ?? 0,
- StartWeeklyNum = spspst.StartWeeklyNum ?? 0,
- EndWeeklyNum = spspst.EndWeeklyNum ?? 0,
- StartEndWeeklyNum = (spspst.StartWeeklyNum ?? 0) + "-" + (spspst.EndWeeklyNum ?? 0),
- DepartmentID = sp.DepartmentID,
- DepartmentCode = spdep.No,
- DepartmentName = spdep.Name,
- CourseCollegeID = spdep.CollegeID,
- CourseCollegeCode = spdep.CF_College.No,
- CourseCollegeName = spdep.CF_College.Name,
- IsSpecialtycore = sp.IsSpecialtycore ?? false,
- IsCooperation = sp.IsCooperation ?? false,
- IsRequired = sp.IsRequired ?? false,
- IsElective = sp.IsElective ?? false,
- IsNetworkCourse = sp.IsNetworkCourse ?? false,
- IsMainCourse = sp.IsMainCourse ?? false,
- IsNeedMaterial = sp.IsNeedMaterial ?? false,
- CourseFineID = sp.CourseFineID,
- PracticeTypeID = sp.PracticeTypeID,
- TeachinglanguageID = sp.TeachinglanguageID,
- ExaminationModeID = sp.ExaminationModeID,
- ResultTypeID = sp.ResultTypeID,
- HandleModeID = sp.HandleModeID,
- TeachingModeIDList = sp.EM_SpecialtyPlanTeachingModeType.Select(x => x.TeachingModeID).ToList(),
- TeachingPlaceIDList = sp.EM_SpecialtyPlanTeachingPlace.Select(x => x.TeachingPlace).ToList(),
- PlanStatus = sp.EM_ExecutablePlan.Count() > 0 ? (int)EM_PlanStatus.Execute : (int)EM_PlanStatus.NotExecute,
- Remark = sp.Remark,
- RecordStatus = sp.RecordStatus,
- CreateUserID = sp.CreateUserID,
- CreateTime = sp.CreateTime,
- ModifyUserID = sp.ModifyUserID,
- ModifyTime = sp.ModifyTime
- };
- return query;
- }
- /// <summary>
- /// 查询专业计划信息SpecialtyPlanView(统计对应的计划范围、学生人数)
- /// 注:成教版本(入学学年学期、专业信息)
- /// </summary>
- /// <param name="expSpecialtyPlan"></param>
- /// <param name="expStudent"></param>
- /// <returns></returns>
- public IQueryable<SpecialtyPlanView> GetAdultSpecialtyPlanViewQueryable(Expression<Func<EM_SpecialtyPlan, bool>> expSpecialtyPlan,
- Expression<Func<CF_Student, bool>> expStudent)
- {
- var query = from sp in SpecialtyPlanRepository.GetList(expSpecialtyPlan)
- join spst in SpecialtyPlanTeachingSettingRepository.Entities
- on sp.SpecialtyPlanID equals spst.SpecialtyPlanID into tempspst
- from spspst in tempspst.DefaultIfEmpty()
- join sy in SchoolyearRepository.Entities
- on sp.SchoolyearID equals sy.SchoolyearID
- join cou in CoursematerialRepository.Entities
- on sp.CoursematerialID equals cou.CoursematerialID
- join dep in DepartmentRepository.Entities
- on sp.DepartmentID equals dep.DepartmentID into tempdep
- from spdep in tempdep.DefaultIfEmpty()
- join startsy in SchoolyearRepository.Entities
- on sp.StartSchoolyearID equals startsy.SchoolyearID
- join spe in SpecialtyRepository.Entities
- on sp.SpecialtyID equals spe.SpecialtyID
- join dicst in DictionaryItemRepository.GetList(x => x.DictionaryCode == typeof(CF_Standard).Name)
- on spe.StandardID equals dicst.Value into tempst
- from spest in tempst.DefaultIfEmpty()
- join pr in
- (
- from gr in GrademajorRepository.Entities
- join fa in FacultymajorRepository.Entities
- on gr.FacultymajorID equals fa.FacultymajorID
- join spe in SpecialtyRepository.Entities
- on new { StandardID = fa.StandardID, EducationID = fa.EducationID, LearningformID = fa.LearningformID, LearnSystem = fa.LearnSystem }
- equals new { StandardID = spe.StandardID, EducationID = spe.EducationID, LearningformID = spe.LearningformID, LearnSystem = spe.LearnSystem }
- group new { gr, spe } by new { gr.GradeID, gr.SemesterID, spe.SpecialtyID } into gpr
- select new
- {
- GradeID = gpr.Key.GradeID,
- StartSchoolcodeID = gpr.Key.SemesterID,
- SpecialtyID = gpr.Key.SpecialtyID,
- PlanRange = gpr.Count()
- }
- )
- on new { GradeID = startsy.Years, StartSchoolcodeID = startsy.SchoolcodeID, SpecialtyID = spe.SpecialtyID }
- equals new { GradeID = pr.GradeID.Value, StartSchoolcodeID = pr.StartSchoolcodeID.Value, SpecialtyID = pr.SpecialtyID } into temppr
- from sppr in temppr.DefaultIfEmpty()
- join sc in
- (
- from stu in StudentRepository.GetList(expStudent)
- join cl in ClassmajorRepository.Entities
- on stu.ClassmajorID equals cl.ClassmajorID
- join gr in GrademajorRepository.Entities
- on cl.GrademajorID equals gr.GrademajorID
- join fa in FacultymajorRepository.Entities
- on gr.FacultymajorID equals fa.FacultymajorID
- join spe in SpecialtyRepository.Entities
- on new { StandardID = fa.StandardID, EducationID = fa.EducationID, LearningformID = fa.LearningformID, LearnSystem = fa.LearnSystem }
- equals new { StandardID = spe.StandardID, EducationID = spe.EducationID, LearningformID = spe.LearningformID, LearnSystem = spe.LearnSystem }
- group new { gr, spe } by new { gr.GradeID, gr.SemesterID, spe.SpecialtyID } into gstu
- select new
- {
- GradeID = gstu.Key.GradeID,
- StartSchoolcodeID = gstu.Key.SemesterID,
- SpecialtyID = gstu.Key.SpecialtyID,
- StudentCount = gstu.Count()
- }
- )
- on new { GradeID = startsy.Years, StartSchoolcodeID = startsy.SchoolcodeID, SpecialtyID = spe.SpecialtyID }
- equals new { GradeID = sc.GradeID.Value, StartSchoolcodeID = sc.StartSchoolcodeID.Value, SpecialtyID = sc.SpecialtyID } into tempstu
- from spstu in tempstu.DefaultIfEmpty()
- select new SpecialtyPlanView
- {
- SpecialtyPlanID = sp.SpecialtyPlanID,
- PlanApplicationID = sp.PlanApplicationID,
- SchoolyearID = sp.SchoolyearID,
- SchoolyearCode = sy.Code,
- YearID = sy.Years,
- Value = sy.Value,
- SchoolyearNumID = (sy.Value - ((startsy.Years * 2 - 1) + startsy.SchoolcodeID - 1)) / 2 + 1,
- SchoolcodeID = sy.SchoolcodeID,
- StarttermID = sy.Value - ((startsy.Years * 2 - 1) + startsy.SchoolcodeID - 1) + 1,
- GrademajorID = sp.GrademajorID,
- GradeID = startsy.Years,
- StartSchoolyearID = startsy.SchoolyearID,
- StartSchoolyearCode = startsy.Code,
- StartValue = startsy.Value,
- StartSchoolcodeID = startsy.SchoolcodeID,
- GraduatingSemesterValue = (int)(((startsy.Years * 2) - 1 + (startsy.SchoolcodeID - 1)) + Math.Ceiling(spe.LearnSystem.Value * 2 - 1)),
- SpecialtyID = sp.SpecialtyID,
- StandardID = spe.StandardID,
- StandardName = spest.Name,
- EducationID = spe.EducationID,
- LearningformID = spe.LearningformID,
- LearnSystem = spe.LearnSystem,
- CoursematerialID = sp.CoursematerialID,
- CourseCode = cou.CourseCode,
- CourseName = cou.CourseName,
- CourseStructureID = sp.CourseStructureID,
- CourseCategoryID = sp.CourseCategoryID,
- CourseTypeID = sp.CourseTypeID,
- CourseQualityID = sp.CourseQualityID,
- Credit = spspst.Credit ?? 0,
- TheoryCourse = spspst.TheoryCourse ?? 0,
- Practicehours = spspst.Practicehours ?? 0,
- Trialhours = spspst.Trialhours ?? 0,
- Totalhours = (spspst.TheoryCourse ?? 0) + (spspst.Practicehours ?? 0),
- TheoryWeeklyNum = spspst.TheoryWeeklyNum ?? 0,
- PracticeWeeklyNum = spspst.PracticeWeeklyNum ?? 0,
- TrialWeeklyNum = spspst.TrialWeeklyNum ?? 0,
- SchoolweeksNum = (spspst.TheoryWeeklyNum ?? 0) + (spspst.PracticeWeeklyNum ?? 0),
- WeeklyHours = spspst.WeeklyHours ?? 0,
- WeeklyNum = spspst.WeeklyNum ?? 0,
- StartWeeklyNum = spspst.StartWeeklyNum ?? 0,
- EndWeeklyNum = spspst.EndWeeklyNum ?? 0,
- StartEndWeeklyNum = (spspst.StartWeeklyNum ?? 0) + "-" + (spspst.EndWeeklyNum ?? 0),
- DepartmentID = sp.DepartmentID,
- DepartmentCode = spdep.No,
- DepartmentName = spdep.Name,
- CourseCollegeID = spdep.CollegeID,
- CourseCollegeCode = spdep.CF_College.No,
- CourseCollegeName = spdep.CF_College.Name,
- IsSpecialtycore = sp.IsSpecialtycore ?? false,
- IsCooperation = sp.IsCooperation ?? false,
- IsRequired = sp.IsRequired ?? false,
- IsElective = sp.IsElective ?? false,
- IsNetworkCourse = sp.IsNetworkCourse ?? false,
- IsMainCourse = sp.IsMainCourse ?? false,
- IsNeedMaterial = sp.IsNeedMaterial ?? false,
- CourseFineID = sp.CourseFineID,
- PracticeTypeID = sp.PracticeTypeID,
- TeachinglanguageID = sp.TeachinglanguageID,
- ExaminationModeID = sp.ExaminationModeID,
- ResultTypeID = sp.ResultTypeID,
- HandleModeID = sp.HandleModeID,
- TeachingModeIDList = sp.EM_SpecialtyPlanTeachingModeType.Select(x => x.TeachingModeID).ToList(),
- TeachingPlaceIDList = sp.EM_SpecialtyPlanTeachingPlace.Select(x => x.TeachingPlace).ToList(),
- PlanRange = sppr.PlanRange == null ? 0 : sppr.PlanRange,
- StudentCount = spstu.StudentCount == null ? 0 : spstu.StudentCount,
- PlanStatus = sp.EM_ExecutablePlan.Count() > 0 ? (int)EM_PlanStatus.Execute : (int)EM_PlanStatus.NotExecute,
- Remark = sp.Remark,
- RecordStatus = sp.RecordStatus,
- CreateUserID = sp.CreateUserID,
- CreateTime = sp.CreateTime,
- ModifyUserID = sp.ModifyUserID,
- ModifyTime = sp.ModifyTime
- };
- return query;
- }
- /// <summary>
- /// 查询专业计划信息SpecialtyPlanView(需匹配年级专业信息、专业信息)
- /// 注:查询出学年学期、年级专业、课程信息等信息
- /// 注:成教版本(入学学年学期、专业信息)
- /// </summary>
- /// <param name="expSchoolyear"></param>
- /// <param name="expSpecialty"></param>
- /// <param name="expSpecialtyPlan"></param>
- /// <returns></returns>
- public IQueryable<SpecialtyPlanView> GetAdultSpecialtyPlanViewQueryable(Expression<Func<EMIS.Entities.CF_Schoolyear, bool>> expSchoolyear,
- Expression<Func<CF_Specialty, bool>> expSpecialty, Expression<Func<EM_SpecialtyPlan, bool>> expSpecialtyPlan)
- {
- var query = from gr in GrademajorRepository.Entities
- join startsy in SchoolyearRepository.GetList(expSchoolyear)
- on new { GradeID = gr.GradeID.Value, StartSchoolcodeID = gr.SemesterID.Value }
- equals new { GradeID = startsy.Years, StartSchoolcodeID = startsy.SchoolcodeID }
- join grsy in SchoolyearRepository.Entities
- on gr.GraduateSchoolyearID equals grsy.SchoolyearID into tempgrsy
- from gradsy in tempgrsy.DefaultIfEmpty()
- join fa in FacultymajorRepository.Entities
- on gr.FacultymajorID equals fa.FacultymajorID
- join spe in SpecialtyRepository.GetList(expSpecialty)
- on new { StandardID = fa.StandardID, EducationID = fa.EducationID, LearningformID = fa.LearningformID, LearnSystem = fa.LearnSystem }
- equals new { StandardID = spe.StandardID, EducationID = spe.EducationID, LearningformID = spe.LearningformID, LearnSystem = spe.LearnSystem }
- join dicst in DictionaryItemRepository.GetList(x => x.DictionaryCode == typeof(CF_Standard).Name)
- on fa.StandardID equals dicst.Value into tempst
- from fast in tempst.DefaultIfEmpty()
- join col in CollegeRepository.Entities
- on fa.CollegeID equals col.CollegeID
- join cam in CampusRepository.Entities
- on col.CampusID equals cam.CampusID
- join sp in SpecialtyPlanRepository.GetList(expSpecialtyPlan)
- on new { StartSchoolyearID = startsy.SchoolyearID, SpecialtyID = spe.SpecialtyID }
- equals new { StartSchoolyearID = sp.StartSchoolyearID.Value, SpecialtyID = sp.SpecialtyID.Value }
- join spst in SpecialtyPlanTeachingSettingRepository.Entities
- on sp.SpecialtyPlanID equals spst.SpecialtyPlanID into tempspst
- from spspst in tempspst.DefaultIfEmpty()
- join sy in SchoolyearRepository.Entities
- on sp.SchoolyearID equals sy.SchoolyearID
- join cou in CoursematerialRepository.Entities
- on sp.CoursematerialID equals cou.CoursematerialID
- join dep in DepartmentRepository.Entities
- on sp.DepartmentID equals dep.DepartmentID into tempdep
- from spdep in tempdep.DefaultIfEmpty()
- select new SpecialtyPlanView
- {
- SpecialtyPlanID = sp.SpecialtyPlanID,
- PlanApplicationID = sp.PlanApplicationID,
- SchoolyearID = sp.SchoolyearID,
- SchoolyearCode = sy.Code,
- YearID = sy.Years,
- Value = sy.Value,
- SchoolyearNumID = (sy.Value - ((gr.GradeID * 2 - 1) + gr.SemesterID - 1)) / 2 + 1,
- SchoolcodeID = sy.SchoolcodeID,
- StarttermID = sy.Value - ((gr.GradeID * 2 - 1) + gr.SemesterID - 1) + 1,
- GrademajorID = gr.GrademajorID,
- GrademajorCode = gr.Code,
- GrademajorName = gr.Name,
- GradeID = gr.GradeID,
- FacultymajorID = gr.FacultymajorID,
- FacultymajorCode = fa.Code,
- FacultymajorName = fa.Name,
- CollegeID = fa.CollegeID,
- CollegeCode = col.No,
- CollegeName = col.Name,
- CampusID = col.CampusID,
- CampusNo = cam.No,
- CampusName = cam.Name,
- StartSchoolyearID = sp.StartSchoolyearID,
- StartSchoolyearCode = startsy.Code,
- StartValue = startsy.Value,
- StartSchoolcodeID = gr.SemesterID,
- GraduatingSemesterID = gr.GraduateSchoolyearID,
- GraduatingSemesterCode = gradsy.Code,
- GraduatingSemesterValue = gradsy.Value,
- SpecialtyID = sp.SpecialtyID,
- StandardID = fa.StandardID,
- StandardName = fast.Name,
- EducationID = fa.EducationID,
- LearningformID = fa.LearningformID,
- LearnSystem = fa.LearnSystem,
- CoursematerialID = sp.CoursematerialID,
- CourseCode = cou.CourseCode,
- CourseName = cou.CourseName,
- CourseStructureID = sp.CourseStructureID,
- CourseCategoryID = sp.CourseCategoryID,
- CourseTypeID = sp.CourseTypeID,
- CourseQualityID = sp.CourseQualityID,
- Credit = spspst.Credit ?? 0,
- TheoryCourse = spspst.TheoryCourse ?? 0,
- Practicehours = spspst.Practicehours ?? 0,
- Trialhours = spspst.Trialhours ?? 0,
- Totalhours = (spspst.TheoryCourse ?? 0) + (spspst.Practicehours ?? 0),
- TheoryWeeklyNum = spspst.TheoryWeeklyNum ?? 0,
- PracticeWeeklyNum = spspst.PracticeWeeklyNum ?? 0,
- TrialWeeklyNum = spspst.TrialWeeklyNum ?? 0,
- SchoolweeksNum = (spspst.TheoryWeeklyNum ?? 0) + (spspst.PracticeWeeklyNum ?? 0),
- WeeklyHours = spspst.WeeklyHours ?? 0,
- WeeklyNum = spspst.WeeklyNum ?? 0,
- StartWeeklyNum = spspst.StartWeeklyNum ?? 0,
- EndWeeklyNum = spspst.EndWeeklyNum ?? 0,
- StartEndWeeklyNum = (spspst.StartWeeklyNum ?? 0) + "-" + (spspst.EndWeeklyNum ?? 0),
- DepartmentID = sp.DepartmentID,
- DepartmentCode = spdep.No,
- DepartmentName = spdep.Name,
- CourseCollegeID = spdep.CollegeID,
- CourseCollegeCode = spdep.CF_College.No,
- CourseCollegeName = spdep.CF_College.Name,
- IsSpecialtycore = sp.IsSpecialtycore ?? false,
- IsCooperation = sp.IsCooperation ?? false,
- IsRequired = sp.IsRequired ?? false,
- IsElective = sp.IsElective ?? false,
- IsNetworkCourse = sp.IsNetworkCourse ?? false,
- IsMainCourse = sp.IsMainCourse ?? false,
- IsNeedMaterial = sp.IsNeedMaterial ?? false,
- CourseFineID = sp.CourseFineID,
- PracticeTypeID = sp.PracticeTypeID,
- TeachinglanguageID = sp.TeachinglanguageID,
- ExaminationModeID = sp.ExaminationModeID,
- ResultTypeID = sp.ResultTypeID,
- HandleModeID = sp.HandleModeID,
- TeachingModeIDList = sp.EM_SpecialtyPlanTeachingModeType.Select(x => x.TeachingModeID).ToList(),
- TeachingPlaceIDList = sp.EM_SpecialtyPlanTeachingPlace.Select(x => x.TeachingPlace).ToList(),
- PlanStatus = sp.EM_ExecutablePlan.Count() > 0 ? (int)EM_PlanStatus.Execute : (int)EM_PlanStatus.NotExecute,
- Remark = sp.Remark,
- RecordStatus = sp.RecordStatus,
- CreateUserID = sp.CreateUserID,
- CreateTime = sp.CreateTime,
- ModifyUserID = sp.ModifyUserID,
- ModifyTime = sp.ModifyTime
- };
- return query;
- }
- /// <summary>
- /// 查询对应的年级专业信息(根据学年学期信息、专业信息,统计年级专业对应的学生人数)
- /// 注:成教版本(入学学年学期、专业信息)
- /// </summary>
- /// <param name="expSchoolyear"></param>
- /// <param name="expSpecialty"></param>
- /// <returns></returns>
- public IQueryable<GrademajorView> GetAdultGrademajorViewQueryable(Expression<Func<EMIS.Entities.CF_Schoolyear, bool>> expSchoolyear,
- Expression<Func<CF_Specialty, bool>> expSpecialty)
- {
- var query = from gr in GrademajorRepository.Entities
- join startsy in SchoolyearRepository.GetList(expSchoolyear)
- on new { GradeID = gr.GradeID.Value, StartSchoolcodeID = gr.SemesterID.Value }
- equals new { GradeID = startsy.Years, StartSchoolcodeID = startsy.SchoolcodeID }
- join fa in FacultymajorRepository.Entities
- on gr.FacultymajorID equals fa.FacultymajorID
- join spe in SpecialtyRepository.GetList(expSpecialty)
- on new { StandardID = fa.StandardID, EducationID = fa.EducationID, LearningformID = fa.LearningformID, LearnSystem = fa.LearnSystem }
- equals new { StandardID = spe.StandardID, EducationID = spe.EducationID, LearningformID = spe.LearningformID, LearnSystem = spe.LearnSystem }
- join col in CollegeRepository.Entities
- on fa.CollegeID equals col.CollegeID
- join cam in CampusRepository.Entities
- on col.CampusID equals cam.CampusID
- join stu in
- (
- from stu in StudentRepository.Entities
- group stu by stu.CF_Classmajor.CF_Grademajor.GrademajorID into gstu
- select new
- {
- GrademajorID = gstu.Key,
- StudentCount = gstu.Count()
- }
- )
- on gr.GrademajorID equals stu.GrademajorID into tempstu
- from grstu in tempstu.DefaultIfEmpty()
- select new GrademajorView
- {
- GrademajorID = gr.GrademajorID,
- Code = gr.Code,
- Name = gr.Name,
- Abbreviation = gr.Abbreviation,
- FacultymajorID = fa.FacultymajorID,
- FacultymajorCode = fa.Code,
- FacultymajorName = fa.Name,
- CampusID = col.CampusID,
- CampusNo = cam.No,
- CampusName = cam.Name,
- CollegeID = fa.CollegeID,
- CollegeCode = col.No,
- CollegeName = col.Name,
- GradeID = gr.GradeID,
- SemesterID = gr.SemesterID,
- SpecialtyID = spe.SpecialtyID,
- StandardID = fa.StandardID,
- EducationID = fa.EducationID,
- LearningformID = fa.LearningformID,
- LearnSystem = fa.LearnSystem,
- StartSchoolyearID = startsy.SchoolyearID,
- StartSchoolyearCode = startsy.Code,
- StartValue = startsy.Value,
- GraduateSchoolyearID = gr.GraduateSchoolyearID,
- GraduateValue = gr.CF_Schoolyear.Value,
- GraduateSchoolyearCode = gr.CF_Schoolyear.Code,
- Professional = gr.Professional,
- StudentCount = grstu.StudentCount == null ? 0 : grstu.StudentCount,
- Remark = gr.Remark,
- RecordStatus = gr.RecordStatus
- };
- return query;
- }
- /// <summary>
- /// 查询对应的计划范围信息(根据专业计划信息,统计各年级专业对应的班级数、学生人数)
- /// 注:成教版本(入学学年学期、专业信息)
- /// </summary>
- /// <param name="expSpecialtyPlan"></param>
- /// <param name="expStudent"></param>
- /// <returns></returns>
- public IQueryable<GrademajorView> GetAdultPlanRangeViewQueryable(Expression<Func<EM_SpecialtyPlan, bool>> expSpecialtyPlan,
- Expression<Func<CF_Student, bool>> expStudent)
- {
- var query = from sp in SpecialtyPlanRepository.GetList(expSpecialtyPlan)
- join startsy in SchoolyearRepository.Entities
- on sp.StartSchoolyearID equals startsy.SchoolyearID
- join spe in SpecialtyRepository.Entities
- on sp.SpecialtyID equals spe.SpecialtyID
- join fa in FacultymajorRepository.Entities
- on new { StandardID = spe.StandardID, EducationID = spe.EducationID, LearningformID = spe.LearningformID, LearnSystem = spe.LearnSystem }
- equals new { StandardID = fa.StandardID, EducationID = fa.EducationID, LearningformID = fa.LearningformID, LearnSystem = fa.LearnSystem }
- join col in CollegeRepository.Entities
- on fa.CollegeID equals col.CollegeID
- join gr in GrademajorRepository.Entities
- on new { GradeID = startsy.Years, StartSchoolcodeID = startsy.SchoolcodeID, FacultymajorID = fa.FacultymajorID }
- equals new { GradeID = gr.GradeID.Value, StartSchoolcodeID = gr.SemesterID.Value, FacultymajorID = gr.FacultymajorID.Value }
- join cl in
- (
- from cl in ClassmajorRepository.Entities
- group cl by cl.GrademajorID into gcl
- select new
- {
- GrademajorID = gcl.Key,
- ClassmajorCount = gcl.Count()
- }
-
- )
- on gr.GrademajorID equals cl.GrademajorID into tempcl
- from grcl in tempcl.DefaultIfEmpty()
- join sc in
- (
- from stu in StudentRepository.GetList(expStudent)
- group stu by stu.CF_Classmajor.CF_Grademajor.GrademajorID into gstu
- select new
- {
- GrademajorID = gstu.Key,
- StudentCount = gstu.Count()
- }
- )
- on gr.GrademajorID equals sc.GrademajorID into tempstu
- from grstu in tempstu.DefaultIfEmpty()
- select new GrademajorView
- {
- GrademajorID = gr.GrademajorID,
- Code = gr.Code,
- Name = gr.Name,
- Abbreviation = gr.Abbreviation,
- FacultymajorID = fa.FacultymajorID,
- FacultymajorCode = fa.Code,
- FacultymajorName = fa.Name,
- CampusID = col.CampusID,
- CampusNo = col.CF_Campus.No,
- CampusName = col.CF_Campus.Name,
- CollegeID = fa.CollegeID,
- CollegeCode = col.No,
- CollegeName = col.Name,
- GradeID = gr.GradeID,
- SemesterID = gr.SemesterID,
- StandardID = fa.StandardID,
- EducationID = fa.EducationID,
- LearningformID = fa.LearningformID,
- LearnSystem = fa.LearnSystem,
- GraduateSchoolyearID = gr.GraduateSchoolyearID,
- GraduateValue = gr.CF_Schoolyear.Value,
- GraduateSchoolyearCode = gr.CF_Schoolyear.Code,
- Professional = gr.Professional,
- ClassmajorCount = grcl.ClassmajorCount == null ? 0 : grcl.ClassmajorCount,
- StudentCount = grstu.StudentCount == null ? 0 : grstu.StudentCount,
- Remark = gr.Remark,
- RecordStatus = gr.RecordStatus,
- CreateUserID = gr.CreateUserID,
- CreateTime = gr.CreateTime,
- ModifyUserID = gr.ModifyUserID,
- ModifyTime = gr.ModifyTime
- };
- return query;
- }
- /// <summary>
- /// 查询专业计划对应的学生信息BaseStudentView
- /// 注:成教版本(入学学年学期、专业信息)
- /// </summary>
- /// <param name="expSpecialtyPlan"></param>
- /// <param name="expStudent"></param>
- /// <returns></returns>
- public IQueryable<BaseStudentView> GetAdultBaseStudentViewQueryable(Expression<Func<EM_SpecialtyPlan, bool>> expSpecialtyPlan,
- Expression<Func<CF_Student, bool>> expStudent)
- {
- var query = from sp in SpecialtyPlanRepository.GetList(expSpecialtyPlan)
- join startsy in SchoolyearRepository.Entities
- on sp.StartSchoolyearID equals startsy.SchoolyearID
- join spe in SpecialtyRepository.Entities
- on sp.SpecialtyID equals spe.SpecialtyID
- join fa in FacultymajorRepository.Entities
- on new { StandardID = spe.StandardID, EducationID = spe.EducationID, LearningformID = spe.LearningformID, LearnSystem = spe.LearnSystem }
- equals new { StandardID = fa.StandardID, EducationID = fa.EducationID, LearningformID = fa.LearningformID, LearnSystem = fa.LearnSystem }
- join col in CollegeRepository.Entities
- on fa.CollegeID equals col.CollegeID
- join gr in GrademajorRepository.Entities
- on new { GradeID = startsy.Years, StartSchoolcodeID = startsy.SchoolcodeID, FacultymajorID = fa.FacultymajorID }
- equals new { GradeID = gr.GradeID.Value, StartSchoolcodeID = gr.SemesterID.Value, FacultymajorID = gr.FacultymajorID.Value }
- join cl in ClassmajorRepository.Entities
- on gr.GrademajorID equals cl.GrademajorID
- join stu in StudentRepository.GetList(expStudent)
- on cl.ClassmajorID equals stu.ClassmajorID
- join us in UserRepository.Entities
- on stu.UserID equals us.UserID
- select new BaseStudentView
- {
- UserID = stu.UserID,
- LoginID = us.LoginID,
- UserName = us.Name,
- SexID = stu.SexID,
- IDNumber = stu.IDNumber,
- StudentStatus = stu.StudentStatus,
- InSchoolStatusID = stu.InSchoolStatusID,
- ClassmajorID = stu.ClassmajorID,
- ClassmajorCode = cl.No,
- ClassmajorName = cl.Name,
- ClassNum = cl.ClassNum == null ? 1 : cl.ClassNum,
- SchoolyearID = gr.GradeID,
- GrademajorID = cl.GrademajorID,
- GrademajorCode = gr.Code,
- GrademajorName = gr.Name,
- FacultymajorID = gr.FacultymajorID,
- FacultymajorCode = fa.Code,
- FacultymajorName = fa.Name,
- CollegeID = fa.CollegeID,
- CollegeNo = col.No,
- CollegeName = col.Name
- };
- return query;
- }
- /// <summary>
- /// 查询对应的未新增专业课程信息
- /// 注:成教版本(入学学年学期、专业信息)
- /// </summary>
- /// <param name="expSpecialtyCourse"></param>
- /// <param name="expSchoolyear"></param>
- /// <param name="expSpecialty"></param>
- /// <returns></returns>
- public IQueryable<SpecialtyCourseView> GetAdultSpecialtyCourseViewNoAddQueryable(Expression<Func<EM_SpecialtyCourse, bool>> expSpecialtyCourse,
- Expression<Func<EMIS.Entities.CF_Schoolyear, bool>> expSchoolyear, Expression<Func<CF_Specialty, bool>> expSpecialty,
- Expression<Func<EM_SpecialtyPlan, bool>> expSpecialtyPlan)
- {
- var query = from sc in SpecialtyCourseRepository.GetList(expSpecialtyCourse)
- join spe in SpecialtyRepository.GetList(expSpecialty)
- on sc.SpecialtyID equals spe.SpecialtyID
- join dicst in DictionaryItemRepository.GetList(x => x.DictionaryCode == typeof(CF_Standard).Name)
- on spe.StandardID equals dicst.Value into tempst
- from spest in tempst.DefaultIfEmpty()
- join cou in CoursematerialRepository.Entities
- on sc.CoursematerialID equals cou.CoursematerialID
- join scts in SpecialtyCourseTeachingSettingRepository.Entities
- on sc.SpecialtyCourseID equals scts.SpecialtyCourseID into tempscts
- from scscts in tempscts.DefaultIfEmpty()
- join dep in DepartmentRepository.Entities
- on sc.DepartmentID equals dep.DepartmentID into tempdep
- from scdep in tempdep.DefaultIfEmpty()
- join col in CollegeRepository.Entities
- on scdep.CollegeID equals col.CollegeID into tempcol
- from sccol in tempcol.DefaultIfEmpty()
- join sp in
- (
- from sp in SpecialtyPlanRepository.GetList(expSpecialtyPlan)
- join sy in SchoolyearRepository.Entities
- on sp.SchoolyearID equals sy.SchoolyearID
- join startsy in SchoolyearRepository.GetList(expSchoolyear)
- on sp.StartSchoolyearID equals startsy.SchoolyearID
- join spe in SpecialtyRepository.Entities
- on sp.SpecialtyID equals spe.SpecialtyID
- join spst in SpecialtyPlanTeachingSettingRepository.Entities
- on sp.SpecialtyPlanID equals spst.SpecialtyPlanID into tempspst
- from spspst in tempspst.DefaultIfEmpty()
- join dep in DepartmentRepository.Entities
- on sp.DepartmentID equals dep.DepartmentID into tempdep
- from spdep in tempdep.DefaultIfEmpty()
- select new
- {
- SpecialtyPlanID = sp.SpecialtyPlanID,
- SchoolyearNumID = (sy.Value - ((startsy.Years * 2 - 1) + startsy.SchoolcodeID - 1)) / 2 + 1,
- SchoolcodeID = sy.SchoolcodeID,
- StarttermID = sy.Value - ((startsy.Years * 2 - 1) + startsy.SchoolcodeID - 1) + 1,
- StartSchoolyearID = sp.StartSchoolyearID,
- GradeID = startsy.Years,
- SpecialtyID = sp.SpecialtyID,
- StartSchoolcodeID = startsy.SchoolcodeID,
- CoursematerialID = sp.CoursematerialID,
- CourseTypeID = sp.CourseTypeID,
- Credit = spspst.Credit,
- DepartmentID = spdep.DepartmentID
- }
- )
- on new { SpecialtyID = sc.SpecialtyID, StarttermID = sc.StarttermID, CoursematerialID = sc.CoursematerialID }
- equals new { SpecialtyID = sp.SpecialtyID, StarttermID = sp.StarttermID, CoursematerialID = sp.CoursematerialID } into tempsp
- from scsp in tempsp.DefaultIfEmpty()
- where scsp.SpecialtyPlanID == null
- select new SpecialtyCourseView
- {
- SpecialtyCourseID = sc.SpecialtyCourseID,
- SpecialtyID = sc.SpecialtyID,
- StandardID = spe.StandardID,
- StandardName = spest.Name,
- EducationID = spe.EducationID,
- LearningformID = spe.LearningformID,
- LearnSystem = spe.LearnSystem,
- StarttermID = sc.StarttermID,
- CoursematerialID = sc.CoursematerialID,
- CourseCode = cou.CourseCode,
- CourseName = cou.CourseName,
- CourseStructureID = sc.CourseStructureID,
- CourseCategoryID = sc.CourseCategoryID,
- CourseTypeID = sc.CourseTypeID,
- CourseQualityID = sc.CourseQualityID,
- Credit = scscts.Credit ?? 0,
- TheoryCourse = scscts.TheoryCourse ?? 0,
- Practicehours = scscts.Practicehours ?? 0,
- Trialhours = scscts.Trialhours ?? 0,
- Totalhours = (scscts.TheoryCourse ?? 0) + (scscts.Practicehours ?? 0),
- TheoryWeeklyNum = scscts.TheoryWeeklyNum ?? 0,
- PracticeWeeklyNum = scscts.PracticeWeeklyNum ?? 0,
- TrialWeeklyNum = scscts.TrialWeeklyNum ?? 0,
- SchoolweeksNum = (scscts.TheoryWeeklyNum ?? 0) + (scscts.PracticeWeeklyNum ?? 0),
- WeeklyHours = scscts.WeeklyHours ?? 0,
- WeeklyNum = scscts.WeeklyNum ?? 0,
- StartWeeklyNum = scscts.StartWeeklyNum ?? 0,
- EndWeeklyNum = scscts.EndWeeklyNum ?? 0,
- StartEndWeeklyNum = (scscts.StartWeeklyNum ?? 0) + "-" + (scscts.EndWeeklyNum ?? 0),
- DepartmentID = sc.DepartmentID,
- DepartmentCode = scdep.No,
- DepartmentName = scdep.Name,
- CollegeID = scdep.CollegeID,
- CollegeCode = sccol.No,
- CollegeName = sccol.Name,
- IsSpecialtycore = sc.IsSpecialtycore ?? false,
- IsCooperation = sc.IsCooperation ?? false,
- IsRequired = sc.IsRequired ?? false,
- IsElective = sc.IsElective ?? false,
- IsNetworkCourse = sc.IsNetworkCourse ?? false,
- IsMainCourse = sc.IsMainCourse ?? false,
- IsNeedMaterial = sc.IsNeedMaterial ?? false,
- CourseFineID = sc.CourseFineID,
- PracticeTypeID = sc.PracticeTypeID,
- TeachinglanguageID = sc.TeachinglanguageID,
- ExaminationModeID = sc.ExaminationModeID,
- ResultTypeID = sc.ResultTypeID,
- HandleModeID = sc.HandleModeID,
- TeachingModeIDList = sc.EM_TeachingModeType.Select(x => x.TeachingModeID).ToList(),
- TeachingPlaceIDList = sc.EM_TeachingPlace.Select(x => x.TeachingPlace).ToList(),
- IsEnable = sc.IsEnable ?? false,
- Remark = sc.Remark,
- RecordStatus = sc.RecordStatus,
- CreateUserID = sc.CreateUserID,
- CreateTime = sc.CreateTime,
- ModifyUserID = sc.ModifyUserID,
- ModifyTime = sc.ModifyTime
- };
- return query;
- }
- /// <summary>
- /// 查询专业计划信息对应的授课方式
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<int?> GetTeachingModeTypeQueryble(Expression<Func<EM_SpecialtyPlan, bool>> exp)
- {
- var query = from sp in SpecialtyPlanRepository.GetList(exp)
- join sptm in SpecialtyPlanTeachingModeTypeRepository.Entities
- on sp.SpecialtyPlanID equals sptm.SpecialtyPlanID
- join dictm in DictionaryItemRepository.GetList(x => x.DictionaryCode == typeof(CF_TeachingMode).Name)
- on sptm.TeachingModeID equals dictm.Value
- select dictm.Value;
- return query;
- }
- /// <summary>
- /// 查询专业计划信息对应的授课方式
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<int?> GetTeachingPlaceQueryble(Expression<Func<EM_SpecialtyPlan, bool>> exp)
- {
- var query = from sp in SpecialtyPlanRepository.GetList(exp)
- join sptp in SpecialtyPlanTeachingPlaceRepository.Entities
- on sp.SpecialtyPlanID equals sptp.SpecialtyPlanID
- join dictp in DictionaryItemRepository.GetList(x => x.DictionaryCode == typeof(EMIS.ViewModel.EM_TeachingPlace).Name)
- on sptp.TeachingPlace equals dictp.Value
- select dictp.Value;
- return query;
- }
- }
- }
|