StudentDistributeView.cs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. using EMIS.ViewModel.CacheManage;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.Linq;
  7. using System.Text;
  8. namespace EMIS.ViewModel.TeachingMaterial
  9. {
  10. public class StudentDistributeView
  11. {
  12. /// <summary>
  13. /// 学生发放ID
  14. /// </summary>
  15. [DisplayName("学生发放ID")]
  16. public Guid StudentDistributeID { get; set; }
  17. /// <summary>
  18. /// 学年学期
  19. /// </summary>
  20. [DisplayName("学年学期")]
  21. public Guid? SchoolyearID { get; set; }
  22. /// <summary>
  23. /// 学年学期
  24. /// </summary>
  25. [DisplayName("学年学期")]
  26. public string SchoolyearCode { get; set; }
  27. /// <summary>
  28. /// 校区ID
  29. /// </summary>
  30. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusID")]
  31. public Guid? CampusID { get; set; }
  32. /// <summary>
  33. /// 院系所ID
  34. /// </summary>
  35. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
  36. public Guid CollegeID { get; set; }
  37. /// <summary>
  38. /// 院系所
  39. /// </summary>
  40. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  41. public string CollegeName { get; set; }
  42. /// <summary>
  43. /// 院系所代码
  44. /// </summary>
  45. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
  46. public string CollegeNo { get; set; }
  47. /// <summary>
  48. /// 年级专业ID
  49. /// </summary>
  50. [DisplayName("年级专业ID")]
  51. public Guid? GrademajorID { get; set; }
  52. /// <summary>
  53. /// 年级专业编号
  54. /// </summary>
  55. [DisplayName("年级专业编号")]
  56. public string GrademajorCode { get; set; }
  57. /// <summary>
  58. /// 年级专业编号
  59. /// </summary>
  60. [DisplayName("年级专业编号")]
  61. public string GradeSpecialtyCode { get; set; }
  62. /// <summary>
  63. /// 年级专业名称
  64. /// </summary>
  65. [DisplayName("年级专业名称")]
  66. public string GrademajorName { get; set; }
  67. /// <summary>
  68. /// 年级专业名称
  69. /// </summary>
  70. [DisplayName("年级专业名称")]
  71. public string GradeSpecialtyName { get; set; }
  72. /// <summary>
  73. /// 年级
  74. /// </summary>
  75. [DisplayName("年级")]
  76. public int? Years { get; set; }
  77. /// <summary>
  78. /// 年级
  79. /// </summary>
  80. [DisplayName("年级")]
  81. public int? GradeID { get; set; }
  82. [DisplayName("年级")]
  83. public string Grade
  84. {
  85. get
  86. {
  87. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Grade.ToString()).Where(x => x.Value == GradeID).Select(x => x.Name).FirstOrDefault();
  88. }
  89. }
  90. /// <summary>
  91. /// 专业代码
  92. /// </summary>
  93. [DisplayName("专业代码")]
  94. public int? StandardID { get; set; }
  95. /// <summary>
  96. /// 专业名称对应数据字典Value
  97. /// </summary>
  98. [DisplayName("专业名称对应数据字典Value")]
  99. public int? SpecialtyValue { get; set; }
  100. /// <summary>
  101. /// 专业代码
  102. /// </summary>
  103. [DisplayName("专业代码")]
  104. public string SpecialtyCode
  105. {
  106. get
  107. {
  108. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  109. .Where(x => x.Value == SpecialtyValue)
  110. .Select(x => x.Code).FirstOrDefault();
  111. }
  112. }
  113. /// <summary>
  114. /// 学号
  115. /// </summary>
  116. [DisplayName("学号")]
  117. public string StudentNo { get; set; }
  118. /// <summary>
  119. /// 学生姓名
  120. /// </summary>
  121. [DisplayName("学生姓名")]
  122. public string StudentName { get; set; }
  123. /// <summary>
  124. /// 专业名称
  125. /// </summary>
  126. [DisplayName("专业名称")]
  127. public string StandardName { get; set; }
  128. /// <summary>
  129. /// 专业名称
  130. /// </summary>
  131. [DisplayName("专业名称")]
  132. public string SpecialtyName
  133. {
  134. get
  135. {
  136. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  137. .Where(x => x.Value == SpecialtyValue)
  138. .Select(x => x.Name).FirstOrDefault();
  139. }
  140. }
  141. /// <summary>
  142. /// 人数
  143. /// </summary>
  144. [DisplayName("人数")]
  145. public int? StudentQty { get; set; }
  146. /// <summary>
  147. /// 征订数量
  148. /// </summary>
  149. [DisplayName("征订数量")]
  150. public int? OrderQty { get; set; }
  151. /// <summary>
  152. /// 课程信息ID
  153. /// </summary>
  154. [DisplayName("课程信息ID")]
  155. public Guid CoursematerialID { get; set; }
  156. /// <summary>
  157. /// 课程代码
  158. /// </summary>
  159. [DisplayName("课程代码")]
  160. public string CourseCode { get; set; }
  161. /// <summary>
  162. /// 课程名称
  163. /// </summary>
  164. [DisplayName("课程名称")]
  165. public string CourseName { get; set; }
  166. /// <summary>
  167. /// 课程类型
  168. /// </summary>
  169. [DisplayName("课程类型")]
  170. public int? CourseTypeID { get; set; }
  171. /// <summary>
  172. /// 课程类型
  173. /// </summary>
  174. [DisplayName("课程类型")]
  175. public string CourseTypeName { get; set; }
  176. /// <summary>
  177. /// 课程属性
  178. /// </summary>
  179. [DisplayName("课程属性")]
  180. public int? CourseCategoryID { get; set; }
  181. /// <summary>
  182. /// 课程属性
  183. /// </summary>
  184. [DisplayName("课程属性")]
  185. public string CourseCategoryName { get; set; }
  186. /// <summary>
  187. /// 课程性质
  188. /// </summary>
  189. [DisplayName("课程性质")]
  190. public int? CourseQualityID { get; set; }
  191. /// <summary>
  192. /// 课程性质
  193. /// </summary>
  194. [DisplayName("课程性质")]
  195. public string CourseQualityName { get; set; }
  196. /// <summary>
  197. /// 教材信息ID
  198. /// </summary>
  199. [DisplayName("教材信息ID")]
  200. public Guid? TeachingMaterialPoolID { get; set; }
  201. /// <summary>
  202. /// 教材编号
  203. /// </summary>
  204. [DisplayName("教材编号")]
  205. public string TeachingMaterialCode { get; set; }
  206. /// <summary>
  207. /// 教材名称
  208. /// </summary>
  209. [DisplayName("教材名称")]
  210. public string TeachingMaterialName { get; set; }
  211. /// <summary>
  212. /// 教材类型
  213. /// </summary>
  214. [DisplayName("教材类型")]
  215. public int? TeachingMaterialTypeID { get; set; }
  216. /// <summary>
  217. /// ISBN
  218. /// </summary>
  219. [DisplayName("ISBN")]
  220. public string ISBN { get; set; }
  221. /// <summary>
  222. /// 版本时间
  223. /// </summary>
  224. [DisplayName("版本时间")]
  225. public string PublishTime { get; set; }
  226. /// <summary>
  227. /// 出版单位
  228. /// </summary>
  229. [DisplayName("出版单位")]
  230. public string PublishName { get; set; }
  231. /// <summary>
  232. /// 作者
  233. /// </summary>
  234. [DisplayName("作者")]
  235. public string Author { get; set; }
  236. /// <summary>
  237. /// 单价
  238. /// </summary>
  239. public decimal? Price { get; set; }
  240. /// <summary>
  241. /// 是否发放
  242. /// </summary>
  243. [DisplayName("是否发放")]
  244. public int IsDistribute { get; set; }
  245. /// <summary>
  246. /// 是否发放
  247. /// </summary>
  248. [DisplayName("是否发放")]
  249. public string IsDistributeName { get; set; }
  250. /// <summary>
  251. /// 创建人
  252. /// </summary>
  253. [DisplayName("创建人")]
  254. public string CreateUserName { get; set; }
  255. /// <summary>
  256. /// 创建时间
  257. /// </summary>
  258. [DisplayName("创建时间")]
  259. public DateTime ?CreateTime { get; set; }
  260. /// <summary>
  261. /// 创建时间
  262. /// </summary>
  263. [DisplayName("签收时间")]
  264. public DateTime? ModifyTime { get; set; }
  265. /// <summary>
  266. /// 当前库存数量
  267. /// </summary>
  268. public int? PresentInventory { get; set; }
  269. /// <summary>
  270. /// 折扣率
  271. /// </summary>
  272. public decimal? Discount { get; set; }
  273. /// <summary>
  274. /// 折扣率(四舍五入)
  275. /// </summary>
  276. public decimal? DiscountStr
  277. {
  278. get
  279. {
  280. if (this.Discount == null)
  281. return 0;
  282. return Math.Round((decimal)Discount, 2);
  283. }
  284. }
  285. /// <summary>
  286. /// 折合价
  287. /// </summary>
  288. public decimal? DiscountPrice { get; set; }
  289. /// <summary>
  290. /// 折合价(四舍五入)
  291. /// </summary>
  292. public decimal? DiscountPriceStr
  293. {
  294. get
  295. {
  296. if (this.DiscountPrice == null)
  297. return 0;
  298. return Math.Round((decimal)DiscountPrice, 2);
  299. }
  300. }
  301. /// <summary>
  302. /// 实洋
  303. /// </summary>
  304. public decimal? TotalDollarStr
  305. {
  306. get
  307. {
  308. if (this.TotalDollar == null)
  309. return 0;
  310. return Math.Round((decimal)TotalDollar, 2);
  311. }
  312. }
  313. /// <summary>
  314. /// 码洋
  315. /// </summary>
  316. public decimal? TotalPriceStr
  317. {
  318. get
  319. {
  320. if (this.TotalPrice == null)
  321. return 0;
  322. return Math.Round((decimal)TotalPrice, 2);
  323. }
  324. }
  325. /// <summary>
  326. /// 发放人数
  327. /// </summary>
  328. public int? DistributeQty { get; set; }
  329. /// <summary>
  330. /// 未发人数
  331. /// </summary>
  332. public int? RemainingQty { get; set; }
  333. /// <summary>
  334. /// 签收人ID
  335. /// </summary>
  336. [DisplayName("签收人ID")]
  337. public Guid RecipientUserID { get; set; }
  338. /// <summary>
  339. /// 签收人
  340. /// </summary>
  341. [DisplayName("签收人")]
  342. [Required]
  343. public string RecipientUser { get; set; }
  344. /// <summary>
  345. /// 备注
  346. /// </summary>
  347. [DisplayName("备注")]
  348. public string Remark { get; set; }
  349. /// <summary>
  350. /// 出库单据号
  351. /// </summary>
  352. [DisplayName("出库单据号")]
  353. [Required]
  354. public string StudentDistributeNo { get; set; }
  355. /// <summary>
  356. /// 总价(实洋)
  357. /// </summary>
  358. [DisplayName("总价(实洋)")]
  359. public decimal? TotalDollar { get; set; }
  360. /// <summary>
  361. /// 码洋
  362. /// </summary>
  363. [DisplayName("码洋")]
  364. public decimal? TotalPrice { get; set; }
  365. /// <summary>
  366. /// 出库人
  367. /// </summary>
  368. [DisplayName("出库人")]
  369. public string StockOutUserName { get; set; }
  370. /// <summary>
  371. /// 专业计划ID
  372. /// </summary>
  373. public Guid SpecialtyPlanID { get; set; }
  374. }
  375. public class StudentDistributePrePlanView
  376. {
  377. /// <summary>
  378. /// 专业计划ID
  379. /// </summary>
  380. public Guid SpecialtyPlanID { get; set; }
  381. public Guid? CollegeID { get; set; }
  382. /// <summary>
  383. /// 征订数量
  384. /// </summary>
  385. public int? OrderQty { get; set; }
  386. /// <summary>
  387. /// 教材ID
  388. /// </summary>
  389. public Guid? TeachingMaterialPoolID { get; set; }
  390. }
  391. }