OrderEntity.cs 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. using System;
  2. using LeaRun.Application.Code;
  3. namespace LeaRun.Application.Entity.CustomerManage
  4. {
  5. /// <summary>
  6. /// 版 本
  7. /// Copyright (c) 2013-2016 上海力软信息技术有限公司
  8. /// 创 建:佘赐雄
  9. /// 日 期:2016-03-16 13:54
  10. /// 描 述:订单管理
  11. /// </summary>
  12. public class OrderEntity : BaseEntity
  13. {
  14. #region 实体成员
  15. /// <summary>
  16. /// 订单主键
  17. /// </summary>
  18. /// <returns></returns>
  19. public string OrderId { get; set; }
  20. /// <summary>
  21. /// 客户主键
  22. /// </summary>
  23. /// <returns></returns>
  24. public string CustomerId { get; set; }
  25. /// <summary>
  26. /// 客户名称
  27. /// </summary>
  28. /// <returns></returns>
  29. public string CustomerName { get; set; }
  30. /// <summary>
  31. /// 销售人员Id
  32. /// </summary>
  33. /// <returns></returns>
  34. public string SellerId { get; set; }
  35. /// <summary>
  36. /// 销售人员
  37. /// </summary>
  38. /// <returns></returns>
  39. public string SellerName { get; set; }
  40. /// <summary>
  41. /// 单据日期
  42. /// </summary>
  43. /// <returns></returns>
  44. public DateTime? OrderDate { get; set; }
  45. /// <summary>
  46. /// 单据编号
  47. /// </summary>
  48. /// <returns></returns>
  49. public string OrderCode { get; set; }
  50. /// <summary>
  51. /// 优惠金额
  52. /// </summary>
  53. /// <returns></returns>
  54. public decimal? DiscountSum { get; set; }
  55. /// <summary>
  56. /// 应收金额
  57. /// </summary>
  58. /// <returns></returns>
  59. public decimal? Accounts { get; set; }
  60. /// <summary>
  61. /// 已收金额
  62. /// </summary>
  63. /// <returns></returns>
  64. public decimal? ReceivedAmount { get; set; }
  65. /// <summary>
  66. /// 收款日期
  67. /// </summary>
  68. /// <returns></returns>
  69. public DateTime? PaymentDate { get; set; }
  70. /// <summary>
  71. /// 收款方式
  72. /// </summary>
  73. /// <returns></returns>
  74. public string PaymentMode { get; set; }
  75. /// <summary>
  76. /// 收款状态(1-未收款2-部分收款3-全部收款)
  77. /// </summary>
  78. /// <returns></returns>
  79. public int? PaymentState { get; set; }
  80. /// <summary>
  81. /// 销售费用
  82. /// </summary>
  83. /// <returns></returns>
  84. public decimal? SaleCost { get; set; }
  85. /// <summary>
  86. /// 摘要信息
  87. /// </summary>
  88. /// <returns></returns>
  89. public string AbstractInfo { get; set; }
  90. /// <summary>
  91. /// 合同编号
  92. /// </summary>
  93. /// <returns></returns>
  94. public string ContractCode { get; set; }
  95. /// <summary>
  96. /// 合同附件
  97. /// </summary>
  98. /// <returns></returns>
  99. public string ContractFile { get; set; }
  100. /// <summary>
  101. /// 排序码
  102. /// </summary>
  103. /// <returns></returns>
  104. public int? SortCode { get; set; }
  105. /// <summary>
  106. /// 删除标记
  107. /// </summary>
  108. /// <returns></returns>
  109. public int? DeleteMark { get; set; }
  110. /// <summary>
  111. /// 有效标志
  112. /// </summary>
  113. /// <returns></returns>
  114. public int? EnabledMark { get; set; }
  115. /// <summary>
  116. /// 备注
  117. /// </summary>
  118. /// <returns></returns>
  119. public string Description { get; set; }
  120. /// <summary>
  121. /// 创建日期
  122. /// </summary>
  123. /// <returns></returns>
  124. public DateTime? CreateDate { get; set; }
  125. /// <summary>
  126. /// 创建用户主键
  127. /// </summary>
  128. /// <returns></returns>
  129. public string CreateUserId { get; set; }
  130. /// <summary>
  131. /// 创建用户
  132. /// </summary>
  133. /// <returns></returns>
  134. public string CreateUserName { get; set; }
  135. /// <summary>
  136. /// 修改日期
  137. /// </summary>
  138. /// <returns></returns>
  139. public DateTime? ModifyDate { get; set; }
  140. /// <summary>
  141. /// 修改用户主键
  142. /// </summary>
  143. /// <returns></returns>
  144. public string ModifyUserId { get; set; }
  145. /// <summary>
  146. /// 修改用户
  147. /// </summary>
  148. /// <returns></returns>
  149. public string ModifyUserName { get; set; }
  150. #endregion
  151. #region 扩展操作
  152. /// <summary>
  153. /// 新增调用
  154. /// </summary>
  155. public override void Create()
  156. {
  157. this.OrderId = Guid.NewGuid().ToString();
  158. this.CreateDate = DateTime.Now;
  159. this.CreateUserId = OperatorProvider.Provider.Current().UserId;
  160. this.CreateUserName = OperatorProvider.Provider.Current().UserName;
  161. this.ReceivedAmount = 0;
  162. }
  163. /// <summary>
  164. /// 编辑调用
  165. /// </summary>
  166. /// <param name="keyValue"></param>
  167. public override void Modify(string keyValue)
  168. {
  169. this.OrderId = keyValue;
  170. this.ModifyDate = DateTime.Now;
  171. this.ModifyUserId = OperatorProvider.Provider.Current().UserId;
  172. this.ModifyUserName = OperatorProvider.Provider.Current().UserName;
  173. }
  174. #endregion
  175. }
  176. }