CheckingCollectDAL.cs 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Linq.Expressions;
  6. using EMIS.Entities;
  7. using EMIS.DataLogic.Repositories;
  8. using EMIS.ViewModel.StudentManage.OnlineChecking;
  9. using EMIS.ViewModel.StudentManage.StudentProfile;
  10. namespace EMIS.DataLogic.StudentManage.OnlineChecking
  11. {
  12. public class CheckingCollectDAL
  13. {
  14. public StudentRecordChangeHistoryRepository StudentRecordChangeHistoryRepository { get; set; }
  15. public StudentEditColumnDescriptionRepository StudentEditColumnDescriptionRepository { get; set; }
  16. public StudentContrastRepository StudentContrastRepository { get; set; }
  17. public StudentSourceRepository StudentSourceRepository { get; set; }
  18. public StudentRepository StudentRepository { get; set; }
  19. public StudentProfileRepository StudentProfileRepository { get; set; }
  20. public StudentProfileContrastRepository StudentProfileContrastRepository { get; set; }
  21. public StudentProfileSourceRepository StudentProfileSourceRepository { get; set; }
  22. public StudentContactRepository StudentContactRepository { get; set; }
  23. public StudentContactContrastRepository StudentContactContrastRepository { get; set; }
  24. public StudentContactSourceRepository StudentContactSourceRepository { get; set; }
  25. public StudentAccountRepository StudentAccountRepository { get; set; }
  26. public StudentAccountContrastRepository StudentAccountContrastRepository { get; set; }
  27. public StudentAccountSourceRepository StudentAccountSourceRepository { get; set; }
  28. public RecruitstudentsRepository RecruitstudentsRepository { get; set; }
  29. public RecruitstudentsContrastRepository RecruitstudentsContrastRepository { get; set; }
  30. public RecruitstudentsSourceRepository RecruitstudentsSourceRepository { get; set; }
  31. public ClassmajorRepository ClassmajorRepository { get; set; }
  32. public GrademajorRepository GrademajorRepository { get; set; }
  33. public FacultymajorRepository FacultymajorRepository { get; set; }
  34. public CollegeRepository CollegeRepository { get; set; }
  35. public CampusRepository CampusRepository { get; set; }
  36. public UserRepository UserRepository { get; set; }
  37. public UserContrastRepository UserContrastRepository { get; set; }
  38. public UserSourceRepository UserSourceRepository { get; set; }
  39. /// <summary>
  40. /// 查询对应的校对记录信息CheckingHistoryView
  41. /// </summary>
  42. /// <param name="expStudentRecordChangeHistory"></param>
  43. /// <returns></returns>
  44. public IQueryable<CheckingHistoryView> GetCheckingHistoryViewQueryable(Expression<Func<CF_StudentRecordChangeHistory, bool>> expStudentRecordChangeHistory)
  45. {
  46. var query = from stuhis in StudentRecordChangeHistoryRepository.GetList(expStudentRecordChangeHistory)
  47. join stucst in StudentContrastRepository.Entities
  48. on stuhis.StudentContrastID equals stucst.StudentContrastID
  49. join stu in StudentRepository.Entities
  50. on stucst.UserID equals stu.UserID
  51. join stusou in StudentSourceRepository.Entities
  52. on stucst.StudentContrastID equals stusou.StudentContrastID
  53. join uscst in UserContrastRepository.Entities
  54. on stucst.StudentContrastID equals uscst.StudentContrastID
  55. join ussou in UserSourceRepository.Entities
  56. on stucst.StudentContrastID equals ussou.StudentContrastID
  57. join stupfcst in StudentProfileContrastRepository.Entities
  58. on stucst.StudentContrastID equals stupfcst.StudentContrastID
  59. join stupfsou in StudentProfileSourceRepository.Entities
  60. on stucst.StudentContrastID equals stupfsou.StudentContrastID
  61. join stuctcst in StudentContactContrastRepository.Entities
  62. on stucst.StudentContrastID equals stuctcst.StudentContrastID
  63. join stuctsou in StudentContactSourceRepository.Entities
  64. on stucst.StudentContrastID equals stuctsou.StudentContrastID
  65. join stuaccst in StudentAccountContrastRepository.Entities
  66. on stucst.StudentContrastID equals stuaccst.StudentContrastID
  67. join stuacsou in StudentAccountSourceRepository.Entities
  68. on stucst.StudentContrastID equals stuacsou.StudentContrastID
  69. join sturtcst in RecruitstudentsContrastRepository.Entities
  70. on stucst.StudentContrastID equals sturtcst.StudentContrastID
  71. join sturtsou in RecruitstudentsSourceRepository.Entities
  72. on stucst.StudentContrastID equals sturtsou.StudentContrastID
  73. join pf in StudentProfileRepository.Entities
  74. on stu.UserID equals pf.UserID into temppf
  75. from stupf in temppf.DefaultIfEmpty()
  76. join ct in StudentContactRepository.Entities
  77. on stu.UserID equals ct.UserID into tempct
  78. from stuct in tempct.DefaultIfEmpty()
  79. join ac in StudentAccountRepository.Entities
  80. on stu.UserID equals ac.UserID into tempac
  81. from stuac in tempac.DefaultIfEmpty()
  82. join rt in RecruitstudentsRepository.Entities
  83. on stu.UserID equals rt.UserID into temprt
  84. from sturt in temprt.DefaultIfEmpty()
  85. join cl in ClassmajorRepository.Entities
  86. on stu.ClassmajorID equals cl.ClassmajorID
  87. join gr in GrademajorRepository.Entities
  88. on cl.GrademajorID equals gr.GrademajorID
  89. join fa in FacultymajorRepository.Entities
  90. on gr.FacultymajorID equals fa.FacultymajorID
  91. join col in CollegeRepository.Entities
  92. on fa.CollegeID equals col.CollegeID
  93. join cam in CampusRepository.Entities
  94. on col.CampusID equals cam.CampusID
  95. join us in UserRepository.Entities
  96. on stu.UserID equals us.UserID
  97. join ecd in StudentEditColumnDescriptionRepository.Entities
  98. on new { stuhis.TableName, stuhis.ColumnName } equals new { ecd.TableName, ecd.ColumnName } into tempecd
  99. from stuecd in tempecd.DefaultIfEmpty()
  100. select new CheckingHistoryView
  101. {
  102. StudentRecordChangeHistoryID = stuhis.StudentRecordChangeHistoryID,
  103. StudentContrastID = stucst.StudentContrastID,
  104. TableName = stuhis.TableName,
  105. ColumnName = stuhis.ColumnName,
  106. DisplayPropertyName = stuecd.DisplayPropertyName,
  107. Description = stuecd.Description,
  108. CheckingTypeID = stuhis.CheckingTypeID,
  109. UserID = stu.UserID,
  110. StudentNo = us.LoginID,
  111. LoginID = us.LoginID,
  112. ExamineeNum = sturt.ExamineeNum,
  113. AdmissionTicketNo = sturt.AdmissionTicketNo,
  114. Name = us.Name,
  115. UserName = us.Name,
  116. UsedName = stupf.UsedName,
  117. ClassmajorID = stu.ClassmajorID,
  118. ClassmajorNo = cl.No,
  119. ClassmajorName = cl.Name,
  120. ClassNum = cl.ClassNum,
  121. StandardID = fa.StandardID,
  122. EducationID = fa.EducationID,
  123. LearningformID = fa.LearningformID,
  124. LearnSystem = fa.LearnSystem,
  125. FacultymajorID = gr.FacultymajorID,
  126. FacultymajorCode = fa.Code,
  127. FacultymajorName = fa.Name,
  128. GradeID = gr.GradeID,
  129. SemesterID = gr.SemesterID,
  130. GrademajorID = cl.GrademajorID,
  131. GrademajorCode = gr.Code,
  132. GrademajorName = gr.Name,
  133. CollegeID = fa.CollegeID,
  134. CollegeNo = col.No,
  135. CollegeName = col.Name,
  136. CampusID = col.CampusID,
  137. CampusCode = cam.No,
  138. CampusName = cam.Name,
  139. Country = stupf.Country,
  140. Place = stupf.Place,
  141. BornPlace = stupf.BornPlace,
  142. SexID = stu.SexID,
  143. BirthDate = stu.BirthDate,
  144. NationID = stu.NationID,
  145. PoliticsID = stu.PoliticsID,
  146. CertificatesType = stu.CertificatesType,
  147. IDNumber = stu.IDNumber,
  148. StudentType = stu.StudentType,
  149. InSchoolStatusID = stu.InSchoolStatusID,
  150. StudentStatus = stu.StudentStatus,
  151. ExamineeType = sturt.ExamineeType,
  152. EntranceDate = sturt.EntranceDate,
  153. LiteracyLevelID = stupf.LiteracyLevelID,
  154. CultureModelID = stupf.CultureModelID,
  155. IsDreamProject = stupf.IsDreamProject ?? false,
  156. Email = stuct.Email,
  157. Telephone = stuct.Telephone,
  158. Mobile = stuct.Mobile,
  159. ZIPCode = stuct.ZIPCode,
  160. WeChatNum = stuct.WeChatNum,
  161. QQ = stuct.QQ,
  162. HealthStateID = stupf.HealthStateID,
  163. BloodGroup = stupf.BloodGroup,
  164. Specialty = stupf.Specialty,
  165. Height = stupf.Height,
  166. Weight = stupf.Weight,
  167. DirectorName = stupf.DirectorName,
  168. Score = sturt.Score,
  169. EntranceWayID = sturt.EntranceWayID,
  170. FeaturesID = sturt.FeaturesID,
  171. TerritorialID = sturt.TerritorialID,
  172. Area = sturt.Area,
  173. HomeAddress = stuct.HomeAddress,
  174. WorkUnit = stuct.WorkUnit,
  175. Address = stuct.Address,
  176. Recipient = stuct.Recipient,
  177. Dormitory = stuct.Dormitory,
  178. BankName = stuac.BankName,
  179. CardNo = stuac.CardNo,
  180. StudentCardNo = stu.StudentCardNo,
  181. PhotoUrl = stu.PhotoUrl,
  182. PlanningGraduateDate = stu.PlanningGraduateDate,
  183. GraduateDate = stu.GraduateDate,
  184. GraduateCardNo = stu.GraduateCardNo,
  185. ReplaceGraduateNo = stu.ReplaceGraduateNo,
  186. DegreeStatus = stu.DegreeStatus ?? false,
  187. GraduationPictureUrl = stu.GraduationPictureUrl,
  188. Career = stu.Career,
  189. IsProofread = stu.IsProofread ?? false,
  190. Remark = stu.Remark,
  191. IP = stucst.IP,
  192. ApprovalStatus = stucst.ApprovalStatus,
  193. Comment = stucst.Comment,
  194. ApprovalTime = stucst.ModifyTime,
  195. StudentViewSource = new StudentView()
  196. {
  197. UserID = stucst.UserID,
  198. StudentNo = ussou.LoginID,
  199. LoginID = ussou.LoginID,
  200. ExamineeNum = sturtsou.ExamineeNum,
  201. AdmissionTicketNo = sturtsou.AdmissionTicketNo,
  202. Name = ussou.Name,
  203. UserName = ussou.Name,
  204. UsedName = stupfsou.UsedName,
  205. ClassmajorID = stu.ClassmajorID,
  206. ClassmajorNo = cl.No,
  207. ClassmajorName = cl.Name,
  208. ClassNum = cl.ClassNum,
  209. StandardID = fa.StandardID,
  210. EducationID = fa.EducationID,
  211. LearningformID = fa.LearningformID,
  212. LearnSystem = fa.LearnSystem,
  213. FacultymajorID = gr.FacultymajorID,
  214. FacultymajorCode = fa.Code,
  215. FacultymajorName = fa.Name,
  216. GradeID = gr.GradeID,
  217. SemesterID = gr.SemesterID,
  218. GrademajorID = cl.GrademajorID,
  219. GrademajorCode = gr.Code,
  220. GrademajorName = gr.Name,
  221. CollegeID = fa.CollegeID,
  222. CollegeNo = col.No,
  223. CollegeName = col.Name,
  224. CampusID = col.CampusID,
  225. CampusCode = cam.No,
  226. CampusName = cam.Name,
  227. Country = stupfsou.Country,
  228. Place = stupfsou.Place,
  229. BornPlace = stupfsou.BornPlace,
  230. SexID = stusou.SexID,
  231. BirthDate = stusou.BirthDate,
  232. NationID = stusou.NationID,
  233. PoliticsID = stusou.PoliticsID,
  234. CertificatesType = stusou.CertificatesType,
  235. IDNumber = stusou.IDNumber,
  236. StudentType = stusou.StudentType,
  237. InSchoolStatusID = stusou.InSchoolStatusID,
  238. StudentStatus = stusou.StudentStatus,
  239. ExamineeType = sturtsou.ExamineeType,
  240. EntranceDate = sturtsou.EntranceDate,
  241. LiteracyLevelID = stupfsou.LiteracyLevelID,
  242. CultureModelID = stupfsou.CultureModelID,
  243. IsDreamProject = stupfsou.IsDreamProject ?? false,
  244. Email = stuctsou.Email,
  245. Telephone = stuctsou.Telephone,
  246. Mobile = stuctsou.Mobile,
  247. ZIPCode = stuctsou.ZIPCode,
  248. WeChatNum = stuctsou.WeChatNum,
  249. QQ = stuctsou.QQ,
  250. HealthStateID = stupfsou.HealthStateID,
  251. BloodGroup = stupfsou.BloodGroup,
  252. Specialty = stupfsou.Specialty,
  253. Height = stupfsou.Height,
  254. Weight = stupfsou.Weight,
  255. DirectorName = stupfsou.DirectorName,
  256. Score = sturtsou.Score,
  257. EntranceWayID = sturtsou.EntranceWayID,
  258. FeaturesID = sturtsou.FeaturesID,
  259. TerritorialID = sturtsou.TerritorialID,
  260. Area = sturtsou.Area,
  261. HomeAddress = stuctsou.HomeAddress,
  262. WorkUnit = stuctsou.WorkUnit,
  263. Address = stuctsou.Address,
  264. Recipient = stuctsou.Recipient,
  265. Dormitory = stuctsou.Dormitory,
  266. BankName = stuacsou.BankName,
  267. CardNo = stuacsou.CardNo,
  268. RecruitPictureUrl = sturtsou.RecruitPictureUrl,
  269. StudentCardNo = stusou.StudentCardNo,
  270. PhotoUrl = stusou.PhotoUrl,
  271. PlanningGraduateDate = stusou.PlanningGraduateDate,
  272. GraduateDate = stusou.GraduateDate,
  273. GraduateCardNo = stusou.GraduateCardNo,
  274. ReplaceGraduateNo = stusou.ReplaceGraduateNo,
  275. DegreeStatus = stusou.DegreeStatus ?? false,
  276. GraduationPictureUrl = stusou.GraduationPictureUrl,
  277. Career = stusou.Career,
  278. IsPhotoComparison = stusou.IsPhotoComparison ?? false,
  279. IsProofread = stusou.IsProofread ?? false,
  280. Remark = stusou.Remark
  281. },
  282. StudentViewContrast = new StudentView()
  283. {
  284. UserID = stucst.UserID,
  285. StudentNo = uscst.LoginID,
  286. LoginID = uscst.LoginID,
  287. ExamineeNum = sturtcst.ExamineeNum,
  288. AdmissionTicketNo = sturtcst.AdmissionTicketNo,
  289. Name = uscst.Name,
  290. UserName = uscst.Name,
  291. UsedName = stupfcst.UsedName,
  292. ClassmajorID = stu.ClassmajorID,
  293. ClassmajorNo = cl.No,
  294. ClassmajorName = cl.Name,
  295. ClassNum = cl.ClassNum,
  296. StandardID = fa.StandardID,
  297. EducationID = fa.EducationID,
  298. LearningformID = fa.LearningformID,
  299. LearnSystem = fa.LearnSystem,
  300. FacultymajorID = gr.FacultymajorID,
  301. FacultymajorCode = fa.Code,
  302. FacultymajorName = fa.Name,
  303. GradeID = gr.GradeID,
  304. SemesterID = gr.SemesterID,
  305. GrademajorID = cl.GrademajorID,
  306. GrademajorCode = gr.Code,
  307. GrademajorName = gr.Name,
  308. CollegeID = fa.CollegeID,
  309. CollegeNo = col.No,
  310. CollegeName = col.Name,
  311. CampusID = col.CampusID,
  312. CampusCode = cam.No,
  313. CampusName = cam.Name,
  314. Country = stupfcst.Country,
  315. Place = stupfcst.Place,
  316. BornPlace = stupfcst.BornPlace,
  317. SexID = stucst.SexID,
  318. BirthDate = stucst.BirthDate,
  319. NationID = stucst.NationID,
  320. PoliticsID = stucst.PoliticsID,
  321. CertificatesType = stucst.CertificatesType,
  322. IDNumber = stucst.IDNumber,
  323. StudentType = stucst.StudentType,
  324. InSchoolStatusID = stucst.InSchoolStatusID,
  325. StudentStatus = stucst.StudentStatus,
  326. ExamineeType = sturtcst.ExamineeType,
  327. EntranceDate = sturtcst.EntranceDate,
  328. LiteracyLevelID = stupfcst.LiteracyLevelID,
  329. CultureModelID = stupfcst.CultureModelID,
  330. IsDreamProject = stupfcst.IsDreamProject ?? false,
  331. Email = stuctcst.Email,
  332. Telephone = stuctcst.Telephone,
  333. Mobile = stuctcst.Mobile,
  334. ZIPCode = stuctcst.ZIPCode,
  335. WeChatNum = stuctcst.WeChatNum,
  336. QQ = stuctcst.QQ,
  337. HealthStateID = stupfcst.HealthStateID,
  338. BloodGroup = stupfcst.BloodGroup,
  339. Specialty = stupfcst.Specialty,
  340. Height = stupfcst.Height,
  341. Weight = stupfcst.Weight,
  342. DirectorName = stupfcst.DirectorName,
  343. Score = sturtcst.Score,
  344. EntranceWayID = sturtcst.EntranceWayID,
  345. FeaturesID = sturtcst.FeaturesID,
  346. TerritorialID = sturtcst.TerritorialID,
  347. Area = sturtcst.Area,
  348. HomeAddress = stuctcst.HomeAddress,
  349. WorkUnit = stuctcst.WorkUnit,
  350. Address = stuctcst.Address,
  351. Recipient = stuctcst.Recipient,
  352. Dormitory = stuctcst.Dormitory,
  353. BankName = stuaccst.BankName,
  354. CardNo = stuaccst.CardNo,
  355. RecruitPictureUrl = sturtcst.RecruitPictureUrl,
  356. StudentCardNo = stucst.StudentCardNo,
  357. PhotoUrl = stucst.PhotoUrl,
  358. PlanningGraduateDate = stucst.PlanningGraduateDate,
  359. GraduateDate = stucst.GraduateDate,
  360. GraduateCardNo = stucst.GraduateCardNo,
  361. ReplaceGraduateNo = stucst.ReplaceGraduateNo,
  362. DegreeStatus = stucst.DegreeStatus ?? false,
  363. GraduationPictureUrl = stucst.GraduationPictureUrl,
  364. Career = stucst.Career,
  365. IsPhotoComparison = stucst.IsPhotoComparison ?? false,
  366. IsProofread = stucst.IsProofread ?? false,
  367. Remark = stucst.Remark
  368. },
  369. RecordStatus = stuhis.RecordStatus,
  370. CreateUserID = stuhis.CreateUserID,
  371. CreateTime = stuhis.CreateTime,
  372. ModifyUserID = stuhis.ModifyUserID,
  373. ModifyTime = stuhis.ModifyTime
  374. };
  375. return query;
  376. }
  377. /// <summary>
  378. /// 查询对应的校对记录信息CheckingHistoryView
  379. /// </summary>
  380. /// <param name="expStudentRecordChangeHistory"></param>
  381. /// <param name="expStudentContrast"></param>
  382. /// <param name="expStudent"></param>
  383. /// <returns></returns>
  384. public IQueryable<CheckingHistoryView> GetCheckingHistoryViewQueryable(Expression<Func<CF_StudentRecordChangeHistory, bool>> expStudentRecordChangeHistory,
  385. Expression<Func<CF_StudentContrast, bool>> expStudentContrast, Expression<Func<CF_Student, bool>> expStudent)
  386. {
  387. var query = from stuhis in StudentRecordChangeHistoryRepository.GetList(expStudentRecordChangeHistory)
  388. join stucst in StudentContrastRepository.GetList(expStudentContrast)
  389. on stuhis.StudentContrastID equals stucst.StudentContrastID
  390. join stu in StudentRepository.GetList(expStudent)
  391. on stucst.UserID equals stu.UserID
  392. join stusou in StudentSourceRepository.Entities
  393. on stucst.StudentContrastID equals stusou.StudentContrastID
  394. join uscst in UserContrastRepository.Entities
  395. on stucst.StudentContrastID equals uscst.StudentContrastID
  396. join ussou in UserSourceRepository.Entities
  397. on stucst.StudentContrastID equals ussou.StudentContrastID
  398. join stupfcst in StudentProfileContrastRepository.Entities
  399. on stucst.StudentContrastID equals stupfcst.StudentContrastID
  400. join stupfsou in StudentProfileSourceRepository.Entities
  401. on stucst.StudentContrastID equals stupfsou.StudentContrastID
  402. join stuctcst in StudentContactContrastRepository.Entities
  403. on stucst.StudentContrastID equals stuctcst.StudentContrastID
  404. join stuctsou in StudentContactSourceRepository.Entities
  405. on stucst.StudentContrastID equals stuctsou.StudentContrastID
  406. join stuaccst in StudentAccountContrastRepository.Entities
  407. on stucst.StudentContrastID equals stuaccst.StudentContrastID
  408. join stuacsou in StudentAccountSourceRepository.Entities
  409. on stucst.StudentContrastID equals stuacsou.StudentContrastID
  410. join sturtcst in RecruitstudentsContrastRepository.Entities
  411. on stucst.StudentContrastID equals sturtcst.StudentContrastID
  412. join sturtsou in RecruitstudentsSourceRepository.Entities
  413. on stucst.StudentContrastID equals sturtsou.StudentContrastID
  414. join pf in StudentProfileRepository.Entities
  415. on stu.UserID equals pf.UserID into temppf
  416. from stupf in temppf.DefaultIfEmpty()
  417. join ct in StudentContactRepository.Entities
  418. on stu.UserID equals ct.UserID into tempct
  419. from stuct in tempct.DefaultIfEmpty()
  420. join ac in StudentAccountRepository.Entities
  421. on stu.UserID equals ac.UserID into tempac
  422. from stuac in tempac.DefaultIfEmpty()
  423. join rt in RecruitstudentsRepository.Entities
  424. on stu.UserID equals rt.UserID into temprt
  425. from sturt in temprt.DefaultIfEmpty()
  426. join cl in ClassmajorRepository.Entities
  427. on stu.ClassmajorID equals cl.ClassmajorID
  428. join gr in GrademajorRepository.Entities
  429. on cl.GrademajorID equals gr.GrademajorID
  430. join fa in FacultymajorRepository.Entities
  431. on gr.FacultymajorID equals fa.FacultymajorID
  432. join col in CollegeRepository.Entities
  433. on fa.CollegeID equals col.CollegeID
  434. join cam in CampusRepository.Entities
  435. on col.CampusID equals cam.CampusID
  436. join us in UserRepository.Entities
  437. on stu.UserID equals us.UserID
  438. join ecd in StudentEditColumnDescriptionRepository.Entities
  439. on new { stuhis.TableName, stuhis.ColumnName } equals new { ecd.TableName, ecd.ColumnName } into tempecd
  440. from stuecd in tempecd.DefaultIfEmpty()
  441. select new CheckingHistoryView
  442. {
  443. StudentRecordChangeHistoryID = stuhis.StudentRecordChangeHistoryID,
  444. StudentContrastID = stucst.StudentContrastID,
  445. TableName = stuhis.TableName,
  446. ColumnName = stuhis.ColumnName,
  447. DisplayPropertyName = stuecd.DisplayPropertyName,
  448. Description = stuecd.Description,
  449. CheckingTypeID = stuhis.CheckingTypeID,
  450. UserID = stu.UserID,
  451. StudentNo = us.LoginID,
  452. LoginID = us.LoginID,
  453. ExamineeNum = sturt.ExamineeNum,
  454. AdmissionTicketNo = sturt.AdmissionTicketNo,
  455. Name = us.Name,
  456. UserName = us.Name,
  457. UsedName = stupf.UsedName,
  458. ClassmajorID = stu.ClassmajorID,
  459. ClassmajorNo = cl.No,
  460. ClassmajorName = cl.Name,
  461. ClassNum = cl.ClassNum,
  462. StandardID = fa.StandardID,
  463. EducationID = fa.EducationID,
  464. LearningformID = fa.LearningformID,
  465. LearnSystem = fa.LearnSystem,
  466. FacultymajorID = gr.FacultymajorID,
  467. FacultymajorCode = fa.Code,
  468. FacultymajorName = fa.Name,
  469. GradeID = gr.GradeID,
  470. SemesterID = gr.SemesterID,
  471. GrademajorID = cl.GrademajorID,
  472. GrademajorCode = gr.Code,
  473. GrademajorName = gr.Name,
  474. CollegeID = fa.CollegeID,
  475. CollegeNo = col.No,
  476. CollegeName = col.Name,
  477. CampusID = col.CampusID,
  478. CampusCode = cam.No,
  479. CampusName = cam.Name,
  480. Country = stupf.Country,
  481. Place = stupf.Place,
  482. BornPlace = stupf.BornPlace,
  483. SexID = stu.SexID,
  484. BirthDate = stu.BirthDate,
  485. NationID = stu.NationID,
  486. PoliticsID = stu.PoliticsID,
  487. CertificatesType = stu.CertificatesType,
  488. IDNumber = stu.IDNumber,
  489. StudentType = stu.StudentType,
  490. InSchoolStatusID = stu.InSchoolStatusID,
  491. StudentStatus = stu.StudentStatus,
  492. ExamineeType = sturt.ExamineeType,
  493. EntranceDate = sturt.EntranceDate,
  494. LiteracyLevelID = stupf.LiteracyLevelID,
  495. CultureModelID = stupf.CultureModelID,
  496. IsDreamProject = stupf.IsDreamProject ?? false,
  497. Email = stuct.Email,
  498. Telephone = stuct.Telephone,
  499. Mobile = stuct.Mobile,
  500. ZIPCode = stuct.ZIPCode,
  501. WeChatNum = stuct.WeChatNum,
  502. QQ = stuct.QQ,
  503. HealthStateID = stupf.HealthStateID,
  504. BloodGroup = stupf.BloodGroup,
  505. Specialty = stupf.Specialty,
  506. Height = stupf.Height,
  507. Weight = stupf.Weight,
  508. DirectorName = stupf.DirectorName,
  509. Score = sturt.Score,
  510. EntranceWayID = sturt.EntranceWayID,
  511. FeaturesID = sturt.FeaturesID,
  512. TerritorialID = sturt.TerritorialID,
  513. Area = sturt.Area,
  514. HomeAddress = stuct.HomeAddress,
  515. WorkUnit = stuct.WorkUnit,
  516. Address = stuct.Address,
  517. Recipient = stuct.Recipient,
  518. Dormitory = stuct.Dormitory,
  519. BankName = stuac.BankName,
  520. CardNo = stuac.CardNo,
  521. StudentCardNo = stu.StudentCardNo,
  522. PhotoUrl = stu.PhotoUrl,
  523. PlanningGraduateDate = stu.PlanningGraduateDate,
  524. GraduateDate = stu.GraduateDate,
  525. GraduateCardNo = stu.GraduateCardNo,
  526. ReplaceGraduateNo = stu.ReplaceGraduateNo,
  527. DegreeStatus = stu.DegreeStatus ?? false,
  528. GraduationPictureUrl = stu.GraduationPictureUrl,
  529. Career = stu.Career,
  530. IsProofread = stu.IsProofread ?? false,
  531. Remark = stu.Remark,
  532. IP = stucst.IP,
  533. ApprovalStatus = stucst.ApprovalStatus,
  534. Comment = stucst.Comment,
  535. ApprovalTime = stucst.ModifyTime,
  536. StudentViewSource = new StudentView()
  537. {
  538. UserID = stucst.UserID,
  539. StudentNo = ussou.LoginID,
  540. LoginID = ussou.LoginID,
  541. ExamineeNum = sturtsou.ExamineeNum,
  542. AdmissionTicketNo = sturtsou.AdmissionTicketNo,
  543. Name = ussou.Name,
  544. UserName = ussou.Name,
  545. UsedName = stupfsou.UsedName,
  546. ClassmajorID = stu.ClassmajorID,
  547. ClassmajorNo = cl.No,
  548. ClassmajorName = cl.Name,
  549. ClassNum = cl.ClassNum,
  550. StandardID = fa.StandardID,
  551. EducationID = fa.EducationID,
  552. LearningformID = fa.LearningformID,
  553. LearnSystem = fa.LearnSystem,
  554. FacultymajorID = gr.FacultymajorID,
  555. FacultymajorCode = fa.Code,
  556. FacultymajorName = fa.Name,
  557. GradeID = gr.GradeID,
  558. SemesterID = gr.SemesterID,
  559. GrademajorID = cl.GrademajorID,
  560. GrademajorCode = gr.Code,
  561. GrademajorName = gr.Name,
  562. CollegeID = fa.CollegeID,
  563. CollegeNo = col.No,
  564. CollegeName = col.Name,
  565. CampusID = col.CampusID,
  566. CampusCode = cam.No,
  567. CampusName = cam.Name,
  568. Country = stupfsou.Country,
  569. Place = stupfsou.Place,
  570. BornPlace = stupfsou.BornPlace,
  571. SexID = stusou.SexID,
  572. BirthDate = stusou.BirthDate,
  573. NationID = stusou.NationID,
  574. PoliticsID = stusou.PoliticsID,
  575. CertificatesType = stusou.CertificatesType,
  576. IDNumber = stusou.IDNumber,
  577. StudentType = stusou.StudentType,
  578. InSchoolStatusID = stusou.InSchoolStatusID,
  579. StudentStatus = stusou.StudentStatus,
  580. ExamineeType = sturtsou.ExamineeType,
  581. EntranceDate = sturtsou.EntranceDate,
  582. LiteracyLevelID = stupfsou.LiteracyLevelID,
  583. CultureModelID = stupfsou.CultureModelID,
  584. IsDreamProject = stupfsou.IsDreamProject ?? false,
  585. Email = stuctsou.Email,
  586. Telephone = stuctsou.Telephone,
  587. Mobile = stuctsou.Mobile,
  588. ZIPCode = stuctsou.ZIPCode,
  589. WeChatNum = stuctsou.WeChatNum,
  590. QQ = stuctsou.QQ,
  591. HealthStateID = stupfsou.HealthStateID,
  592. BloodGroup = stupfsou.BloodGroup,
  593. Specialty = stupfsou.Specialty,
  594. Height = stupfsou.Height,
  595. Weight = stupfsou.Weight,
  596. DirectorName = stupfsou.DirectorName,
  597. Score = sturtsou.Score,
  598. EntranceWayID = sturtsou.EntranceWayID,
  599. FeaturesID = sturtsou.FeaturesID,
  600. TerritorialID = sturtsou.TerritorialID,
  601. Area = sturtsou.Area,
  602. HomeAddress = stuctsou.HomeAddress,
  603. WorkUnit = stuctsou.WorkUnit,
  604. Address = stuctsou.Address,
  605. Recipient = stuctsou.Recipient,
  606. Dormitory = stuctsou.Dormitory,
  607. BankName = stuacsou.BankName,
  608. CardNo = stuacsou.CardNo,
  609. RecruitPictureUrl = sturtsou.RecruitPictureUrl,
  610. StudentCardNo = stusou.StudentCardNo,
  611. PhotoUrl = stusou.PhotoUrl,
  612. PlanningGraduateDate = stusou.PlanningGraduateDate,
  613. GraduateDate = stusou.GraduateDate,
  614. GraduateCardNo = stusou.GraduateCardNo,
  615. ReplaceGraduateNo = stusou.ReplaceGraduateNo,
  616. DegreeStatus = stusou.DegreeStatus ?? false,
  617. GraduationPictureUrl = stusou.GraduationPictureUrl,
  618. Career = stusou.Career,
  619. IsPhotoComparison = stusou.IsPhotoComparison ?? false,
  620. IsProofread = stusou.IsProofread ?? false,
  621. Remark = stusou.Remark
  622. },
  623. StudentViewContrast = new StudentView()
  624. {
  625. UserID = stucst.UserID,
  626. StudentNo = uscst.LoginID,
  627. LoginID = uscst.LoginID,
  628. ExamineeNum = sturtcst.ExamineeNum,
  629. AdmissionTicketNo = sturtcst.AdmissionTicketNo,
  630. Name = uscst.Name,
  631. UserName = uscst.Name,
  632. UsedName = stupfcst.UsedName,
  633. ClassmajorID = stu.ClassmajorID,
  634. ClassmajorNo = cl.No,
  635. ClassmajorName = cl.Name,
  636. ClassNum = cl.ClassNum,
  637. StandardID = fa.StandardID,
  638. EducationID = fa.EducationID,
  639. LearningformID = fa.LearningformID,
  640. LearnSystem = fa.LearnSystem,
  641. FacultymajorID = gr.FacultymajorID,
  642. FacultymajorCode = fa.Code,
  643. FacultymajorName = fa.Name,
  644. GradeID = gr.GradeID,
  645. SemesterID = gr.SemesterID,
  646. GrademajorID = cl.GrademajorID,
  647. GrademajorCode = gr.Code,
  648. GrademajorName = gr.Name,
  649. CollegeID = fa.CollegeID,
  650. CollegeNo = col.No,
  651. CollegeName = col.Name,
  652. CampusID = col.CampusID,
  653. CampusCode = cam.No,
  654. CampusName = cam.Name,
  655. Country = stupfcst.Country,
  656. Place = stupfcst.Place,
  657. BornPlace = stupfcst.BornPlace,
  658. SexID = stucst.SexID,
  659. BirthDate = stucst.BirthDate,
  660. NationID = stucst.NationID,
  661. PoliticsID = stucst.PoliticsID,
  662. CertificatesType = stucst.CertificatesType,
  663. IDNumber = stucst.IDNumber,
  664. StudentType = stucst.StudentType,
  665. InSchoolStatusID = stucst.InSchoolStatusID,
  666. StudentStatus = stucst.StudentStatus,
  667. ExamineeType = sturtcst.ExamineeType,
  668. EntranceDate = sturtcst.EntranceDate,
  669. LiteracyLevelID = stupfcst.LiteracyLevelID,
  670. CultureModelID = stupfcst.CultureModelID,
  671. IsDreamProject = stupfcst.IsDreamProject ?? false,
  672. Email = stuctcst.Email,
  673. Telephone = stuctcst.Telephone,
  674. Mobile = stuctcst.Mobile,
  675. ZIPCode = stuctcst.ZIPCode,
  676. WeChatNum = stuctcst.WeChatNum,
  677. QQ = stuctcst.QQ,
  678. HealthStateID = stupfcst.HealthStateID,
  679. BloodGroup = stupfcst.BloodGroup,
  680. Specialty = stupfcst.Specialty,
  681. Height = stupfcst.Height,
  682. Weight = stupfcst.Weight,
  683. DirectorName = stupfcst.DirectorName,
  684. Score = sturtcst.Score,
  685. EntranceWayID = sturtcst.EntranceWayID,
  686. FeaturesID = sturtcst.FeaturesID,
  687. TerritorialID = sturtcst.TerritorialID,
  688. Area = sturtcst.Area,
  689. HomeAddress = stuctcst.HomeAddress,
  690. WorkUnit = stuctcst.WorkUnit,
  691. Address = stuctcst.Address,
  692. Recipient = stuctcst.Recipient,
  693. Dormitory = stuctcst.Dormitory,
  694. BankName = stuaccst.BankName,
  695. CardNo = stuaccst.CardNo,
  696. RecruitPictureUrl = sturtcst.RecruitPictureUrl,
  697. StudentCardNo = stucst.StudentCardNo,
  698. PhotoUrl = stucst.PhotoUrl,
  699. PlanningGraduateDate = stucst.PlanningGraduateDate,
  700. GraduateDate = stucst.GraduateDate,
  701. GraduateCardNo = stucst.GraduateCardNo,
  702. ReplaceGraduateNo = stucst.ReplaceGraduateNo,
  703. DegreeStatus = stucst.DegreeStatus ?? false,
  704. GraduationPictureUrl = stucst.GraduationPictureUrl,
  705. Career = stucst.Career,
  706. IsPhotoComparison = stucst.IsPhotoComparison ?? false,
  707. IsProofread = stucst.IsProofread ?? false,
  708. Remark = stucst.Remark
  709. },
  710. RecordStatus = stuhis.RecordStatus,
  711. CreateUserID = stuhis.CreateUserID,
  712. CreateTime = stuhis.CreateTime,
  713. ModifyUserID = stuhis.ModifyUserID,
  714. ModifyTime = stuhis.ModifyTime
  715. };
  716. return query;
  717. }
  718. }
  719. }