1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Linq.Expressions;
- using System.Text;
- using EMIS.Entities;
- using EMIS.ViewModel;
- using EMIS.ViewModel.EnrollManage.SpecialtyManage;
- using EMIS.DataLogic.Repositories;
- namespace EMIS.DataLogic.EnrollManage.SpecialtyManage
- {
- public class CustomStandardSettingDAL
- {
- public CustomStandardSettingRepository customStandardSettingRepository { get; set; }
- public CollegeRepository collegeRepository { get; set; }
- public SpecialtyRepository specialtyRepository { get; set; }
- public DictionaryItemRepository dictionaryItemRepository { get; set; }
- /// <summary>
- /// 查询对应的省招专业信息View
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<CustomStandardSettingView> GetCustomStandardSettingViewQueryable(Expression<Func<CF_CustomStandardSetting, bool>> exp)
- {
- var query = from cus in customStandardSettingRepository.GetList(exp)
- join col in collegeRepository.Entities
- on cus.CollegeID equals col.CollegeID
- join sp in specialtyRepository.Entities
- on cus.SpecialtyID equals sp.SpecialtyID into tempsp
- from cussp in tempsp.DefaultIfEmpty()
- join stdic in dictionaryItemRepository.GetList(x => x.DictionaryCode == DictionaryItem.CF_Standard.ToString())
- on cussp.StandardID equals stdic.Value into tempstan
- from dtstan in tempstan.DefaultIfEmpty()
- select new CustomStandardSettingView
- {
- CustomStandardSettingID = cus.CustomStandardSettingID,
- Code = cus.Code,
- Name = dtstan.Name,
- YearID = cus.YearID,
- SemesterID = cus.SemesterID,
- CollegeID = cus.CollegeID,
- CollegeCode = col.No,
- CollegeName = col.Name,
- CampusID = col.CampusID,
- CampusCode = col.CF_Campus.No,
- CampusName = col.CF_Campus.Name,
- SpecialtyID = cus.SpecialtyID,
- StandardID = cussp.StandardID,
- StandardName = dtstan.Name,
- EducationID = cussp.EducationID,
- LearningformID = cussp.LearningformID,
- LearnSystem = cussp.LearnSystem,
- ScienceclassID = cussp.ScienceclassID,
- PropertyID = cussp.PropertyID,
- StandardTitle = cussp.StandardTitle,
- StandardLevel = cussp.StandardLevel,
- Remark = cus.Remark,
- RecordStatus = cus.RecordStatus,
- CreateUserID = cus.CreateUserID,
- CreateTime = cus.CreateTime,
- ModifyUserID = cus.ModifyUserID,
- ModifyTime = cus.ModifyTime
- };
- return query;
- }
- }
- }
|