OrderInfoOutput.cs 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. 
  2. namespace Edge.Core.Domain.FccOrderInfo.Output
  3. {
  4. /// <summary>
  5. /// fcc 订单页分页查询结果对象
  6. /// </summary>
  7. public class OrderInfoOutput
  8. {
  9. /// <summary>
  10. /// 总数
  11. /// </summary>
  12. public int Total { get; set; }
  13. /// <summary>
  14. /// 订单
  15. /// </summary>
  16. public List<OrderInfo> List { get; set; }
  17. }
  18. /// <summary>
  19. /// fcc 订单页数据对象
  20. /// </summary>
  21. public class OrderInfo
  22. {
  23. public OrderInfo(FccOrderInfo fccOrderInfo,string stationName,string machineName)
  24. {
  25. this.StationName = stationName;
  26. this.MachineName = machineName;
  27. this.Id = fccOrderInfo.Id;
  28. this.Ttc = fccOrderInfo.Ttc;
  29. this.AuthorizationTime = fccOrderInfo.AuthorizationTime;
  30. this.EndTime = fccOrderInfo.EndTime;
  31. this.PaymentTime = fccOrderInfo.PaymentTime;
  32. this.NozzleNum = fccOrderInfo.NozzleNum;
  33. this.OilName = fccOrderInfo.OilName;
  34. this.PaymentStatus = fccOrderInfo.PaymentStatus;
  35. this.PayType = fccOrderInfo.PayType;
  36. this.CloundOrderId = fccOrderInfo.CloundOrderId;
  37. this.Amount = fccOrderInfo.Amount;
  38. this.Volume = fccOrderInfo.Volume;
  39. this.AmountPayable = fccOrderInfo.AmountPayable;
  40. this.Price = fccOrderInfo.Price;
  41. this.RefundAmount = fccOrderInfo.RefundAmount;
  42. this.UserName = fccOrderInfo.UserName;
  43. this.PhoneNumber = fccOrderInfo.PhoneNumber;
  44. this.PaymentName = fccOrderInfo.PaymentName;
  45. this.AuthorizationStatus = fccOrderInfo.AuthorizationStatus;
  46. this.RefundStatus = fccOrderInfo.RefundStatus;
  47. this.VolumePayable = fccOrderInfo.VolumePayable;
  48. }
  49. /// <summary>
  50. /// 油站名
  51. /// </summary>
  52. public string StationName { get; set; }
  53. /// <summary>
  54. /// 油机号
  55. /// </summary>
  56. public string MachineName { get; set; }
  57. /// <summary>
  58. /// 订单id
  59. /// </summary>
  60. public long Id { get; set; }
  61. /// <summary>
  62. /// 流水号
  63. /// </summary>
  64. public int Ttc { get; set; }
  65. /// <summary>
  66. /// 授权时间
  67. /// </summary>
  68. public DateTime AuthorizationTime { get; set; }
  69. /// <summary>
  70. /// 挂枪时间
  71. /// </summary>
  72. public DateTime? EndTime { get; set; }
  73. /// <summary>
  74. /// 交易时间
  75. /// </summary>
  76. public DateTime? PaymentTime { get; set; }
  77. /// <summary>
  78. /// 枪号
  79. /// </summary>
  80. public int NozzleNum { get; set; }
  81. /// <summary>
  82. /// 油品名
  83. /// </summary>
  84. public String OilName { get; set; }
  85. /// <summary>
  86. /// 支付状态
  87. /// </summary>
  88. public int PaymentStatus { get; set; }
  89. /// <summary>
  90. /// 支付类型
  91. /// </summary>
  92. public int? PayType { get; set; }
  93. /// <summary>
  94. /// 云端id
  95. /// </summary>
  96. public long? CloundOrderId { get; set; }
  97. /// <summary>
  98. /// 实际加油金额
  99. /// </summary>
  100. public decimal Amount { get; set; }
  101. /// <summary>
  102. /// 实际加油升数
  103. /// </summary>
  104. public decimal Volume { get; set; }
  105. /// <summary>
  106. /// 实际支付金额
  107. /// </summary>
  108. public decimal? AmountPayable { get; set; }
  109. /// <summary>
  110. /// 单价
  111. /// </summary>
  112. public decimal Price { get; set; }
  113. /// <summary>
  114. /// 退款金额
  115. /// </summary>
  116. public decimal? RefundAmount { get; set; }
  117. /// <summary>
  118. /// 用户名
  119. /// </summary>
  120. public string UserName { get; set; }
  121. /// <summary>
  122. /// 手机号
  123. /// </summary>
  124. public string PhoneNumber { get; set; }
  125. /// <summary>
  126. /// 支付类型名称
  127. /// </summary>
  128. public string PaymentName { get; set; }
  129. /// <summary>
  130. /// 授权状态
  131. /// </summary>
  132. public int AuthorizationStatus { get; set; }
  133. /// <summary>
  134. /// 退款状态
  135. /// </summary>
  136. public int RefundStatus { get; set; }
  137. /// <summary>
  138. /// 预定升数
  139. /// </summary>
  140. public decimal? VolumePayable { get; set; }
  141. /// <summary>
  142. /// 获取支付状态
  143. /// </summary>
  144. private Dictionary<int,string> paystatusValue = new Dictionary<int, string>() { {0,"未支付"}, { 1, "已支付" }, { 2, "订单正在支付中" }, { 3, "订单通过卡支付" }, { 4, "订单已完成" }, { 5, "已取消" } };
  145. public string GetPaystatus()
  146. {
  147. return paystatusValue[PaymentStatus];
  148. }
  149. /// <summary>
  150. /// 获取授权状态
  151. /// </summary>
  152. private Dictionary<int, string> authorizationValue = new Dictionary<int, string>() { { 0, "未授权" }, { 1, "授权" }, { 2, "等待授权" }, { 3, "加油中" }, { 4, "已完成" } };
  153. public string GetAuthorizationStatus()
  154. {
  155. return authorizationValue[AuthorizationStatus];
  156. }
  157. public FccOrderInfo ToComponent()
  158. {
  159. return new FccOrderInfo
  160. {
  161. Ttc = this.Ttc,
  162. AuthorizationTime = this.AuthorizationTime,
  163. EndTime = this.EndTime,
  164. PaymentTime = this.PaymentTime,
  165. NozzleNum = this.NozzleNum,
  166. OilName = this.OilName,
  167. PaymentStatus = this.PaymentStatus,
  168. PayType = this.PayType,
  169. CloundOrderId = this.CloundOrderId,
  170. Amount = this.Amount,
  171. Volume = this.Volume,
  172. AmountPayable = this.AmountPayable,
  173. Price = this.Price,
  174. RefundAmount = this.RefundAmount,
  175. UserName = this.UserName,
  176. PhoneNumber = this.PhoneNumber,
  177. PaymentName = this.PaymentName
  178. };
  179. }
  180. }
  181. }