NewStudentDAL.cs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  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;
  8. using EMIS.ViewModel.EnrollManage.NewStudentManage;
  9. using EMIS.DataLogic.Repositories;
  10. namespace EMIS.DataLogic.EnrollManage.NewStudentManage
  11. {
  12. public class NewStudentDAL
  13. {
  14. public NewStudentRepository NewStudentRepository { get; set; }
  15. public SpecialtyRepository SpecialtyRepository { get; set; }
  16. public DictionaryItemRepository DictionaryItemRepository { get; set; }
  17. public CollegeRepository CollegeRepository { get; set; }
  18. public RecruitSpecialtyRepository RecruitSpecialtyRepository { get; set; }
  19. public StudentRepository StudentRepository { get; set; }
  20. public RecruitstudentsRepository RecruitstudentsRepository { get; set; }
  21. public FacultymajorRepository FacultymajorRepository { get; set; }
  22. public GrademajorRepository GrademajorRepository { get; set; }
  23. public ClassmajorRepository ClassmajorRepository { get; set; }
  24. public UserRepository UserRepository { get; set; }
  25. public SchoolyearRepository SchoolyearRepository { get; set; }
  26. public ParameterRepository ParameterRepository { get; set; }
  27. public RoleRepository RoleRepository { get; set; }
  28. public CustomStandardSettingRepository CustomStandardSettingRepository { get; set; }
  29. public GraduateSchoolyearRepository GraduateSchoolyearRepository { get; set; }
  30. /// <summary>
  31. /// 查询对应的新生名单信息View
  32. /// </summary>
  33. /// <param name="exp"></param>
  34. /// <returns></returns>
  35. public IQueryable<NewStudentView> GetNewStudentViewQueryable(Expression<Func<CF_NewStudent, bool>> exp)
  36. {
  37. var query = from nstu in NewStudentRepository.GetList(exp)
  38. join sp in SpecialtyRepository.Entities
  39. on nstu.SpecialtyID equals sp.SpecialtyID
  40. join dicst in DictionaryItemRepository.GetList(x => x.DictionaryCode == typeof(CF_Standard).Name)
  41. on sp.StandardID equals dicst.Value into tempst
  42. from standard in tempst.DefaultIfEmpty()
  43. select new NewStudentView
  44. {
  45. NewStudentID = nstu.NewStudentID,
  46. ExamineeNum = nstu.ExamineeNum,
  47. AdmissionTicketNo = nstu.AdmissionTicketNo,
  48. Name = nstu.Name,
  49. SexID = nstu.SexID,
  50. NationID = nstu.NationID,
  51. PoliticsID = nstu.PoliticsID,
  52. BirthDate = nstu.BirthDate,
  53. CertificatesType = nstu.CertificatesType,
  54. IDNumber = nstu.IDNumber,
  55. GradeID = nstu.GradeID,
  56. SemesterID = nstu.SemesterID,
  57. SpecialtyID = nstu.SpecialtyID,
  58. StandardID = sp.StandardID,
  59. StandardCode = standard.Code,
  60. StandardName = standard.Name,
  61. EducationID = sp.EducationID,
  62. LearningformID = sp.LearningformID,
  63. LearnSystem = sp.LearnSystem,
  64. EntranceDate = nstu.EntranceDate,
  65. Score = nstu.Score,
  66. Telephone = nstu.Telephone,
  67. ZIPCode = nstu.ZIPCode,
  68. EntranceWayID = nstu.EntranceWayID,
  69. FeaturesID = nstu.FeaturesID,
  70. TerritorialID = nstu.TerritorialID,
  71. Address = nstu.Address,
  72. Dormitory = nstu.Dormitory,
  73. RecruitPictureUrl = nstu.RecruitPictureUrl,
  74. PhotoHasValue = (nstu.RecruitPictureUrl == null || nstu.RecruitPictureUrl == "") ? false : true,
  75. IsDoubt = nstu.IsDoubt ?? false,
  76. AssignStatus = nstu.AssignStatus,
  77. Remark = nstu.Remark,
  78. RecordStatus = nstu.RecordStatus,
  79. CreateUserID = nstu.CreateUserID,
  80. CreateTime = nstu.CreateTime,
  81. ModifyUserID = nstu.ModifyUserID,
  82. ModifyTime = nstu.ModifyTime
  83. };
  84. return query;
  85. }
  86. /// <summary>
  87. /// 查询对应的新生分配信息View
  88. /// </summary>
  89. /// <param name="exp"></param>
  90. /// <returns></returns>
  91. public IQueryable<NewStudentView> GetNewStudentCollegeViewQueryable(Expression<Func<CF_NewStudent, bool>> exp)
  92. {
  93. var query = from nstu in NewStudentRepository.GetList(exp)
  94. join sp in SpecialtyRepository.Entities
  95. on nstu.SpecialtyID equals sp.SpecialtyID
  96. join col in CollegeRepository.Entities
  97. on nstu.CollegeID equals col.CollegeID
  98. join dicst in DictionaryItemRepository.GetList(x => x.DictionaryCode == typeof(CF_Standard).Name)
  99. on sp.StandardID equals dicst.Value into tempst
  100. from standard in tempst.DefaultIfEmpty()
  101. select new NewStudentView
  102. {
  103. NewStudentID = nstu.NewStudentID,
  104. ExamineeNum = nstu.ExamineeNum,
  105. AdmissionTicketNo = nstu.AdmissionTicketNo,
  106. Name = nstu.Name,
  107. SexID = nstu.SexID,
  108. NationID = nstu.NationID,
  109. PoliticsID = nstu.PoliticsID,
  110. BirthDate = nstu.BirthDate,
  111. CertificatesType = nstu.CertificatesType,
  112. IDNumber = nstu.IDNumber,
  113. GradeID = nstu.GradeID,
  114. SemesterID = nstu.SemesterID,
  115. SpecialtyID = nstu.SpecialtyID,
  116. StandardID = sp.StandardID,
  117. StandardCode = standard.Code,
  118. StandardName = standard.Name,
  119. EducationID = sp.EducationID,
  120. LearningformID = sp.LearningformID,
  121. LearnSystem = sp.LearnSystem,
  122. EntranceDate = nstu.EntranceDate,
  123. Score = nstu.Score,
  124. Telephone = nstu.Telephone,
  125. ZIPCode = nstu.ZIPCode,
  126. EntranceWayID = nstu.EntranceWayID,
  127. FeaturesID = nstu.FeaturesID,
  128. TerritorialID = nstu.TerritorialID,
  129. Address = nstu.Address,
  130. Dormitory = nstu.Dormitory,
  131. EnrollmentNo = nstu.EnrollmentNo,
  132. RecruitPictureUrl = nstu.RecruitPictureUrl,
  133. PhotoHasValue = (nstu.RecruitPictureUrl == null || nstu.RecruitPictureUrl == "") ? false : true,
  134. IsDoubt = nstu.IsDoubt ?? false,
  135. AssignStatus = nstu.AssignStatus,
  136. OrderNo = nstu.OrderNo,
  137. CollegeID = nstu.CollegeID,
  138. CollegeNo = col.No,
  139. CollegeName = col.Name,
  140. CampusID = col.CampusID,
  141. CampusCode = col.CF_Campus.No,
  142. CampusName = col.CF_Campus.Name,
  143. Remark = nstu.Remark,
  144. RecordStatus = nstu.RecordStatus,
  145. CreateUserID = nstu.CreateUserID,
  146. CreateTime = nstu.CreateTime,
  147. ModifyUserID = nstu.ModifyUserID,
  148. ModifyTime = nstu.ModifyTime
  149. };
  150. return query;
  151. }
  152. /// <summary>
  153. /// 查询对应的录取名单信息View
  154. /// </summary>
  155. /// <param name="exp"></param>
  156. /// <returns></returns>
  157. public IQueryable<NewStudentView> GetNewStudentEnterViewQueryable(Expression<Func<CF_NewStudent, bool>> exp)
  158. {
  159. var query = from nstu in NewStudentRepository.GetList(exp)
  160. join sp in SpecialtyRepository.Entities
  161. on nstu.SpecialtyID equals sp.SpecialtyID
  162. join col in CollegeRepository.Entities
  163. on nstu.CollegeID equals col.CollegeID
  164. join dicst in DictionaryItemRepository.GetList(x => x.DictionaryCode == typeof(CF_Standard).Name)
  165. on sp.StandardID equals dicst.Value into tempst
  166. from standard in tempst.DefaultIfEmpty()
  167. join cl in ClassmajorRepository.Entities
  168. on nstu.ClassmajorID equals cl.ClassmajorID into tempcl
  169. from nstucl in tempcl.DefaultIfEmpty()
  170. select new NewStudentView
  171. {
  172. NewStudentID = nstu.NewStudentID,
  173. ExamineeNum = nstu.ExamineeNum,
  174. AdmissionTicketNo = nstu.AdmissionTicketNo,
  175. Name = nstu.Name,
  176. SexID = nstu.SexID,
  177. NationID = nstu.NationID,
  178. PoliticsID = nstu.PoliticsID,
  179. BirthDate = nstu.BirthDate,
  180. CertificatesType = nstu.CertificatesType,
  181. IDNumber = nstu.IDNumber,
  182. GradeID = nstu.GradeID,
  183. SemesterID = nstu.SemesterID,
  184. SpecialtyID = nstu.SpecialtyID,
  185. StandardID = sp.StandardID,
  186. StandardCode = standard.Code,
  187. StandardName = standard.Name,
  188. EducationID = sp.EducationID,
  189. LearningformID = sp.LearningformID,
  190. LearnSystem = sp.LearnSystem,
  191. EntranceDate = nstu.EntranceDate,
  192. Score = nstu.Score,
  193. Telephone = nstu.Telephone,
  194. ZIPCode = nstu.ZIPCode,
  195. EntranceWayID = nstu.EntranceWayID,
  196. FeaturesID = nstu.FeaturesID,
  197. TerritorialID = nstu.TerritorialID,
  198. Address = nstu.Address,
  199. Dormitory = nstu.Dormitory,
  200. EnrollmentNo = nstu.EnrollmentNo,
  201. RecruitPictureUrl = nstu.RecruitPictureUrl,
  202. PhotoHasValue = (nstu.RecruitPictureUrl == null || nstu.RecruitPictureUrl == "") ? false : true,
  203. IsDoubt = nstu.IsDoubt ?? false,
  204. AssignStatus = nstu.AssignStatus,
  205. OrderNo = nstu.OrderNo,
  206. CollegeID = nstu.CollegeID,
  207. CollegeNo = col.No,
  208. CollegeName = col.Name,
  209. CampusID = col.CampusID,
  210. CampusCode = col.CF_Campus.No,
  211. CampusName = col.CF_Campus.Name,
  212. ClassmajorID = nstu.ClassmajorID,
  213. ClassmajorNo = nstucl.No,
  214. ClassmajorName = nstucl.Name,
  215. GrademajorID = nstucl.GrademajorID,
  216. GrademajorCode = nstucl.CF_Grademajor.Code,
  217. GrademajorName = nstucl.CF_Grademajor.Name,
  218. FacultymajorID = nstucl.CF_Grademajor.FacultymajorID,
  219. FacultymajorCode = nstucl.CF_Grademajor.CF_Facultymajor.Code,
  220. FacultymajorName = nstucl.CF_Grademajor.CF_Facultymajor.Name,
  221. StudentNo = nstu.StudentNo,
  222. Remark = nstu.Remark,
  223. RecordStatus = nstu.RecordStatus,
  224. CreateUserID = nstu.CreateUserID,
  225. CreateTime = nstu.CreateTime,
  226. ModifyUserID = nstu.ModifyUserID,
  227. ModifyTime = nstu.ModifyTime
  228. };
  229. return query;
  230. }
  231. /// <summary>
  232. /// 查询最大录取通知书编号(年级、院系所分组)
  233. /// </summary>
  234. /// <param name="exp"></param>
  235. /// <returns></returns>
  236. public IQueryable<NewStudentView> GetEnrollmentNo(Expression<Func<CF_NewStudent, bool>> exp)
  237. {
  238. var query = from st in NewStudentRepository.GetList(exp)
  239. join col in CollegeRepository.Entities
  240. on st.CollegeID equals col.CollegeID
  241. group st by new { st.GradeID, st.CollegeID, col.No } into g
  242. select new NewStudentView
  243. {
  244. GradeID = g.Key.GradeID.Value,
  245. CollegeID = g.Key.CollegeID,
  246. CollegeNo = g.Key.No,
  247. EnrollmentNo = g.Max(x => x.EnrollmentNo)
  248. };
  249. return query;
  250. }
  251. /// <summary>
  252. /// 根据新生信息查询对应的新生院系专业信息(业务主键:专业ID(Value)、培养层次、学习形式、学制、院系所ID)
  253. /// </summary>
  254. /// <param name="expNewStudent"></param>
  255. /// <returns></returns>
  256. public IQueryable<NewStudentView> GetFacultymajorByNewStudent(Expression<Func<CF_NewStudent, bool>> expNewStudent)
  257. {
  258. var query = from st in NewStudentRepository.GetList(expNewStudent)
  259. join sp in SpecialtyRepository.Entities
  260. on st.SpecialtyID equals sp.SpecialtyID
  261. join fa in FacultymajorRepository.Entities
  262. on new { sp.StandardID, sp.EducationID, sp.LearningformID, sp.LearnSystem, st.CollegeID }
  263. equals new { fa.StandardID, fa.EducationID, fa.LearningformID, fa.LearnSystem, fa.CollegeID }
  264. select new NewStudentView
  265. {
  266. NewStudentID = st.NewStudentID,
  267. GradeID = st.GradeID,
  268. SemesterID = st.SemesterID,
  269. SpecialtyID = st.SpecialtyID,
  270. StandardID = sp.StandardID,
  271. EducationID = sp.EducationID,
  272. LearningformID = sp.LearningformID,
  273. LearnSystem = sp.LearnSystem,
  274. CollegeID = st.CollegeID,
  275. FacultymajorID = fa.FacultymajorID,
  276. FacultymajorCode = fa.Code,
  277. FacultymajorName = fa.Name
  278. };
  279. return query;
  280. }
  281. /// <summary>
  282. /// 根据新生信息、院系专业信息查询新生对应的年级专业信息(业务主键:院系专业ID、年级)
  283. /// </summary>
  284. /// <param name="expNewStudent"></param>
  285. /// <param name="expFacultymajor"></param>
  286. /// <returns></returns>
  287. public IQueryable<NewStudentView> GetGrademajorByNewStudent(Expression<Func<CF_NewStudent, bool>> expNewStudent, Expression<Func<CF_Facultymajor, bool>> expFacultymajor)
  288. {
  289. var query = from st in NewStudentRepository.GetList(expNewStudent)
  290. join sp in SpecialtyRepository.Entities
  291. on st.SpecialtyID equals sp.SpecialtyID
  292. join fa in FacultymajorRepository.GetList(expFacultymajor)
  293. on new { sp.StandardID, sp.EducationID, sp.LearningformID, sp.LearnSystem, st.CollegeID }
  294. equals new { fa.StandardID, fa.EducationID, fa.LearningformID, fa.LearnSystem, fa.CollegeID }
  295. join gr in GrademajorRepository.Entities
  296. on new { FacultymajorID = fa.FacultymajorID, GradeID = st.GradeID }
  297. equals new { FacultymajorID = gr.FacultymajorID.Value, GradeID = gr.GradeID }
  298. select new NewStudentView
  299. {
  300. NewStudentID = st.NewStudentID,
  301. GradeID = st.GradeID,
  302. SemesterID = st.SemesterID,
  303. SpecialtyID = st.SpecialtyID,
  304. StandardID = sp.StandardID,
  305. EducationID = sp.EducationID,
  306. LearningformID = sp.LearningformID,
  307. LearnSystem = sp.LearnSystem,
  308. CollegeID = st.CollegeID,
  309. FacultymajorID = fa.FacultymajorID,
  310. FacultymajorCode = fa.Code,
  311. FacultymajorName = fa.Name,
  312. GrademajorID = gr.GrademajorID,
  313. GrademajorCode = gr.Code,
  314. GrademajorName = gr.Name
  315. };
  316. return query;
  317. }
  318. /// <summary>
  319. /// 根据新生信息、院系专业信息、年级专业信息查询新生对应的班级信息(业务主键:年级专业ID)
  320. /// </summary>
  321. /// <param name="expNewStudent"></param>
  322. /// <param name="expFacultymajor"></param>
  323. /// <param name="expGrademajor"></param>
  324. /// <returns></returns>
  325. public IQueryable<NewStudentView> GetClassmajorByNewStudent(Expression<Func<CF_NewStudent, bool>> expNewStudent, Expression<Func<CF_Facultymajor, bool>> expFacultymajor,
  326. Expression<Func<CF_Grademajor, bool>> expGrademajor)
  327. {
  328. var query = from st in NewStudentRepository.GetList(expNewStudent)
  329. join sp in SpecialtyRepository.Entities
  330. on st.SpecialtyID equals sp.SpecialtyID
  331. join fa in FacultymajorRepository.GetList(expFacultymajor)
  332. on new { sp.StandardID, sp.EducationID, sp.LearningformID, sp.LearnSystem, st.CollegeID }
  333. equals new { fa.StandardID, fa.EducationID, fa.LearningformID, fa.LearnSystem, fa.CollegeID }
  334. join gr in GrademajorRepository.GetList(expGrademajor)
  335. on new { FacultymajorID = fa.FacultymajorID, GradeID = st.GradeID }
  336. equals new { FacultymajorID = gr.FacultymajorID.Value, GradeID = gr.GradeID }
  337. join cl in ClassmajorRepository.Entities
  338. on gr.GrademajorID equals cl.GrademajorID
  339. select new NewStudentView
  340. {
  341. NewStudentID = st.NewStudentID,
  342. GradeID = st.GradeID,
  343. SemesterID = st.SemesterID,
  344. SpecialtyID = st.SpecialtyID,
  345. StandardID = sp.StandardID,
  346. EducationID = sp.EducationID,
  347. LearningformID = sp.LearningformID,
  348. LearnSystem = sp.LearnSystem,
  349. CollegeID = st.CollegeID,
  350. FacultymajorID = fa.FacultymajorID,
  351. FacultymajorCode = fa.Code,
  352. FacultymajorName = fa.Name,
  353. GrademajorID = gr.GrademajorID,
  354. GrademajorCode = gr.Code,
  355. GrademajorName = gr.Name,
  356. ClassmajorID = cl.ClassmajorID,
  357. ClassmajorNo = cl.No,
  358. ClassmajorName = cl.Name
  359. };
  360. return query;
  361. }
  362. /// <summary>
  363. /// 查询对应的专业班级信息(手动生成可使用此方法)
  364. /// </summary>
  365. /// <param name="expNewStudent"></param>
  366. /// <param name="expFa"></param>
  367. /// <param name="expGr"></param>
  368. /// <param name="expCl"></param>
  369. /// <returns></returns>
  370. public virtual IQueryable<NewStudentView> GetNewStudentCollegeClass(Expression<Func<CF_NewStudent, bool>> expNewStudent, Expression<Func<CF_Facultymajor, bool>> expFacultymajor,
  371. Expression<Func<CF_Grademajor, bool>> expGrademajor, Expression<Func<CF_Classmajor, bool>> expClassmajor)
  372. {
  373. var query = from st in NewStudentRepository.GetList(expNewStudent)
  374. join sp in SpecialtyRepository.Entities
  375. on st.SpecialtyID equals sp.SpecialtyID
  376. join fa in FacultymajorRepository.GetList(expFacultymajor)
  377. on
  378. new { sp.StandardID, sp.EducationID, sp.LearningformID, sp.LearnSystem, st.CollegeID }
  379. equals
  380. new { fa.StandardID, fa.EducationID, fa.LearningformID, fa.LearnSystem, fa.CollegeID }
  381. join gr in GrademajorRepository.GetList(expGrademajor)
  382. on
  383. new { FacultymajorID = fa.FacultymajorID, GradeID = st.GradeID }
  384. equals
  385. new { FacultymajorID = gr.FacultymajorID.Value, GradeID = gr.GradeID }
  386. join cl in ClassmajorRepository.GetList(expClassmajor)
  387. on gr.GrademajorID equals cl.GrademajorID
  388. select new NewStudentView
  389. {
  390. NewStudentID = st.NewStudentID,
  391. GradeID = st.GradeID,
  392. SemesterID = st.SemesterID,
  393. SpecialtyID = st.SpecialtyID,
  394. StandardID = sp.StandardID,
  395. EducationID = sp.EducationID,
  396. LearningformID = sp.LearningformID,
  397. LearnSystem = sp.LearnSystem,
  398. CollegeID = st.CollegeID,
  399. FacultymajorID = fa.FacultymajorID,
  400. FacultymajorCode = fa.Code,
  401. FacultymajorName = fa.Name,
  402. GrademajorID = gr.GrademajorID,
  403. GrademajorCode = gr.Code,
  404. GrademajorName = gr.Name,
  405. ClassmajorID = cl.ClassmajorID,
  406. ClassmajorNo = cl.No,
  407. ClassmajorName = cl.Name
  408. };
  409. return query;
  410. }
  411. /// <summary>
  412. /// 查询新生信息、学生信息中最大学号(以班级信息ID分组,注:学号在两个表中都可能存在-Concat)
  413. /// </summary>
  414. /// <param name="exp"></param>
  415. /// <returns></returns>
  416. public IQueryable<NewStudentView> GetMaxStudentNoClass(Expression<Func<CF_Classmajor, bool>> exp)
  417. {
  418. //新生信息表
  419. var queryNewStudent = from nst in NewStudentRepository.GetList(x => x.RecordStatus > (int)SYS_STATUS.UNUSABLE)
  420. join cl in ClassmajorRepository.GetList(exp)
  421. on nst.ClassmajorID equals cl.ClassmajorID
  422. select new NewStudentView
  423. {
  424. ClassmajorID = cl.ClassmajorID,
  425. ClassmajorNo = cl.No,
  426. StudentNo = nst.StudentNo
  427. };
  428. //学生信息表
  429. var queryStudent = from st in StudentRepository.GetList(x => x.RecordStatus > (int)SYS_STATUS.UNUSABLE)
  430. join cl in ClassmajorRepository.GetList(exp)
  431. on st.ClassmajorID equals cl.ClassmajorID
  432. join u in UserRepository.Entities
  433. on st.UserID equals u.UserID
  434. select new NewStudentView
  435. {
  436. ClassmajorID = cl.ClassmajorID,
  437. ClassmajorNo = cl.No,
  438. StudentNo = u.LoginID
  439. };
  440. //合并后分组
  441. var query = from stu in queryNewStudent.Concat(queryStudent)
  442. group stu by new { stu.ClassmajorID, stu.ClassmajorNo } into g
  443. select new NewStudentView
  444. {
  445. ClassmajorID = g.Key.ClassmajorID,
  446. ClassmajorNo = g.Key.ClassmajorNo,
  447. StudentNo = g.Max(x => x.StudentNo)
  448. };
  449. return query;
  450. }
  451. /// <summary>
  452. /// 查询对应的学生信息(验证:考生号、准考证号)
  453. /// </summary>
  454. /// <param name="expStudent"></param>
  455. /// <returns></returns>
  456. public IQueryable<NewStudentView> GetStudentViewQueryable(Expression<Func<CF_Recruitstudents, bool>> expRecruitstudents)
  457. {
  458. var query = from stu in StudentRepository.Entities
  459. join rs in RecruitstudentsRepository.GetList(expRecruitstudents)
  460. on stu.UserID equals rs.UserID
  461. join us in UserRepository.Entities
  462. on stu.UserID equals us.UserID
  463. select new NewStudentView
  464. {
  465. StudentNo = us.LoginID,
  466. ExamineeNum = rs.ExamineeNum,
  467. AdmissionTicketNo = rs.AdmissionTicketNo,
  468. IDNumber = stu.IDNumber,
  469. ClassmajorID = stu.ClassmajorID
  470. };
  471. return query;
  472. }
  473. }
  474. }