EvaluationStudentDAL.cs 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Linq.Expressions;
  5. using System.Text;
  6. using EMIS.Entities;
  7. using EMIS.ViewModel.EvaluationManage.StudentEvaluation;
  8. using EMIS.DataLogic.Repositories;
  9. namespace EMIS.DataLogic.EvaluationManage.StudentEvaluation
  10. {
  11. public class EvaluationStudentDAL
  12. {
  13. public EvaluationStudentRepository EvaluationStudentRepository { get; set; }
  14. public StudentRepository StudentRepository { get; set; }
  15. public ClassmajorRepository ClassmajorRepository { get; set; }
  16. public GrademajorRepository GrademajorRepository { get; set; }
  17. public FacultymajorRepository FacultymajorRepository { get; set; }
  18. public EvaluationStudentSettingRepository EvaluationStudentSettingRepository { get; set; }
  19. public EducationMissionRepository EducationMissionRepository { get; set; }
  20. public EducationMissionClassRepository EducationMissionClassRepository { get; set; }
  21. public SchoolyearRepository SchoolyearRepository { get; set; }
  22. public DepartmentRepository DepartmentRepository { get; set; }
  23. public CollegeRepository CollegeRepository { get; set; }
  24. public CampusRepository CampusRepository { get; set; }
  25. public CoursematerialRepository CoursematerialRepository { get; set; }
  26. public EvaluationTableRepository EvaluationTableRepository { get; set; }
  27. public EvaluationParticipateTypeRepository EvaluationParticipateTypeRepository { get; set; }
  28. public EvaluationIntTypeRepository EvaluationIntTypeRepository { get; set; }
  29. public StaffRepository StaffRepository { get; set; }
  30. public UserRepository UserRepository { get; set; }
  31. public EvaluationStudentSettingScoreRepository EvaluationStudentSettingScoreRepository { get; set; }
  32. public EvaluationStudentDetailRepository EvaluationStudentDetailRepository { get; set; }
  33. public EvaluationTargetRepository EvaluationTargetRepository { get; set; }
  34. public EvaluationProjectRepository EvaluationProjectRepository { get; set; }
  35. public EvaluationStudentScoreRepository EvaluationStudentScoreRepository { get; set; }
  36. /// <summary>
  37. /// 查询对应的学评学生信息EvaluationStudentView
  38. /// </summary>
  39. /// <param name="exp"></param>
  40. /// <returns></returns>
  41. public IQueryable<EvaluationStudentView> GetEvaluationStudentViewQueryable(Expression<Func<EM_EvaluationStudent, bool>> exp)
  42. {
  43. var query = from evstu in EvaluationStudentRepository.GetList(exp)
  44. join evstust in EvaluationStudentSettingRepository.Entities
  45. on evstu.EvaluationStudentSettingID equals evstust.EvaluationStudentSettingID
  46. join educl in EducationMissionClassRepository.Entities
  47. on evstust.EducationMissionClassID equals educl.EducationMissionClassID
  48. join edu in EducationMissionRepository.Entities
  49. on educl.EducationMissionID equals edu.EducationMissionID
  50. join sy in SchoolyearRepository.Entities
  51. on edu.SchoolyearID equals sy.SchoolyearID
  52. join cou in CoursematerialRepository.Entities
  53. on educl.CoursematerialID equals cou.CoursematerialID
  54. join dep in DepartmentRepository.Entities
  55. on edu.DepartmentID equals dep.DepartmentID
  56. join evtb in EvaluationTableRepository.Entities
  57. on evstust.EvaluationTableID equals evtb.EvaluationTableID
  58. join evpt in EvaluationParticipateTypeRepository.Entities
  59. on evtb.EvaluationParticipateTypeID equals evpt.EvaluationParticipateTypeID
  60. join evtp in EvaluationIntTypeRepository.Entities
  61. on evtb.EvaluationIntTypeID equals evtp.EvaluationIntTypeID
  62. join sf in StaffRepository.Entities
  63. on evstust.UserID equals sf.UserID
  64. join stu in StudentRepository.Entities
  65. on evstu.UserID equals stu.UserID
  66. join cl in ClassmajorRepository.Entities
  67. on stu.ClassmajorID equals cl.ClassmajorID
  68. join gr in GrademajorRepository.Entities
  69. on cl.GrademajorID equals gr.GrademajorID
  70. join fa in FacultymajorRepository.Entities
  71. on gr.FacultymajorID equals fa.FacultymajorID
  72. join col in CollegeRepository.Entities
  73. on fa.CollegeID equals col.CollegeID
  74. join cam in CampusRepository.Entities
  75. on col.CampusID equals cam.CampusID
  76. join sfus in UserRepository.Entities
  77. on sf.UserID equals sfus.UserID
  78. join stuus in UserRepository.Entities
  79. on stu.UserID equals stuus.UserID
  80. select new EvaluationStudentView
  81. {
  82. EvaluationStudentID = evstu.EvaluationStudentID,
  83. UserID = evstu.UserID,
  84. StudentNo = stuus.LoginID,
  85. Name = stuus.Name,
  86. SexID = stu.SexID,
  87. BirthDate = stu.BirthDate,
  88. NationID = stu.NationID,
  89. PoliticsID = stu.PoliticsID,
  90. InSchoolStatusID = stu.InSchoolStatusID,
  91. StudentStatus = stu.StudentStatus,
  92. StandardID = fa.StandardID,
  93. EducationID = fa.EducationID,
  94. LearningformID = fa.LearningformID,
  95. LearnSystem = fa.LearnSystem,
  96. ClassmajorID = stu.ClassmajorID,
  97. ClassmajorNo = cl.No,
  98. ClassmajorName = cl.Name,
  99. ClassNum = cl.ClassNum,
  100. GradeID = gr.GradeID,
  101. GrademajorID = cl.GrademajorID,
  102. GrademajorCode = gr.Code,
  103. GrademajorName = gr.Name,
  104. FacultymajorID = gr.FacultymajorID,
  105. FacultymajorCode = fa.Code,
  106. FacultymajorName = fa.Name,
  107. CollegeID = fa.CollegeID,
  108. CollegeNo = col.No,
  109. CollegeName = col.Name,
  110. CampusID = col.CampusID,
  111. CampusNo = cam.No,
  112. CampusName = cam.Name,
  113. EvaluationStudentSettingID = evstu.EvaluationStudentSettingID,
  114. EducationMissionClassID = evstust.EducationMissionClassID,
  115. EducationMissionID = educl.EducationMissionID,
  116. SchoolyearID = edu.SchoolyearID,
  117. SchoolyearValue = sy.Value,
  118. SchoolyearCode = sy.Code,
  119. MissionName = edu.ClassName,
  120. MissionClassName = educl.Name,
  121. CoursematerialID = educl.CoursematerialID,
  122. CourseCode = cou.CourseCode,
  123. CourseName = cou.CourseName,
  124. CourseStructureID = educl.CourseStructureID,
  125. CourseCategoryID = educl.CourseCategoryID,
  126. CourseTypeID = educl.CourseTypeID,
  127. CourseQualityID = educl.CourseQualityID,
  128. Credit = educl.EM_EducationMissionClassTeachingSetting.Credit ?? 0,
  129. DepartmentID = edu.DepartmentID,
  130. DepartmentNo = dep.No,
  131. DepartmentName = dep.Name,
  132. HandleModeID = educl.HandleModeID,
  133. TeachingModeID = educl.TeachingModeID,
  134. MissionClassStatus = educl.RecordStatus,
  135. EvaluationTableID = evstust.EvaluationTableID,
  136. EvaluationTableCode = evtb.Code,
  137. EvaluationTableName = evtb.Name,
  138. EvaluationParticipateTypeID = evtb.EvaluationParticipateTypeID,
  139. ParticipateTypeID = evpt.ParticipateTypeID,
  140. EvaluationTypeID = evtb.EvaluationIntTypeID,
  141. EvaluationTypeCode = evtp.Code,
  142. EvaluationTypeName = evtp.Name,
  143. StaffUserID = evstust.UserID,
  144. StaffCode = sfus.LoginID,
  145. StaffName = sfus.Name,
  146. TitleID = sf.TitleID,
  147. TeachingMethodID = evstust.TeachingMethodID,
  148. OpenState = evstust.OpenState.Value,
  149. Number = evpt.Number ?? 0,
  150. Numbered = evstu.Numbered ?? 0,
  151. IsValidity = evstu.IsValidity.Value,
  152. TotalScore = evstu.TotalScore,
  153. Advice = evstu.Advice,
  154. Remark = evstu.Remark,
  155. RecordStatus = evstu.RecordStatus,
  156. CreateUserID = evstu.CreateUserID,
  157. CreateTime = evstu.CreateTime,
  158. ModifyUserID = evstu.ModifyUserID,
  159. ModifyTime = evstu.ModifyTime
  160. };
  161. return query;
  162. }
  163. /// <summary>
  164. /// 查询对应的学评学生信息EvaluationStudentView(统计对应的学评项目数)
  165. /// </summary>
  166. /// <param name="expEvaluationStudent"></param>
  167. /// <param name="expEducationMission"></param>
  168. /// <param name="expStudent"></param>
  169. /// <returns></returns>
  170. public IQueryable<EvaluationStudentView> GetEvaluationStudentViewQueryable(Expression<Func<EM_EvaluationStudent, bool>> expEvaluationStudent,
  171. Expression<Func<EM_EducationMission, bool>> expEducationMission, Expression<Func<CF_Student, bool>> expStudent)
  172. {
  173. var query = from evstu in EvaluationStudentRepository.GetList(expEvaluationStudent)
  174. join evstust in EvaluationStudentSettingRepository.Entities
  175. on evstu.EvaluationStudentSettingID equals evstust.EvaluationStudentSettingID
  176. join educl in EducationMissionClassRepository.Entities
  177. on evstust.EducationMissionClassID equals educl.EducationMissionClassID
  178. join edu in EducationMissionRepository.GetList(expEducationMission)
  179. on educl.EducationMissionID equals edu.EducationMissionID
  180. join sy in SchoolyearRepository.Entities
  181. on edu.SchoolyearID equals sy.SchoolyearID
  182. join cou in CoursematerialRepository.Entities
  183. on educl.CoursematerialID equals cou.CoursematerialID
  184. join dep in DepartmentRepository.Entities
  185. on edu.DepartmentID equals dep.DepartmentID
  186. join evtb in EvaluationTableRepository.Entities
  187. on evstust.EvaluationTableID equals evtb.EvaluationTableID
  188. join evpt in EvaluationParticipateTypeRepository.Entities
  189. on evtb.EvaluationParticipateTypeID equals evpt.EvaluationParticipateTypeID
  190. join evtp in EvaluationIntTypeRepository.Entities
  191. on evtb.EvaluationIntTypeID equals evtp.EvaluationIntTypeID
  192. join sf in StaffRepository.Entities
  193. on evstust.UserID equals sf.UserID
  194. join stu in StudentRepository.GetList(expStudent)
  195. on evstu.UserID equals stu.UserID
  196. join cl in ClassmajorRepository.Entities
  197. on stu.ClassmajorID equals cl.ClassmajorID
  198. join gr in GrademajorRepository.Entities
  199. on cl.GrademajorID equals gr.GrademajorID
  200. join fa in FacultymajorRepository.Entities
  201. on gr.FacultymajorID equals fa.FacultymajorID
  202. join col in CollegeRepository.Entities
  203. on fa.CollegeID equals col.CollegeID
  204. join cam in CampusRepository.Entities
  205. on col.CampusID equals cam.CampusID
  206. join sfus in UserRepository.Entities
  207. on sf.UserID equals sfus.UserID
  208. join stuus in UserRepository.Entities
  209. on stu.UserID equals stuus.UserID
  210. select new EvaluationStudentView
  211. {
  212. EvaluationStudentID = evstu.EvaluationStudentID,
  213. UserID = evstu.UserID,
  214. StudentNo = stuus.LoginID,
  215. Name = stuus.Name,
  216. SexID = stu.SexID,
  217. BirthDate = stu.BirthDate,
  218. NationID = stu.NationID,
  219. PoliticsID = stu.PoliticsID,
  220. InSchoolStatusID = stu.InSchoolStatusID,
  221. StudentStatus = stu.StudentStatus,
  222. StandardID = fa.StandardID,
  223. EducationID = fa.EducationID,
  224. LearningformID = fa.LearningformID,
  225. LearnSystem = fa.LearnSystem,
  226. ClassmajorID = stu.ClassmajorID,
  227. ClassmajorNo = cl.No,
  228. ClassmajorName = cl.Name,
  229. ClassNum = cl.ClassNum,
  230. GradeID = gr.GradeID,
  231. GrademajorID = cl.GrademajorID,
  232. GrademajorCode = gr.Code,
  233. GrademajorName = gr.Name,
  234. FacultymajorID = gr.FacultymajorID,
  235. FacultymajorCode = fa.Code,
  236. FacultymajorName = fa.Name,
  237. CollegeID = fa.CollegeID,
  238. CollegeNo = col.No,
  239. CollegeName = col.Name,
  240. CampusID = col.CampusID,
  241. CampusNo = cam.No,
  242. CampusName = cam.Name,
  243. EvaluationStudentSettingID = evstu.EvaluationStudentSettingID,
  244. EducationMissionClassID = evstust.EducationMissionClassID,
  245. EducationMissionID = educl.EducationMissionID,
  246. SchoolyearID = edu.SchoolyearID,
  247. SchoolyearValue = sy.Value,
  248. SchoolyearCode = sy.Code,
  249. MissionName = edu.ClassName,
  250. MissionClassName = educl.Name,
  251. CoursematerialID = educl.CoursematerialID,
  252. CourseCode = cou.CourseCode,
  253. CourseName = cou.CourseName,
  254. CourseStructureID = educl.CourseStructureID,
  255. CourseCategoryID = educl.CourseCategoryID,
  256. CourseTypeID = educl.CourseTypeID,
  257. CourseQualityID = educl.CourseQualityID,
  258. Credit = educl.EM_EducationMissionClassTeachingSetting.Credit ?? 0,
  259. DepartmentID = edu.DepartmentID,
  260. DepartmentNo = dep.No,
  261. DepartmentName = dep.Name,
  262. HandleModeID = educl.HandleModeID,
  263. TeachingModeID = educl.TeachingModeID,
  264. MissionClassStatus = educl.RecordStatus,
  265. EvaluationTableID = evstust.EvaluationTableID,
  266. EvaluationTableCode = evtb.Code,
  267. EvaluationTableName = evtb.Name,
  268. EvaluationParticipateTypeID = evtb.EvaluationParticipateTypeID,
  269. ParticipateTypeID = evpt.ParticipateTypeID,
  270. EvaluationTypeID = evtb.EvaluationIntTypeID,
  271. EvaluationTypeCode = evtp.Code,
  272. EvaluationTypeName = evtp.Name,
  273. StaffUserID = evstust.UserID,
  274. StaffCode = sfus.LoginID,
  275. StaffName = sfus.Name,
  276. TitleID = sf.TitleID,
  277. TeachingMethodID = evstust.TeachingMethodID,
  278. OpenState = evstust.OpenState.Value,
  279. Number = evpt.Number ?? 0,
  280. Numbered = evstu.Numbered ?? 0,
  281. IsValidity = evstu.IsValidity.Value,
  282. ProjectCount = evstu.EM_EvaluationStudentDetail.Count(),
  283. TotalScore = evstu.TotalScore,
  284. Advice = evstu.Advice,
  285. Remark = evstu.Remark,
  286. RecordStatus = evstu.RecordStatus,
  287. CreateUserID = evstu.CreateUserID,
  288. CreateTime = evstu.CreateTime,
  289. ModifyUserID = evstu.ModifyUserID,
  290. ModifyTime = evstu.ModifyTime
  291. };
  292. return query;
  293. }
  294. /// <summary>
  295. /// 查询对应的学生评价信息EvaluationStudentView
  296. /// </summary>
  297. /// <param name="expStudent"></param>
  298. /// <param name="expEvaluationStudentSetting"></param>
  299. /// <returns></returns>
  300. public IQueryable<EvaluationStudentView> GetStudentEvaluationEnterViewQueryable(Expression<Func<CF_Student, bool>> expStudent, Expression<Func<EM_EvaluationStudentSetting, bool>> expEvaluationStudentSetting)
  301. {
  302. var query = from evstust in EvaluationStudentSettingRepository.GetList(expEvaluationStudentSetting)
  303. from stu in evstust.CF_Student.AsQueryable().Where(expStudent)
  304. join educl in EducationMissionClassRepository.Entities
  305. on evstust.EducationMissionClassID equals educl.EducationMissionClassID
  306. join edu in EducationMissionRepository.Entities
  307. on educl.EducationMissionID equals edu.EducationMissionID
  308. join sy in SchoolyearRepository.Entities
  309. on edu.SchoolyearID equals sy.SchoolyearID
  310. join cou in CoursematerialRepository.Entities
  311. on educl.CoursematerialID equals cou.CoursematerialID
  312. from dep in DepartmentRepository.Entities.Where(x => x.DepartmentID == edu.DepartmentID)
  313. join evtb in EvaluationTableRepository.Entities
  314. on evstust.EvaluationTableID equals evtb.EvaluationTableID
  315. join evpt in EvaluationParticipateTypeRepository.Entities
  316. on evtb.EvaluationParticipateTypeID equals evpt.EvaluationParticipateTypeID
  317. join evtp in EvaluationIntTypeRepository.Entities
  318. on evtb.EvaluationIntTypeID equals evtp.EvaluationIntTypeID
  319. join sf in StaffRepository.Entities
  320. on evstust.UserID equals sf.UserID
  321. from cl in ClassmajorRepository.Entities.Where(x => x.ClassmajorID == stu.ClassmajorID)
  322. from gr in GrademajorRepository.Entities.Where(x => x.GrademajorID == cl.GrademajorID)
  323. from fa in FacultymajorRepository.Entities.Where(x => x.FacultymajorID == gr.FacultymajorID)
  324. from col in CollegeRepository.Entities.Where(x => x.CollegeID == fa.CollegeID)
  325. from cam in CampusRepository.Entities.Where(x => x.CampusID == col.CampusID)
  326. from sfus in UserRepository.Entities.Where(x => x.UserID == sf.UserID)
  327. from evstu in evstust.EM_EvaluationStudent.Where(x => x.UserID == stu.UserID).DefaultIfEmpty()
  328. select new EvaluationStudentView
  329. {
  330. EvaluationStudentID = evstu.EvaluationStudentID == null ? Guid.Empty : evstu.EvaluationStudentID,
  331. EvaluationStudentSettingID = evstust.EvaluationStudentSettingID,
  332. UserID = stu.UserID,
  333. SexID = stu.SexID,
  334. InSchoolStatusID = stu.InSchoolStatusID,
  335. StandardID = fa.StandardID,
  336. EducationID = fa.EducationID,
  337. LearningformID = fa.LearningformID,
  338. LearnSystem = fa.LearnSystem,
  339. ClassmajorID = stu.ClassmajorID,
  340. GradeID = gr.GradeID,
  341. GrademajorID = cl.GrademajorID,
  342. FacultymajorID = gr.FacultymajorID,
  343. CollegeID = fa.CollegeID,
  344. CampusID = col.CampusID,
  345. EducationMissionClassID = evstust.EducationMissionClassID,
  346. EducationMissionID = educl.EducationMissionID,
  347. SchoolyearID = edu.SchoolyearID,
  348. SchoolyearValue = sy.Value,
  349. SchoolyearCode = sy.Code,
  350. MissionName = edu.ClassName,
  351. MissionClassName = educl.Name,
  352. CoursematerialID = educl.CoursematerialID,
  353. CourseCode = cou.CourseCode,
  354. CourseName = cou.CourseName,
  355. CourseStructureID = educl.CourseStructureID,
  356. CourseCategoryID = educl.CourseCategoryID,
  357. CourseTypeID = educl.CourseTypeID,
  358. CourseQualityID = educl.CourseQualityID,
  359. Credit = educl.EM_EducationMissionClassTeachingSetting.Credit ?? 0,
  360. DepartmentID = edu.DepartmentID,
  361. DepartmentNo = dep.No,
  362. DepartmentName = dep.Name,
  363. HandleModeID = educl.HandleModeID,
  364. TeachingModeID = educl.TeachingModeID,
  365. MissionClassStatus = educl.RecordStatus,
  366. EvaluationTableID = evstust.EvaluationTableID,
  367. EvaluationTableCode = evtb.Code,
  368. EvaluationTableName = evtb.Name,
  369. EvaluationTableWeight = evtb.Weight,
  370. EvaluationParticipateTypeID = evtb.EvaluationParticipateTypeID,
  371. ParticipateTypeID = evpt.ParticipateTypeID,
  372. EvaluationTypeID = evtb.EvaluationIntTypeID,
  373. EvaluationTypeCode = evtp.Code,
  374. EvaluationTypeName = evtp.Name,
  375. StaffUserID = evstust.UserID,
  376. StaffCode = sfus.LoginID,
  377. StaffName = sfus.Name,
  378. TitleID = sf.TitleID,
  379. StaffPhotoUrl = sf.PhotoUrl,
  380. TeachingMethodID = evstust.TeachingMethodID,
  381. OpenState = evstust.OpenState.Value,
  382. Number = evpt.Number ?? 0,
  383. StartTime = evpt.StartTime,
  384. EndTime = evpt.EndTime,
  385. Numbered = evstu.EvaluationStudentID == null ? 0 : evstu.Numbered ?? 0,
  386. TotalScore = evstu.EvaluationStudentID == null ? 0 : evstu.TotalScore ?? 0,
  387. Advice = evstu.EvaluationStudentID == null ? null : evstu.Advice
  388. };
  389. return query;
  390. }
  391. /// <summary>
  392. /// 查询对应的学评学生评分明细信息EvaluationStudentDetailView
  393. /// </summary>
  394. /// <param name="exp"></param>
  395. /// <returns></returns>
  396. public IQueryable<EvaluationStudentDetailView> GetEvaluationStudentDetailViewQueryable(Expression<Func<EM_EvaluationStudentDetail, bool>> exp)
  397. {
  398. var query = from evstudl in EvaluationStudentDetailRepository.GetList(exp)
  399. join evstu in EvaluationStudentRepository.Entities
  400. on evstudl.EvaluationStudentID equals evstu.EvaluationStudentID
  401. join evstudlpr in EvaluationProjectRepository.Entities
  402. on evstudl.EvaluationProjectID equals evstudlpr.EvaluationProjectID
  403. join evstudltg in EvaluationTargetRepository.Entities
  404. on evstudlpr.EvaluationTargetID equals evstudltg.EvaluationTargetID
  405. join evstudltb in EvaluationTableRepository.Entities
  406. on evstudltg.EvaluationTableID equals evstudltb.EvaluationTableID
  407. join evpt in EvaluationParticipateTypeRepository.Entities
  408. on evstudltb.EvaluationParticipateTypeID equals evpt.EvaluationParticipateTypeID
  409. join evstudltp in EvaluationIntTypeRepository.Entities
  410. on evstudltb.EvaluationIntTypeID equals evstudltp.EvaluationIntTypeID
  411. join stu in StudentRepository.Entities
  412. on evstu.UserID equals stu.UserID
  413. join evstust in EvaluationStudentSettingRepository.Entities
  414. on evstu.EvaluationStudentSettingID equals evstust.EvaluationStudentSettingID
  415. join educl in EducationMissionClassRepository.Entities
  416. on evstust.EducationMissionClassID equals educl.EducationMissionClassID
  417. join edu in EducationMissionRepository.Entities
  418. on educl.EducationMissionID equals edu.EducationMissionID
  419. join sy in SchoolyearRepository.Entities
  420. on edu.SchoolyearID equals sy.SchoolyearID
  421. join cou in CoursematerialRepository.Entities
  422. on educl.CoursematerialID equals cou.CoursematerialID
  423. join dep in DepartmentRepository.Entities
  424. on edu.DepartmentID equals dep.DepartmentID
  425. join sf in StaffRepository.Entities
  426. on evstust.UserID equals sf.UserID
  427. join cl in ClassmajorRepository.Entities
  428. on stu.ClassmajorID equals cl.ClassmajorID
  429. join gr in GrademajorRepository.Entities
  430. on cl.GrademajorID equals gr.GrademajorID
  431. join fa in FacultymajorRepository.Entities
  432. on gr.FacultymajorID equals fa.FacultymajorID
  433. join col in CollegeRepository.Entities
  434. on fa.CollegeID equals col.CollegeID
  435. join cam in CampusRepository.Entities
  436. on col.CampusID equals cam.CampusID
  437. join sfus in UserRepository.Entities
  438. on sf.UserID equals sfus.UserID
  439. join stuus in UserRepository.Entities
  440. on stu.UserID equals stuus.UserID
  441. select new EvaluationStudentDetailView
  442. {
  443. EvaluationStudentDetailID = evstudl.EvaluationStudentDetailID,
  444. EvaluationStudentID = evstudl.EvaluationStudentID,
  445. UserID = evstu.UserID,
  446. StudentNo = stuus.LoginID,
  447. Name = stuus.Name,
  448. SexID = stu.SexID,
  449. BirthDate = stu.BirthDate,
  450. NationID = stu.NationID,
  451. PoliticsID = stu.PoliticsID,
  452. InSchoolStatusID = stu.InSchoolStatusID,
  453. StudentStatus = stu.StudentStatus,
  454. StandardID = fa.StandardID,
  455. EducationID = fa.EducationID,
  456. LearningformID = fa.LearningformID,
  457. LearnSystem = fa.LearnSystem,
  458. ClassmajorID = stu.ClassmajorID,
  459. ClassmajorNo = cl.No,
  460. ClassmajorName = cl.Name,
  461. ClassNum = cl.ClassNum,
  462. GradeID = gr.GradeID,
  463. GrademajorID = cl.GrademajorID,
  464. GrademajorCode = gr.Code,
  465. GrademajorName = gr.Name,
  466. FacultymajorID = gr.FacultymajorID,
  467. FacultymajorCode = fa.Code,
  468. FacultymajorName = fa.Name,
  469. CollegeID = fa.CollegeID,
  470. CollegeNo = col.No,
  471. CollegeName = col.Name,
  472. CampusID = col.CampusID,
  473. CampusNo = cam.No,
  474. CampusName = cam.Name,
  475. EvaluationStudentSettingID = evstu.EvaluationStudentSettingID,
  476. EducationMissionClassID = evstust.EducationMissionClassID,
  477. EducationMissionID = educl.EducationMissionID,
  478. SchoolyearID = edu.SchoolyearID,
  479. SchoolyearValue = sy.Value,
  480. SchoolyearCode = sy.Code,
  481. MissionName = edu.ClassName,
  482. MissionClassName = educl.Name,
  483. CoursematerialID = educl.CoursematerialID,
  484. CourseCode = cou.CourseCode,
  485. CourseName = cou.CourseName,
  486. CourseStructureID = educl.CourseStructureID,
  487. CourseCategoryID = educl.CourseCategoryID,
  488. CourseTypeID = educl.CourseTypeID,
  489. CourseQualityID = educl.CourseQualityID,
  490. Credit = educl.EM_EducationMissionClassTeachingSetting.Credit ?? 0,
  491. DepartmentID = edu.DepartmentID,
  492. DepartmentNo = dep.No,
  493. DepartmentName = dep.Name,
  494. HandleModeID = educl.HandleModeID,
  495. TeachingModeID = educl.TeachingModeID,
  496. MissionClassStatus = educl.RecordStatus,
  497. StaffUserID = evstust.UserID,
  498. StaffCode = sfus.LoginID,
  499. StaffName = sfus.Name,
  500. TitleID = sf.TitleID,
  501. TeachingMethodID = evstust.TeachingMethodID,
  502. EvaluationProjectID = evstudl.EvaluationProjectID,
  503. EvaluationProjectOrderNo = evstudlpr.OrderNo,
  504. EvaluationProjectCode = evstudlpr.Code,
  505. EvaluationProjectName = evstudlpr.Name,
  506. EvaluationTargetID = evstudlpr.EvaluationTargetID,
  507. EvaluationTargetOrderNo = evstudltg.OrderNo,
  508. EvaluationTargetCode = evstudltg.Code,
  509. EvaluationTargetName = evstudltg.Name,
  510. EvaluationTableID = evstudltg.EvaluationTableID,
  511. EvaluationTableCode = evstudltb.Code,
  512. EvaluationTableName = evstudltb.Name,
  513. EvaluationParticipateTypeID = evstudltb.EvaluationParticipateTypeID,
  514. ParticipateTypeID = evpt.ParticipateTypeID,
  515. EvaluationTypeID = evstudltb.EvaluationIntTypeID,
  516. EvaluationTypeCode = evstudltp.Code,
  517. EvaluationTypeName = evstudltp.Name,
  518. Score = evstudl.Score,
  519. Remark = evstudl.Remark,
  520. RecordStatus = evstudl.RecordStatus,
  521. CreateUserID = evstudl.CreateUserID,
  522. CreateTime = evstudl.CreateTime,
  523. ModifyUserID = evstudl.ModifyUserID,
  524. ModifyTime = evstudl.ModifyTime
  525. };
  526. return query;
  527. }
  528. }
  529. }