12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.DataLogic.Repositories;
- using System.Linq.Expressions;
- using EMIS.Entities;
- using EMIS.ViewModel.EvaluationManage;
- using EMIS.DataLogic.SystemDAL;
- using EMIS.ViewModel;
- using EMIS.ViewModel.UniversityManage.TeacherManage;
- namespace EMIS.DataLogic.Common.EvaluationManage
- {
- public class TeacherEvaluationDAL
- {
- public TeacherEvaluationRepository TeacherEvaluationRepository { get; set; }
- public DictionaryDAL DictionaryDAL { get; set; }
- //public SpecialtyPlanRepository SpecialtyPlanRepository { get; set; } //专业计划
- public EducationMissionClassRepository EducationMissionClassRepository { get; set; }
- public IQueryable<TeacherEvaluationView> GetTeacherEvaluationQuery(Expression<Func<EM_TeacherEvaluation, bool>> filter)
- {
- var query = from c in TeacherEvaluationRepository.GetList(filter)
- join d in DictionaryDAL.GetDictionaryItemQuery(typeof(CF_YesOrNoStatus).Name) on c.OpenStatus equals d.Value
- join emc in EducationMissionClassRepository.Entities on c.EducationMissionClassID equals emc.EducationMissionClassID
- select new TeacherEvaluationView
- {
- EntityID = c.ID,
- EntityCode = c.Code,
- OpenStatus = c.OpenStatus,
- OpenStatusName = d.Name,
- Remark = c.Remark,
- TableID = c.TableID,
- EvaluationTypeName = c.EM_EvaluationTable.EM_EvaluationType.Name,
- EvaluationTableName = c.EM_EvaluationTable.Name,
- EvaluationTableNo = c.EM_EvaluationTable.Code,
- EducationMissionClassID = c.EducationMissionClassID,
- EducationMissionClassName = c.EM_EducationMissionClass.Name,
- SchoolyearID = emc.EM_EducationMission.CF_Schoolyear.SchoolyearID,
- SchoolyearCode = emc.EM_EducationMission.CF_Schoolyear.Code,
- CourseName = emc.EM_Coursematerial.CourseName,
- CourseCode = emc.EM_Coursematerial.CourseCode,
- Sys_User = c.EM_EducationMissionClass.EM_MissionClassTeacher.Select(s => s.CF_Staff.Sys_User),
- DepartmentID = emc.EM_EducationMission.CF_Department.DepartmentID,
- CollegeID = emc.EM_EducationMission.CF_Department.CF_College.CollegeID,
- CampusID = emc.EM_EducationMission.CF_Department.CF_College.CampusID,
- EntityCreateTime = c.CreateTime,
- Participators = c.CF_Staff.Select(s => new ParticipatorView { Code = s.StaffCode, Name = s.Sys_User.Name }),
- };
- return query;
- }
- }
- }
|