using System; using System.Collections.Generic; using System.Linq; using System.Text; using EMIS.ViewModel.CacheManage; using EMIS.Entities; namespace EMIS.ViewModel.PaymentManage { public class PaymentDetailView { //教师 public Guid UserID { get; set; } public string LoginID { get; set; } public string UserName { get; set; } public int? TeacherTypeID { get; set; } public string TeacherTypeDesc { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeacherType.ToString()) .Where(x => x.Value == TeacherTypeID) .Select(x => x.Name).FirstOrDefault(); } } public int? TitleID { get; set; } public string TitleDesc { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Title.ToString()) .Where(x => x.Value == TitleID) .Select(x => x.Name).FirstOrDefault(); } } public string Account { get; set; } //院系专业 public int? EducationID { get; set; } public string EducationDesc { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString()) .Where(x => x.Value == EducationID) .Select(x => x.Name).FirstOrDefault(); } } public int? LearningformID { get; set; } public string LearningformDesc { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString()) .Where(x => x.Value == LearningformID) .Select(x => x.Name).FirstOrDefault(); } } //学年学期 public Guid? SchoolyearID { get; set; } public string SchoolyearCode { get; set; } //任务班 public int? StudentCount { get; set; } public int? ExaminationModeID { get; set; } public string ExaminationModeDesc { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExaminationMode.ToString()) .Where(x => x.Value == ExaminationModeID) .Select(x => x.Name).FirstOrDefault(); } } public int? ActualStudentCount { get { return (StudentCount ?? 0) - (ExemptionCount ?? 0); } } public int? RetakeStudentCount { get; set; } public int? PracticeHours { get; set; } public HashSet CF_Classmajor { get; set; } public string ClasamajorName { get { return string.Join(",", CF_Classmajor.OrderBy(x => x.Name).Select(x => x.Name)); } } public Guid? CoursematerialID { get; set; } public string CoursematerialName { get; set; } public Guid? CollegeID { get; set; } public string CollegeNo { get; set; } public string CollegeName { get; set; } public int? PlanTotalHours { get; set; } public int? TimeSegmentID { get; set; } public string TimeSegmentDesc { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TimesSegment.ToString()) .Where(x => x.Value == TimeSegmentID) .Select(x => x.Name).FirstOrDefault(); } } //排课 public int? ScheduleDayCount { get; set; } public int? CourseTimeHours { get; set; } public int? ActualScheduleHours { get { return (ScheduleDayCount ?? 0) * (CourseTimeHours ?? 0); } } //特殊名单 public int? ExemptionCount { get; set; } //课酬 public decimal? PaymentStandard { get; set; } public decimal? LearningformRate { get; set; } public decimal? BaseStudentCount { get; set; } public decimal? StudentCountRateLimit { get; set; } //人数系数由于需要用于查询,不能用只读属性 public decimal? StudentCountRate { get; set; } public decimal? PracticeRate { get; set; } public decimal? HoursPayment { get; set; } public decimal? PracticePayment { get { return (PracticeRate ?? 0) * 50 * (PracticeHours ?? 0) * (LearningformRate ?? 0); } } public decimal? TotalPayment { get { return (HoursPayment ?? 0) + (PracticePayment ?? 0); } } } }