DepositApplyModel.cs 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. //----------------------------------------------------------------
  6. //Module Name: $safeprojectname$
  7. //Purpose:
  8. //CopyRight: Muchinfo
  9. //History:
  10. //----------------------------------------------------------------
  11. //DateTime 2017/1/12 23:10:03
  12. //Author
  13. //Description Create
  14. //----------------------------------------------------------------
  15. using Muchinfo.MTPClient.Data.Enums;
  16. using Muchinfo.MTPClient.Data.Helper;
  17. namespace Muchinfo.MTPClient.Data.Model
  18. {
  19. public class DepositApplyModel
  20. {
  21. //入库单id StoreInId ,
  22. //入库单号 StoreInCode ,
  23. //入库仓库 WareHouseId ,
  24. //总手续费 TotalCharge ,
  25. //审核状态 AuditStatus ,
  26. //申请时间 RequestTime ,
  27. //申请人Id RequestorId ,
  28. //备注 Remark ,
  29. //入库明细Id StoreInDetailId ,
  30. //交割商品ID DeliveryGoodsId ,
  31. // DeliveryGoodsName,
  32. // DeliveryGoodsCode,
  33. //单位 GoodsUnitId ,
  34. //申请数 Qty ,
  35. //GoodsUnitName,
  36. //入库估价 StoreInPrice,
  37. //入库数 StoreInQty,
  38. //手续费 StoreInCharge ,
  39. //状态 Status ,
  40. // t.listingrate,
  41. //t.DEPOSITREFERPRICE,
  42. /// <summary>
  43. /// 入库单id
  44. /// </summary>
  45. [PropertyDisc("StoreInId")]
  46. public long StoreInId { get; set; }
  47. /// <summary>
  48. /// 入库单号
  49. /// </summary>
  50. [PropertyDisc("StoreInCode")]
  51. public string StoreInCode { get; set; }
  52. /// <summary>
  53. /// 入库仓库id
  54. /// </summary>
  55. [PropertyDisc("WareHouseId")]
  56. public int WareHouseId { get; set; }
  57. /// <summary>
  58. /// //入库仓库
  59. /// </summary>
  60. [PropertyDisc("WareHouseName")]
  61. public string WareHouseName { get; set; }
  62. /// <summary>
  63. /// 审核状态
  64. /// </summary>
  65. [PropertyDisc("AuditStatus")]
  66. public eAuditStatus AuditStatus { get; set; }
  67. /// <summary>
  68. /// 申请时间
  69. /// </summary>
  70. [PropertyDisc("RequestTime")]
  71. public string RequestTime { get; set; }
  72. /// <summary>
  73. /// 备注
  74. /// </summary>
  75. [PropertyDisc("Remark")]
  76. public string Remark { get; set; }
  77. /// <summary>
  78. /// 冻结手续费
  79. /// </summary>
  80. public decimal FreezeCharge
  81. {
  82. get
  83. {
  84. return Math.Round(ListingRate * DepositReferPrice * Qty, 2, MidpointRounding.AwayFromZero);
  85. }
  86. }
  87. /// <summary>
  88. /// 交割商品
  89. /// </summary>
  90. [PropertyDisc("DeliveryGoodsName")]
  91. public string DeliveryGoodsName { get; set; }
  92. /// <summary>
  93. /// 交割商品代码
  94. /// </summary>
  95. [PropertyDisc("DeliveryGoodsCode")]
  96. public string DeliveryGoodsCode { get; set; }
  97. /// <summary>
  98. /// /申请数
  99. /// </summary>
  100. [PropertyDisc("Qty")]
  101. public decimal Qty { get; set; }
  102. /// <summary>
  103. /// 单位
  104. /// </summary>
  105. [PropertyDisc("GoodsUnitName")]
  106. public string GoodsUnitName { get; set; }
  107. /// <summary>
  108. /// 入库估价
  109. /// </summary>
  110. [PropertyDisc("StoreInPrice")]
  111. public decimal StoreInPrice { get; set; }
  112. /// <summary>
  113. /// 入库数量
  114. /// </summary>
  115. [PropertyDisc("StoreInQty")]
  116. public decimal StoreInQty { get; set; }
  117. /// <summary>
  118. /// r手续费
  119. /// </summary>
  120. //[PropertyDisc("StoreInCharge")]
  121. public decimal StoreInCharge
  122. {
  123. get
  124. {
  125. return Math.Round(ListingRate*DepositReferPrice*StoreInQty, 2, MidpointRounding.AwayFromZero);
  126. }
  127. }
  128. /// <summary>
  129. /// 挂牌费率
  130. /// </summary>
  131. [PropertyDisc("ListingRate")]
  132. public decimal ListingRate { get; set; }
  133. /// <summary>
  134. /// 参考价
  135. /// </summary>
  136. [PropertyDisc("DEPOSITREFERPRICE")]
  137. public decimal DepositReferPrice { get; set; }
  138. /// <summary>
  139. /// 是否可取消
  140. /// </summary>
  141. public bool CanCancel
  142. {
  143. get
  144. {
  145. return AuditStatus == eAuditStatus.AUDITSTATUS_CHECKING;
  146. }
  147. }
  148. /// <summary>
  149. /// 状态描述
  150. /// </summary>
  151. public string DisplayAuditStatus
  152. {
  153. get
  154. {
  155. return AuditStatus.Discription();
  156. }
  157. }
  158. /// <summary>
  159. /// 显示入库数量
  160. /// </summary>
  161. public string DisplayStoreInQty
  162. {
  163. get
  164. {
  165. if (AuditStatus == eAuditStatus.AUDITSTATUS_SUCCESS)
  166. {
  167. return StoreInQty + string.Empty;
  168. }
  169. else
  170. {
  171. return "--";
  172. }
  173. }
  174. }
  175. /// <summary>
  176. /// 显示入库手续费
  177. /// </summary>
  178. public string DisplayStoreInCharge
  179. {
  180. get
  181. {
  182. if (AuditStatus == eAuditStatus.AUDITSTATUS_SUCCESS)
  183. {
  184. return StoreInCharge + string.Empty;
  185. }
  186. else
  187. {
  188. return "--";
  189. }
  190. }
  191. }
  192. }
  193. public class DepositWareHouse
  194. {
  195. [PropertyDisc("WareHouseName")]
  196. public string WareHouseName { get; set; }
  197. [PropertyDisc("WareHouseId")]
  198. public long WareHouseId { get; set; }
  199. }
  200. }