PaymentDetailView.cs 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.ViewModel.CacheManage;
  6. using EMIS.Entities;
  7. namespace EMIS.ViewModel.PaymentManage
  8. {
  9. public class PaymentDetailView
  10. {
  11. //教师
  12. public Guid UserID { get; set; }
  13. public string LoginID { get; set; }
  14. public string UserName { get; set; }
  15. public int? TeacherTypeID { get; set; }
  16. public string TeacherTypeDesc
  17. {
  18. get
  19. {
  20. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeacherType.ToString())
  21. .Where(x => x.Value == TeacherTypeID)
  22. .Select(x => x.Name).FirstOrDefault();
  23. }
  24. }
  25. public int? TitleID { get; set; }
  26. public string TitleDesc
  27. {
  28. get
  29. {
  30. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Title.ToString())
  31. .Where(x => x.Value == TitleID)
  32. .Select(x => x.Name).FirstOrDefault();
  33. }
  34. }
  35. public string Account { get; set; }
  36. //院系专业
  37. public int? EducationID { get; set; }
  38. public string EducationDesc
  39. {
  40. get
  41. {
  42. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
  43. .Where(x => x.Value == EducationID)
  44. .Select(x => x.Name).FirstOrDefault();
  45. }
  46. }
  47. public int? LearningformID { get; set; }
  48. public string LearningformDesc
  49. {
  50. get
  51. {
  52. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString())
  53. .Where(x => x.Value == LearningformID)
  54. .Select(x => x.Name).FirstOrDefault();
  55. }
  56. }
  57. //学年学期
  58. public Guid? SchoolyearID { get; set; }
  59. public string SchoolyearCode { get; set; }
  60. //任务班
  61. public int? StudentCount { get; set; }
  62. public int? ExaminationModeID { get; set; }
  63. public string ExaminationModeDesc
  64. {
  65. get
  66. {
  67. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExaminationMode.ToString())
  68. .Where(x => x.Value == ExaminationModeID)
  69. .Select(x => x.Name).FirstOrDefault();
  70. }
  71. }
  72. public int? ActualStudentCount
  73. {
  74. get
  75. {
  76. return (StudentCount ?? 0) - (ExemptionCount ?? 0);
  77. }
  78. }
  79. public int? RetakeStudentCount { get; set; }
  80. public int? PracticeHours { get; set; }
  81. public HashSet<CF_Classmajor> CF_Classmajor { get; set; }
  82. public string ClasamajorName
  83. {
  84. get
  85. {
  86. return string.Join(",", CF_Classmajor.OrderBy(x => x.Name).Select(x => x.Name));
  87. }
  88. }
  89. public Guid? CoursematerialID { get; set; }
  90. public string CoursematerialName { get; set; }
  91. public Guid? CollegeID { get; set; }
  92. public string CollegeNo { get; set; }
  93. public string CollegeName { get; set; }
  94. public int? PlanTotalHours { get; set; }
  95. public int? TimeSegmentID { get; set; }
  96. public string TimeSegmentDesc
  97. {
  98. get
  99. {
  100. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TimesSegment.ToString())
  101. .Where(x => x.Value == TimeSegmentID)
  102. .Select(x => x.Name).FirstOrDefault();
  103. }
  104. }
  105. //排课
  106. public int? ScheduleDayCount { get; set; }
  107. public int? CourseTimeHours { get; set; }
  108. public int? ActualScheduleHours
  109. {
  110. get
  111. {
  112. return (ScheduleDayCount ?? 0) * (CourseTimeHours ?? 0);
  113. }
  114. }
  115. //特殊名单
  116. public int? ExemptionCount { get; set; }
  117. //课酬
  118. public decimal? PaymentStandard { get; set; }
  119. public decimal? LearningformRate { get; set; }
  120. public decimal? BaseStudentCount { get; set; }
  121. public decimal? StudentCountRateLimit { get; set; }
  122. //人数系数由于需要用于查询,不能用只读属性
  123. public decimal? StudentCountRate { get; set; }
  124. public decimal? PracticeRate { get; set; }
  125. public decimal? HoursPayment { get; set; }
  126. public decimal? PracticePayment
  127. {
  128. get
  129. {
  130. return (PracticeRate ?? 0) * 50 * (PracticeHours ?? 0) * (LearningformRate ?? 0);
  131. }
  132. }
  133. public decimal? TotalPayment
  134. {
  135. get
  136. {
  137. return (HoursPayment ?? 0) + (PracticePayment ?? 0);
  138. }
  139. }
  140. }
  141. }