123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Linq.Expressions;
- using EMIS.Entities;
- using EMIS.DataLogic.Repositories;
- using EMIS.ViewModel;
- using EMIS.ViewModel.GraduationManage.GraduateCardManage;
- using EMIS.ViewModel.ScoreManage;
- namespace EMIS.DataLogic.GraduationManage.GraduateCardManage
- {
- public class GraduateCardApplyDAL
- {
- public GraduateCardApplyRepository GraduateCardApplyRepository { get; set; }
- public GraduateCardApplyAttachmentRepository GraduateCardApplyAttachmentRepository { get; set; }
- public SchoolyearRepository SchoolyearRepository { get; set; }
- public StudentRepository StudentRepository { get; set; }
- public ClassmajorRepository ClassmajorRepository { get; set; }
- public GrademajorRepository GrademajorRepository { get; set; }
- public FacultymajorRepository FacultymajorRepository { get; set; }
- public EducationTypeSettingRepository EducationTypeSettingRepository { get; set; }
- public DepartmentRepository DepartmentRepository { get; set; }
- public CollegeRepository CollegeRepository { get; set; }
- public CampusRepository CampusRepository { get; set; }
- public ExecutablePlanRepository ExecutablePlanRepository { get; set; }
- public ExecutablePlanProfileRepository ExecutablePlanProfileRepository { get; set; }
- public ExecutablePlanTeachingSettingRepository ExecutablePlanTeachingSettingRepository { get; set; }
- public CoursematerialRepository CoursematerialRepository { get; set; }
- public CourseTypeSelectCourseTypeRepository CourseTypeSelectCourseTypeRepository { get; set; }
- public FinallyScoreRepository FinallyScoreRepository { get; set; }
- public UserRepository UserRepository { get; set; }
- /// <summary>
- /// 查询对应的去向申请信息View(根据对应的去向申请信息)
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<GraduateCardApplyView> GetGraduateCardApplyViewQueryable(Expression<Func<ER_GraduateCardApply, bool>> exp)
- {
- var query = from gc in GraduateCardApplyRepository.GetList(exp)
- join gcsy in SchoolyearRepository.Entities
- on gc.GraduatingSemesterID equals gcsy.SchoolyearID
- join stu in StudentRepository.Entities
- on gc.UserID equals stu.UserID
- join cl in ClassmajorRepository.Entities
- on stu.ClassmajorID equals cl.ClassmajorID
- join gr in GrademajorRepository.Entities
- on cl.GrademajorID equals gr.GrademajorID
- join fa in FacultymajorRepository.Entities
- on gr.FacultymajorID equals fa.FacultymajorID
- join ets in EducationTypeSettingRepository.Entities
- on fa.EducationID equals ets.EducationID
- join col in CollegeRepository.Entities
- on fa.CollegeID equals col.CollegeID
- join cam in CampusRepository.Entities
- on col.CampusID equals cam.CampusID
- join us in UserRepository.Entities
- on stu.UserID equals us.UserID
- join assistant in UserRepository.Entities
- on cl.UserID equals assistant.UserID into tempassistant
- from usassistant in tempassistant.DefaultIfEmpty()
- join sye in SchoolyearRepository.Entities
- on new { SchoolyearID = gr.GradeID.Value, SchoolcodeID = gr.SemesterID.Value }
- equals new { SchoolyearID = sye.Years, SchoolcodeID = sye.SchoolcodeID } into tempsyenter
- from syenter in tempsyenter.DefaultIfEmpty()
- select new GraduateCardApplyView
- {
- GraduateCardApplyID = gc.GraduateCardApplyID,
- UserID = gc.UserID,
- StudentNo = us.LoginID,
- UserName = us.Name,
- ExamineeNum = stu.CF_Recruitstudents.ExamineeNum,
- IDNumber = stu.IDNumber,
- SexID = stu.SexID,
- BirthDate = stu.BirthDate,
- NationID = stu.NationID,
- PoliticsID = stu.PoliticsID,
- EntranceDate = stu.CF_Recruitstudents.EntranceDate,
- ZIPCode = stu.CF_StudentContact.ZIPCode,
- Telephone = stu.CF_StudentContact.Telephone,
- Mobile = stu.CF_StudentContact.Mobile,
- Address = stu.CF_StudentContact.Address,
- InSchoolStatusID = stu.InSchoolStatusID,
- StudentStatusID = stu.StudentStatus,
- ClassID = stu.ClassmajorID,
- ClassNo = cl.No,
- ClassName = cl.Name,
- GrademajorID = cl.GrademajorID,
- GrademajorCode = gr.Code,
- GrademajorName = gr.Name,
- FacultymajorID = fa.FacultymajorID,
- FacultymajorNo = fa.Code,
- FacultymajorName = fa.Name,
- CollegeID = fa.CollegeID,
- CollegeNo = col.No,
- CollegeName = col.Name,
- CampusID = col.CampusID,
- CampusNo = cam.No,
- CampusName = cam.Name,
- SchoolyearID = gr.GradeID,
- EnteringSchoolYearID = syenter.SchoolyearID,
- EnteringSchoolYearCode = syenter.Code,
- StandardID = fa.StandardID,
- EducationID = fa.EducationID,
- EducationTypeID = ets.EducationTypeID,
- LearningformID = fa.LearningformID,
- LearnSystem = fa.LearnSystem,
- GraduationTypeID = gc.GraduationTypeID,
- GraduatingSemesterID = gc.GraduatingSemesterID,
- GraduatingSemesterCode = gcsy.Code,
- GraduatingSemesterValue = gcsy.Value,
- GraduationYear = gcsy.Years,
- NeedCardResult = gc.NeedCardResult,
- ApprovalStatus = gc.ApprovalStatus,
- RecordStatus = gc.RecordStatus,
- Remark = gc.Remark,
- CreateUserID = gc.CreateUserID,
- CreateTime = gc.CreateTime,
- ModifyUserID = gc.ModifyUserID,
- ModifyTime = gc.ModifyTime
- };
- return query;
- }
- /// <summary>
- /// 查询对应的去向申请信息View(根据对应的去向申请信息、学生信息,统计对应的最终成绩)
- /// </summary>
- /// <param name="expGraduateCardApply"></param>
- /// <param name="expStudent"></param>
- /// <returns></returns>
- public IQueryable<GraduateCardApplyView> GetGraduateCardApplyViewQueryable(Expression<Func<ER_GraduateCardApply, bool>> expGraduateCardApply,
- Expression<Func<CF_Student, bool>> expStudent)
- {
- var query = from gc in GraduateCardApplyRepository.GetList(expGraduateCardApply)
- join gcsy in SchoolyearRepository.Entities
- on gc.GraduatingSemesterID equals gcsy.SchoolyearID
- join stu in StudentRepository.GetList(expStudent)
- on gc.UserID equals stu.UserID
- join cl in ClassmajorRepository.Entities
- on stu.ClassmajorID equals cl.ClassmajorID
- join gr in GrademajorRepository.Entities
- on cl.GrademajorID equals gr.GrademajorID
- join fa in FacultymajorRepository.Entities
- on gr.FacultymajorID equals fa.FacultymajorID
- join ets in EducationTypeSettingRepository.Entities
- on fa.EducationID equals ets.EducationID
- join col in CollegeRepository.Entities
- on fa.CollegeID equals col.CollegeID
- join cam in CampusRepository.Entities
- on col.CampusID equals cam.CampusID
- join us in UserRepository.Entities
- on stu.UserID equals us.UserID
- join assistant in UserRepository.Entities
- on cl.UserID equals assistant.UserID into tempassistant
- from usassistant in tempassistant.DefaultIfEmpty()
- join sye in SchoolyearRepository.Entities
- on new { SchoolyearID = gr.GradeID.Value, SchoolcodeID = gr.SemesterID.Value }
- equals new { SchoolyearID = sye.Years, SchoolcodeID = sye.SchoolcodeID } into tempsyenter
- from syenter in tempsyenter.DefaultIfEmpty()
- join fsgr in
- (
- //学生最终成绩(已修门数)
- from fs in FinallyScoreRepository.Entities
- group fs by fs.UserID into g
- select new
- {
- UserID = g.Key,
- FinallyScoreCount = g.Count()
- }
- )
- on stu.UserID equals fsgr.UserID into tempfsgr
- from gcfsgr in tempfsgr.DefaultIfEmpty()
- select new GraduateCardApplyView
- {
- GraduateCardApplyID = gc.GraduateCardApplyID,
- UserID = gc.UserID,
- StudentNo = us.LoginID,
- UserName = us.Name,
- ExamineeNum = stu.CF_Recruitstudents.ExamineeNum,
- IDNumber = stu.IDNumber,
- SexID = stu.SexID,
- BirthDate = stu.BirthDate,
- NationID = stu.NationID,
- PoliticsID = stu.PoliticsID,
- EntranceDate = stu.CF_Recruitstudents.EntranceDate,
- ZIPCode = stu.CF_StudentContact.ZIPCode,
- Telephone = stu.CF_StudentContact.Telephone,
- Mobile = stu.CF_StudentContact.Mobile,
- Address = stu.CF_StudentContact.Address,
- InSchoolStatusID = stu.InSchoolStatusID,
- StudentStatusID = stu.StudentStatus,
- ClassID = stu.ClassmajorID,
- ClassNo = cl.No,
- ClassName = cl.Name,
- GrademajorID = cl.GrademajorID,
- GrademajorCode = gr.Code,
- GrademajorName = gr.Name,
- FacultymajorID = fa.FacultymajorID,
- FacultymajorNo = fa.Code,
- FacultymajorName = fa.Name,
- CollegeID = fa.CollegeID,
- CollegeNo = col.No,
- CollegeName = col.Name,
- CampusID = col.CampusID,
- CampusNo = cam.No,
- CampusName = cam.Name,
- SchoolyearID = gr.GradeID,
- EnteringSchoolYearID = syenter.SchoolyearID,
- EnteringSchoolYearCode = syenter.Code,
- StandardID = fa.StandardID,
- EducationID = fa.EducationID,
- EducationTypeID = ets.EducationTypeID,
- LearningformID = fa.LearningformID,
- LearnSystem = fa.LearnSystem,
- GraduationTypeID = gc.GraduationTypeID,
- GraduatingSemesterID = gc.GraduatingSemesterID,
- GraduatingSemesterCode = gcsy.Code,
- GraduatingSemesterValue = gcsy.Value,
- GraduationYear = gcsy.Years,
- FinallyScoreCount = gcfsgr.FinallyScoreCount == null ? 0 : gcfsgr.FinallyScoreCount,
- NeedCardResult = gc.NeedCardResult,
- ApprovalStatus = gc.ApprovalStatus,
- RecordStatus = gc.RecordStatus,
- Remark = gc.Remark,
- CreateUserID = gc.CreateUserID,
- CreateTime = gc.CreateTime,
- ModifyUserID = gc.ModifyUserID,
- ModifyTime = gc.ModifyTime
- };
- return query;
- }
- /// <summary>
- /// 查询对应的毕业学生信息View(根据相应的学生信息、学年学期信息、去向申请信息、毕业学期ID)
- /// 注:需排除相应的去向申请信息(待审核、已通过)
- /// 注:计算对应的毕业年限(通过当前设置的毕业学期Value与学生年级专业对应的毕业学期Value进行计算)
- /// </summary>
- /// <param name="expStudent"></param>
- /// <param name="expSchoolyear"></param>
- /// <param name="expGraduateCardApply"></param>
- /// <param name="graduatingSemesterID"></param>
- /// <returns></returns>
- public IQueryable<GraduateCardApplyView> GetGraduationStudentViewQueryable(Expression<Func<CF_Student, bool>> expStudent,
- Expression<Func<EMIS.Entities.CF_Schoolyear, bool>> expSchoolyear, Expression<Func<ER_GraduateCardApply, bool>> expGraduateCardApply,
- Guid? graduatingSemesterID)
- {
- var query = from stu in StudentRepository.GetList(expStudent)
- join us in UserRepository.Entities
- on stu.UserID equals us.UserID
- join cl in ClassmajorRepository.Entities
- on stu.ClassmajorID equals cl.ClassmajorID
- join gr in GrademajorRepository.Entities
- on cl.GrademajorID equals gr.GrademajorID
- join grsy in SchoolyearRepository.GetList(expSchoolyear)
- on gr.GraduateSchoolyearID equals grsy.SchoolyearID
- join fa in FacultymajorRepository.Entities
- on gr.FacultymajorID equals fa.FacultymajorID
- join ets in EducationTypeSettingRepository.Entities
- on fa.EducationID equals ets.EducationID
- join col in CollegeRepository.Entities
- on fa.CollegeID equals col.CollegeID
- join cam in CampusRepository.Entities
- on col.CampusID equals cam.CampusID
- join assistant in UserRepository.Entities
- on cl.UserID equals assistant.UserID into tempassistant
- from usassistant in tempassistant.DefaultIfEmpty()
- join stsy in SchoolyearRepository.Entities
- on graduatingSemesterID equals stsy.SchoolyearID into tempstsy
- from grstsy in tempstsy.DefaultIfEmpty()
- join gc in GraduateCardApplyRepository.GetList(expGraduateCardApply)
- on stu.UserID equals gc.UserID into tempga
- from stugc in tempga.DefaultIfEmpty()
- where stugc.GraduateCardApplyID == null
- select new GraduateCardApplyView
- {
- UserID = stu.UserID,
- StudentNo = us.LoginID,
- UserName = us.Name,
- SexID = stu.SexID,
- InSchoolStatusID = stu.InSchoolStatusID,
- StudentStatusID = stu.StudentStatus,
- ClassID = stu.ClassmajorID,
- ClassNo = cl.No,
- ClassName = cl.Name,
- GrademajorID = cl.GrademajorID,
- GrademajorCode = gr.Code,
- GrademajorName = gr.Name,
- FacultymajorID = gr.FacultymajorID,
- FacultymajorNo = fa.Code,
- FacultymajorName = fa.Name,
- CollegeID = fa.CollegeID,
- CollegeNo = col.No,
- CollegeName = col.Name,
- CampusID = col.CampusID,
- CampusNo = cam.No,
- CampusName = cam.Name,
- SchoolyearID = gr.GradeID,
- StandardID = fa.StandardID,
- EducationID = fa.EducationID,
- EducationTypeID = ets.EducationTypeID,
- LearningformID = fa.LearningformID,
- LearnSystem = fa.LearnSystem,
- GraduatingSemesterID = gr.GraduateSchoolyearID,
- GraduatingSemesterCode = grsy.Code,
- GraduatingSemesterValue = grsy.Value,
- GraduationYear = grsy.Years,
- GraduationAgeLimitValue = grstsy.Value == null ? 0 : Math.Round(((decimal)(grstsy.Value - grsy.Value) / 2), 1)
- };
- return query;
- }
- /// <summary>
- /// 查询对应的未新增毕业学生信息View(根据相应的学生信息、学年学期信息、去向申请信息、毕业学期ID)
- /// 注:需排除相应的去向申请信息(待审核、已通过)
- /// 注:需排除相应的去向申请信息(业务主键)
- /// 注:计算对应的毕业年限(通过当前设置的毕业学期Value与学生年级专业对应的毕业学期Value进行计算)
- /// </summary>
- /// <param name="expStudent"></param>
- /// <param name="expSchoolyear"></param>
- /// <param name="expGraduateCardApply"></param>
- /// <param name="graduatingSemesterID"></param>
- /// <returns></returns>
- public IQueryable<GraduateCardApplyView> GetGraduationStudentNoAddViewQueryable(Expression<Func<CF_Student, bool>> expStudent,
- Expression<Func<EMIS.Entities.CF_Schoolyear, bool>> expSchoolyear, Expression<Func<ER_GraduateCardApply, bool>> expGraduateCardApply,
- Guid? graduatingSemesterID)
- {
- var query = from stu in this.GetGraduationStudentViewQueryable(expStudent, expSchoolyear, expGraduateCardApply, graduatingSemesterID)
- join gc in GraduateCardApplyRepository.Entities
- on new { UserID = stu.UserID, GraduatingSemesterID = graduatingSemesterID }
- equals new { UserID = gc.UserID, GraduatingSemesterID = gc.GraduatingSemesterID } into tempgc
- from stugc in tempgc.DefaultIfEmpty()
- where stugc.GraduateCardApplyID == null
- select stu;
- return query;
- }
- /// <summary>
- /// 查询去向申请对应的最终成绩信息(根据动向申请信息并且匹配执行计划)
- /// 注:以学生最终成绩为准匹配对应的执行计划(左连)
- /// 注:由于存在在不同的学年学期参加补考的情况,匹配学生最终成绩时,采用开学学期ID匹配
- /// 注:匹配暂时不考虑总学时TotalHours
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<FinallyScoreView> GetFinallyScoreViewQueryable(Expression<Func<ER_GraduateCardApply, bool>> exp)
- {
- var query = from gc in GraduateCardApplyRepository.GetList(exp)
- join stu in StudentRepository.Entities
- on gc.UserID equals stu.UserID
- join cl in ClassmajorRepository.Entities
- on stu.ClassmajorID equals cl.ClassmajorID
- join gr in GrademajorRepository.Entities
- on cl.GrademajorID equals gr.GrademajorID
- join fa in FacultymajorRepository.Entities
- on gr.FacultymajorID equals fa.FacultymajorID
- join col in CollegeRepository.Entities
- on fa.CollegeID equals col.CollegeID
- join fs in FinallyScoreRepository.Entities
- on stu.UserID equals fs.UserID
- join sy in SchoolyearRepository.Entities
- on fs.SchoolyearID equals sy.SchoolyearID
- join cou in CoursematerialRepository.Entities
- on fs.CoursematerialID equals cou.CoursematerialID
- join us in UserRepository.Entities
- on stu.UserID equals us.UserID
- join cd in DepartmentRepository.Entities
- on fs.DepartmentID equals cd.DepartmentID into tempcd
- from coudep in tempcd.DefaultIfEmpty()
- join ue in UserRepository.Entities
- on fs.CreatorUserID equals ue.UserID into tempue
- from usentry in tempue.DefaultIfEmpty()
- join ct in CourseTypeSelectCourseTypeRepository.Entities
- on fs.CourseTypeID equals ct.CourseTypeID into tempct
- from fsct in tempct.DefaultIfEmpty()
- join ep in
- (
- from gc in GraduateCardApplyRepository.GetList(exp)
- join stu in StudentRepository.Entities
- on gc.UserID equals stu.UserID
- join cl in ClassmajorRepository.Entities
- on stu.ClassmajorID equals cl.ClassmajorID
- join gr in GrademajorRepository.Entities
- on cl.GrademajorID equals gr.GrademajorID
- join ep in ExecutablePlanRepository.Entities
- on gr.GrademajorID equals ep.GrademajorID
- join epsy in SchoolyearRepository.Entities
- on ep.SchoolyearID equals epsy.SchoolyearID
- join pf in ExecutablePlanProfileRepository.Entities
- on ep.ExecutablePlanID equals pf.ExecutablePlanID into temppf
- from eppro in temppf.DefaultIfEmpty()
- join st in ExecutablePlanTeachingSettingRepository.Entities
- on ep.ExecutablePlanID equals st.ExecutablePlanID into tempst
- from epst in tempst.DefaultIfEmpty()
- select new
- {
- ExecutablePlanID = ep.ExecutablePlanID,
- SpecialtyPlanID = ep.SpecialtyPlanID,
- GrademajorID = ep.GrademajorID,
- UserID = gc.UserID,
- DepartmentID = ep.DepartmentID,
- CoursematerialID = ep.CoursematerialID,
- CourseTypeID = ep.CourseTypeID,
- Credit = epst.Credit,
- TheoryCourse = epst.TheoryCourse,
- Practicehours = epst.Practicehours,
- Trialhours = epst.Trialhours,
- Totalhours = (epst.TheoryCourse ?? 0) + (epst.Practicehours ?? 0),
- SchoolyearID = ep.SchoolyearID,
- SchoolyearCode = epsy.Code,
- SchoolyearNumID = (epsy.Value - ((gr.GradeID * 2 - 1) + gr.SemesterID - 1)) / 2 + 1,
- SchoolcodeID = epsy.SchoolcodeID,
- StarttermID = (epsy.Value - ((gr.GradeID * 2 - 1) + gr.SemesterID - 1) + 1),
- IsSpecialtycore = eppro.IsSpecialtycore == null ? false : eppro.IsSpecialtycore.Value,
- IsCooperation = eppro.IsCooperation == null ? false : eppro.IsCooperation.Value,
- IsRequired = eppro.IsRequired == null ? false : eppro.IsRequired.Value,
- IsElective = eppro.IsElective == null ? false : eppro.IsElective.Value,
- IsNetworkCourse = eppro.IsNetworkCourse == null ? false : eppro.IsNetworkCourse.Value,
- IsMainCourse = eppro.IsMainCourse == null ? false : eppro.IsMainCourse.Value,
- ResultTypeID = ep.ResultTypeID,
- RecordStatus = ep.RecordStatus
- }
- )
- on
- new { UserID = gc.UserID, StarttermID = fs.StarttermID, CoursematerialID = fs.CoursematerialID, CourseTypeID = fs.CourseTypeID, Credit = fs.Credit }
- equals
- new { UserID = ep.UserID, StarttermID = ep.StarttermID, CoursematerialID = ep.CoursematerialID, CourseTypeID = ep.CourseTypeID, Credit = ep.Credit }
- into tempep
- from fsep in tempep.DefaultIfEmpty()
- select new FinallyScoreView
- {
- FinallyScoreID = fs.FinallyScoreID,
- SchoolyearID = fs.SchoolyearID,
- SchoolyearCode = sy.Code,
- UserID = fs.UserID,
- LoginID = us.LoginID,
- UserName = us.Name,
- ClassmajorID = stu.ClassmajorID,
- ClassmajorNo = cl.No,
- ClassmajorName = cl.Name,
- CollegeID = fa.CollegeID,
- CollegeNo = col.No,
- CollegeName = col.Name,
- SchoolyearNumID = fs.SchoolyearNumID,
- StarttermID = fs.StarttermID,
- ClassName = fs.ClassName,
- CoursematerialID = fs.CoursematerialID,
- CourseCode = cou.CourseCode,
- CourseName = cou.CourseName,
- DepartmentID = fs.DepartmentID,
- DepartmentNo = coudep.No,
- DepartmentName = coudep.Name,
- CourseTypeID = fs.CourseTypeID,
- IsMainCourse = fsep.IsMainCourse == null ? false : fsep.IsMainCourse,
- CourseSelectTypeID = (fsct.IsFreeSelectionCourse ?? false) ? (int)EMIS.ViewModel.CF_CourseSelectType.FreeSelectionCourse
- : ((fsct.IsOptionalCourse ?? false) ? (int)EMIS.ViewModel.CF_CourseSelectType.OptionalCourse
- : (int)EMIS.ViewModel.CF_CourseSelectType.Required),
- CourseTypeColour = fsct.CourseTypeColour == null ? "white" : fsct.CourseTypeColour,
- Credit = fs.Credit ?? 0,
- TotalHours = fs.TotalHours ?? 0,
- IsExecutablePlan = fsep.ExecutablePlanID == null ? false : true,
- ExecutablePlanStatus = fsep.RecordStatus,
- ExaminationType = fs.ExaminationType,
- ExaminationModeID = fs.ExaminationModeID,
- HandleModeID = fs.HandleModeID,
- ExamsDatetime = fs.ExamsDatetime,
- CreatorUserID = fs.CreatorUserID,
- CreatorUserNo = usentry.LoginID,
- CreatorUserName = usentry.Name,
- EntryDeadlineTime = fs.EntryDeadlineTime,
- ResultTypeID = fs.ResultTypeID,
- ExamsCategoryID = fs.ExamsCategoryID,
- ExamsStateID = fs.ExamsStateID,
- TotalScore = fs.TotalScore,
- ScoreCredit = fs.ScoreCredit ?? 0,
- GradePoint = fs.GradePoint ?? 0,
- Remarks = fs.Remark,
- RecordStatus = fs.RecordStatus,
- CreateUserID = fs.CreateUserID,
- CreateTime = fs.CreateTime,
- ModifyUserID = fs.ModifyUserID,
- ModifyTime = fs.ModifyTime
- };
- return query;
- }
- /// <summary>
- /// 查询对应的附件文件明细信息FileUploadView(根据去向申请信息)
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<FileUploadView> GetGraduateCardApplyAttachmentQueryable(Expression<Func<ER_GraduateCardApply, bool>> exp)
- {
- var tableName = typeof(ER_GraduateCardApplyAttachment).Name;
- var query = from gc in GraduateCardApplyRepository.GetList(exp)
- from gcat in GraduateCardApplyAttachmentRepository.Entities
- .Where(x => x.GraduateCardApplyID == gc.GraduateCardApplyID)
- select new FileUploadView
- {
- FileID = gcat.GraduateCardApplyAttachmentID,
- FormID = gc.GraduateCardApplyID,
- FileName = gcat.Name,
- FileUrl = gcat.Url,
- TableName = tableName,
- RecordStatus = gcat.RecordStatus,
- CreateUserID = gcat.CreateUserID,
- CreateTime = gcat.CreateTime,
- ModifyUserID = gcat.ModifyUserID,
- ModifyTime = gcat.ModifyTime
- };
- return query;
- }
- }
- }
|