CheckingApproveDAL.cs 39 KB

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