PersonalCreditView.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. using System;
  2. using System.Linq;
  3. using System.Text;
  4. using System.Collections.Generic;
  5. using System.ComponentModel;
  6. using System.ComponentModel.DataAnnotations;
  7. using EMIS.ViewModel.CacheManage;
  8. namespace EMIS.ViewModel.ScoreManage
  9. {
  10. public class PersonalCreditView
  11. {
  12. /// <summary>
  13. /// 用户ID
  14. /// </summary>
  15. [DisplayName("用户ID")]
  16. public Guid? UserID { get; set; }
  17. /// <summary>
  18. /// 学号
  19. /// </summary>
  20. [DisplayName("学号")]
  21. public string StudentNo { get; set; }
  22. /// <summary>
  23. /// 姓名
  24. /// </summary>
  25. [DisplayName("姓名")]
  26. public string UserName { get; set; }
  27. /// <summary>
  28. /// 性别
  29. /// </summary>
  30. [DisplayName("性别")]
  31. public int? SexID { get; set; }
  32. /// <summary>
  33. /// 性别
  34. /// </summary>
  35. [DisplayName("性别")]
  36. public string SexName
  37. {
  38. get
  39. {
  40. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Sex.ToString())
  41. .Where(x => x.Value == SexID)
  42. .Select(x => x.Name).FirstOrDefault();
  43. }
  44. }
  45. /// <summary>
  46. /// 在校状态
  47. /// </summary>
  48. [DisplayName("在校状态")]
  49. public int? InSchoolStatusID { get; set; }
  50. /// <summary>
  51. /// 在校状态
  52. /// </summary>
  53. [DisplayName("在校状态")]
  54. public string InSchoolStatusName
  55. {
  56. get
  57. {
  58. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_InschoolStatus.ToString())
  59. .Where(x => x.Value == InSchoolStatusID)
  60. .Select(x => x.Name).FirstOrDefault();
  61. }
  62. }
  63. /// <summary>
  64. /// 学籍状态
  65. /// </summary>
  66. [DisplayName("学籍状态")]
  67. public int? StudentStatusID { get; set; }
  68. /// <summary>
  69. /// 学籍状态
  70. /// </summary>
  71. [DisplayName("学籍状态")]
  72. public string StudentStatusName
  73. {
  74. get
  75. {
  76. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StudentStatus.ToString())
  77. .Where(x => x.Value == StudentStatusID).Select(x => x.Name).FirstOrDefault();
  78. }
  79. }
  80. /// <summary>
  81. /// 班级信息ID
  82. /// </summary>
  83. [DisplayName("班级信息ID")]
  84. public Guid? ClassID { get; set; }
  85. /// <summary>
  86. /// 班级编号
  87. /// </summary>
  88. [DisplayName("班级编号")]
  89. public string ClassNo { get; set; }
  90. /// <summary>
  91. /// 班级名称
  92. /// </summary>
  93. [DisplayName("班级名称")]
  94. public string ClassName { get; set; }
  95. /// <summary>
  96. /// 年级专业ID
  97. /// </summary>
  98. [DisplayName("年级专业ID")]
  99. public Guid? GrademajorID { get; set; }
  100. /// <summary>
  101. /// 年级专业编号
  102. /// </summary>
  103. [DisplayName("年级专业编号")]
  104. public string GrademajorCode { get; set; }
  105. /// <summary>
  106. /// 年级专业名称
  107. /// </summary>
  108. [DisplayName("年级专业名称")]
  109. public string GrademajorName { get; set; }
  110. /// <summary>
  111. /// 院系专业ID
  112. /// </summary>
  113. [DisplayName("院系专业ID")]
  114. public Guid? FacultymajorID { get; set; }
  115. /// <summary>
  116. /// 院系专业编号
  117. /// </summary>
  118. [DisplayName("院系专业编号")]
  119. public string FacultymajorNo { get; set; }
  120. /// <summary>
  121. /// 院系专业名称
  122. /// </summary>
  123. [DisplayName("院系专业名称")]
  124. public string FacultymajorName { get; set; }
  125. /// <summary>
  126. /// 院系所ID
  127. /// </summary>
  128. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
  129. public Guid? CollegeID { get; set; }
  130. /// <summary>
  131. /// 院系所代码
  132. /// </summary>
  133. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
  134. public string CollegeNo { get; set; }
  135. /// <summary>
  136. /// 院系所名称
  137. /// </summary>
  138. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  139. public string CollegeName { get; set; }
  140. /// <summary>
  141. /// 校区ID
  142. /// </summary>
  143. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")]
  144. public Guid? CampusID { get; set; }
  145. /// <summary>
  146. /// 校区代码
  147. /// </summary>
  148. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")]
  149. public string CampusNo { get; set; }
  150. /// <summary>
  151. /// 校区名称
  152. /// </summary>
  153. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")]
  154. public string CampusName { get; set; }
  155. /// <summary>
  156. /// 年级
  157. /// </summary>
  158. [DisplayName("年级")]
  159. public int? SchoolyearID { get; set; }
  160. /// <summary>
  161. /// 专业ID(Value)
  162. /// </summary>
  163. [DisplayName("专业ID(Value)")]
  164. public int? StandardID { get; set; }
  165. /// <summary>
  166. /// 专业代码
  167. /// </summary>
  168. [DisplayName("专业代码")]
  169. public string StandardCode
  170. {
  171. get
  172. {
  173. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  174. .Where(x => x.Value == StandardID)
  175. .Select(x => x.Code).FirstOrDefault();
  176. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  177. }
  178. }
  179. /// <summary>
  180. /// 专业名称
  181. /// </summary>
  182. [DisplayName("专业名称")]
  183. public string StandardName
  184. {
  185. get
  186. {
  187. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  188. .Where(x => x.Value == StandardID)
  189. .Select(x => x.Name).FirstOrDefault();
  190. }
  191. }
  192. /// <summary>
  193. /// 培养层次
  194. /// </summary>
  195. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  196. public int? EducationID { get; set; }
  197. /// <summary>
  198. /// 培养层次
  199. /// </summary>
  200. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  201. public string EducationName
  202. {
  203. get
  204. {
  205. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
  206. .Where(x => x.Value == EducationID)
  207. .Select(x => x.Name).FirstOrDefault();
  208. }
  209. }
  210. /// <summary>
  211. /// 学习形式
  212. /// </summary>
  213. [DisplayName("学习形式")]
  214. public int? LearningformID { get; set; }
  215. /// <summary>
  216. /// 学习形式
  217. /// </summary>
  218. [DisplayName("学习形式")]
  219. public string LearningformName
  220. {
  221. get
  222. {
  223. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString())
  224. .Where(x => x.Value == LearningformID)
  225. .Select(x => x.Name).FirstOrDefault();
  226. }
  227. }
  228. /// <summary>
  229. /// 学制
  230. /// </summary>
  231. [DisplayName("学制")]
  232. public decimal? LearnSystem { get; set; }
  233. /// <summary>
  234. /// 毕业日期
  235. /// </summary>
  236. [DisplayName("毕业日期")]
  237. [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}")]
  238. public DateTime? PlanningGraduateDate { get; set; }
  239. /// <summary>
  240. /// 课程门数
  241. /// </summary>
  242. [DisplayName("课程门数")]
  243. public int? CourseCount { get; set; }
  244. /// <summary>
  245. /// 平均成绩
  246. /// </summary>
  247. [DisplayName("平均成绩")]
  248. public decimal? AverageScore { get; set; }
  249. /// <summary>
  250. /// 必修学分
  251. /// </summary>
  252. [DisplayName("必修学分")]
  253. public decimal? RequiredCredit { get; set; }
  254. /// <summary>
  255. /// 限选学分
  256. /// </summary>
  257. [DisplayName("限选学分")]
  258. public decimal? OptionalCourseCredit { get; set; }
  259. /// <summary>
  260. /// 任选学分
  261. /// </summary>
  262. [DisplayName("任选学分")]
  263. public decimal? FreeSelectionCourseCredit { get; set; }
  264. /// <summary>
  265. /// 方向选修学分
  266. /// </summary>
  267. [DisplayName("方向选修学分")]
  268. public decimal? ElectiveCredit { get; set; }
  269. /// <summary>
  270. /// 公共选修学分
  271. /// </summary>
  272. [DisplayName("公共选修学分")]
  273. public decimal? ElectivePublicCredit { get; set; }
  274. /// <summary>
  275. /// 通识教育学分
  276. /// </summary>
  277. [DisplayName("通识教育学分")]
  278. public decimal? GeneralEducationCredit { get; set; }
  279. /// <summary>
  280. /// 校本课程学分(不包含俱乐部)
  281. /// </summary>
  282. [DisplayName("校本课程学分(不包含俱乐部)")]
  283. public decimal? SchoolbasedNoClubCredit { get; set; }
  284. /// <summary>
  285. /// 校本课程学分(只包含俱乐部)
  286. /// </summary>
  287. [DisplayName("校本课程学分(只包含俱乐部)")]
  288. public decimal? SchoolbasedClubCredit { get; set; }
  289. /// <summary>
  290. /// 校本课程学分
  291. /// </summary>
  292. [DisplayName("校本课程学分")]
  293. public decimal? SchoolbasedCredit
  294. {
  295. get
  296. {
  297. return (SchoolbasedNoClubCredit ?? 0)
  298. + ((SchoolbasedClubCredit ?? 0) > 4 ? 4 : (SchoolbasedClubCredit ?? 0));
  299. }
  300. }
  301. /// <summary>
  302. /// 实践环节学分(不包含俱乐部)
  303. /// </summary>
  304. [DisplayName("实践环节学分(不包含俱乐部)")]
  305. public decimal? PractiseNoClubCredit { get; set; }
  306. /// <summary>
  307. /// 实践环节学分(只包含俱乐部)
  308. /// </summary>
  309. [DisplayName("实践环节学分(只包含俱乐部)")]
  310. public decimal? PractiseClubCredit { get; set; }
  311. /// <summary>
  312. /// 实践环节学分
  313. /// </summary>
  314. [DisplayName("实践环节学分")]
  315. public decimal? PractiseCredit
  316. {
  317. get
  318. {
  319. return (PractiseNoClubCredit ?? 0)
  320. + ((PractiseClubCredit ?? 0) > 4 ? 4 : (PractiseClubCredit ?? 0));
  321. }
  322. }
  323. /// <summary>
  324. /// 总学分
  325. /// </summary>
  326. [DisplayName("总学分")]
  327. public decimal? TotalCredit
  328. {
  329. get
  330. {
  331. return (RequiredCredit ?? 0) + (OptionalCourseCredit ?? 0) + (FreeSelectionCourseCredit ?? 0)
  332. - (SchoolbasedNoClubCredit ?? 0) - (SchoolbasedClubCredit ?? 0)
  333. - (PractiseNoClubCredit ?? 0) - (PractiseClubCredit ?? 0)
  334. + (SchoolbasedCredit ?? 0) + (PractiseCredit ?? 0);
  335. }
  336. }
  337. }
  338. }