12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Linq.Expressions;
- using System.Text;
- using EMIS.Entities;
- using EMIS.ViewModel.EvaluationManage.EvaluationManage;
- using EMIS.DataLogic.Repositories;
- namespace EMIS.DataLogic.EvaluationManage.EvaluationManage
- {
- public class EvaluationCollegeScoreDAL
- {
- public EvaluationCollegeScoreRepository EvaluationCollegeScoreRepository { get; set; }
- public SchoolyearRepository SchoolyearRepository { get; set; }
- public StaffRepository StaffRepository { get; set; }
- public CoursematerialRepository CoursematerialRepository { get; set; }
- public DepartmentRepository DepartmentRepository { get; set; }
- public CollegeRepository CollegeRepository { get; set; }
- public CampusRepository CampusRepository { get; set; }
- public UserRepository UserRepository { get; set; }
- public EvaluationStaffScoreRepository EvaluationStaffScoreRepository { get; set; }
- /// <summary>
- /// 查询对应的院系评分信息EvaluationCollegeScoreView
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<EvaluationCollegeScoreView> GetEvaluationCollegeScoreViewQueryable(Expression<Func<EM_EvaluationCollegeScore, bool>> exp)
- {
- var query = from evcolsco in EvaluationCollegeScoreRepository.GetList(exp)
- join sy in SchoolyearRepository.Entities
- on evcolsco.SchoolyearID equals sy.SchoolyearID
- join sf in StaffRepository.Entities
- on evcolsco.UserID equals sf.UserID
- join cou in CoursematerialRepository.Entities
- on evcolsco.CoursematerialID equals cou.CoursematerialID
- join dep in DepartmentRepository.Entities
- on evcolsco.DepartmentID equals dep.DepartmentID
- join col in CollegeRepository.Entities
- on dep.CollegeID equals col.CollegeID
- join cam in CampusRepository.Entities
- on col.CampusID equals cam.CampusID
- join us in UserRepository.Entities
- on sf.UserID equals us.UserID
- select new EvaluationCollegeScoreView
- {
- EvaluationCollegeScoreID = evcolsco.EvaluationCollegeScoreID,
- SchoolyearID = evcolsco.SchoolyearID,
- SchoolyearValue = sy.Value,
- SchoolyearCode = sy.Code,
- UserID = evcolsco.UserID,
- StaffCode = us.LoginID,
- StaffName = us.Name,
- SexID = sf.SexID,
- TeacherTypeID = sf.TeacherTypeID,
- IncumbencyState = sf.IncumbencyState,
- TitleID = sf.TitleID,
- CoursematerialID = evcolsco.CoursematerialID,
- CourseCode = cou.CourseCode,
- CourseName = cou.CourseName,
- DepartmentID = evcolsco.DepartmentID,
- DepartmentNo = dep.No,
- DepartmentName = dep.Name,
- CollegeID = dep.CollegeID,
- CollegeNo = col.No,
- CollegeName = col.Name,
- CampusID = col.CampusID,
- CampusNo = cam.No,
- CampusName = cam.Name,
- TotalScore = evcolsco.TotalScore,
- ApprovalStatus = evcolsco.ApprovalStatus,
- Remark = evcolsco.Remark,
- RecordStatus = evcolsco.RecordStatus,
- CreateUserID = evcolsco.CreateUserID,
- CreateTime = evcolsco.CreateTime,
- ModifyUserID = evcolsco.ModifyUserID,
- ModifyTime = evcolsco.ModifyTime
- };
- return query;
- }
- }
- }
|