PrePostDetail.cs 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. using Muchinfo.MTPClient.Data.Enums;
  2. using Muchinfo.MTPClient.Data.Helper;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. //----------------------------------------------------------------
  8. //Module Name: $safeprojectname$
  9. //Purpose:
  10. //CopyRight: Muchinfo
  11. //History:
  12. //----------------------------------------------------------------
  13. //DateTime 2016/6/17 16:42:21
  14. //Author
  15. //Description Create
  16. //----------------------------------------------------------------
  17. namespace Muchinfo.MTPClient.Data.Model.Account
  18. {
  19. public class PrePostDetail
  20. {
  21. /// <summary>
  22. /// 预埋单号
  23. /// </summary>
  24. [PropertyDisc("PreOrderId")]
  25. public long PreOrderId { get; set; }
  26. /// <summary>
  27. /// 商品ID
  28. /// </summary>
  29. [PropertyDisc("GoodsId")]
  30. public long GoodsId { get; set; }
  31. /// <summary>
  32. /// 下单类型
  33. /// </summary>
  34. [PropertyDisc("BuildType")]
  35. public OpenCloseMode BuildType { get; set; }
  36. /// <summary>
  37. /// 取价方式
  38. /// </summary>
  39. [PropertyDisc("PRICEMODE")]
  40. public ePriceMode PRICEMODE { get; set; }
  41. /// <summary>
  42. /// 取价方式显示中文
  43. /// </summary>
  44. public string PRICEMODEDisplay
  45. {
  46. get
  47. {
  48. return PRICEMODE.Discription();
  49. }
  50. }
  51. /// <summary>
  52. /// 触发价格类型
  53. /// </summary>
  54. [PropertyDisc("TriggerType")]
  55. public eTriggerType TriggerType { get; set; }
  56. /// <summary>
  57. /// 触发价格
  58. /// </summary>
  59. [PropertyDisc("TriggerPrice")]
  60. public decimal TriggerPrice { get; set; }
  61. /// <summary>
  62. /// 止盈价格
  63. /// </summary>
  64. [PropertyDisc("SpPrice")]
  65. public decimal SpPrice { get; set; }
  66. /// <summary>
  67. /// 止损价格
  68. /// </summary>
  69. [PropertyDisc("SlPrice")]
  70. public decimal SlPrice { get; set; }
  71. /// <summary>
  72. /// 买卖方向
  73. /// </summary>
  74. [PropertyDisc("BuyOrSell")]
  75. public Direction BuyOrSell { get; set; }
  76. /// <summary>
  77. /// 允许成交偏差范围
  78. /// </summary>
  79. [PropertyDisc("AllowTradeSub")]
  80. public long AllowTradeSub { get; set; }
  81. /// <summary>
  82. /// 有效类型
  83. /// </summary>
  84. [PropertyDisc("ValidType")]
  85. public ExpirationType ValidType { get; set; }
  86. /// <summary>
  87. /// 有效时间
  88. /// </summary>
  89. [PropertyDisc("ValidTime")]
  90. public DateTime ValidTime { get; set; }
  91. /// <summary>
  92. /// 操作类型
  93. /// </summary>
  94. [PropertyDisc("OperateType")]
  95. public eOrderOperateType OperateType { get; set; }
  96. /// <summary>
  97. /// 操作员账号ID
  98. /// </summary>
  99. [PropertyDisc("OperatorId")]
  100. public long OperatorId { get; set; }
  101. /// <summary>
  102. /// 预埋单状态
  103. /// </summary>
  104. [PropertyDisc("OrderStatus")]
  105. public PrepostStatus OrderStatus { get; set; }
  106. /// <summary>
  107. /// 商品编号
  108. /// </summary>
  109. [PropertyDisc("goodscode")]
  110. public string goodscode { get; set; }
  111. /// <summary>
  112. /// 商品名称
  113. /// </summary>
  114. [PropertyDisc("goodsname")]
  115. public string goodsname { get; set; }
  116. /// <summary>
  117. /// 备注
  118. /// </summary>
  119. [PropertyDisc("Remark")]
  120. public string Remark { get; set; }
  121. /// <summary>
  122. /// 委托价格
  123. /// </summary>
  124. [PropertyDisc("orderprice")]
  125. public decimal orderprice { get; set; }
  126. /// <summary>
  127. /// 委托价格-转换控制
  128. /// </summary>
  129. public string orderpriceDisplay
  130. {
  131. get
  132. {
  133. if (BuildType != OpenCloseMode.BUILDTYPE_CLOSE && PRICEMODE != ePriceMode.PRICEMODE_MARKET)
  134. {
  135. return orderprice.ToString();
  136. }
  137. else
  138. {
  139. return "-";
  140. }
  141. }
  142. }
  143. /// <summary>
  144. /// 竞价委托价格-转换控制
  145. /// </summary>
  146. public string Bid_OrderpriceDisplay
  147. {
  148. get
  149. {
  150. if (PRICEMODE!=ePriceMode.PRICEMODE_MARKET)
  151. {
  152. return orderprice.ToString();
  153. }
  154. else
  155. {
  156. return "-";
  157. }
  158. }
  159. }
  160. /// <summary>
  161. /// 委托数量
  162. /// </summary>
  163. [PropertyDisc("orderqty")]
  164. public decimal orderqty { get; set; }
  165. /// <summary>
  166. /// 委托时间
  167. /// </summary>
  168. [PropertyDisc("ClientOrderTime")]
  169. public DateTime ClientOrderTime { get; set; }
  170. public string OrderStatusStr
  171. {
  172. get
  173. {
  174. return OrderStatus.Discription();
  175. }
  176. }
  177. public string BuildTypeStr
  178. {
  179. get { return BuildType.Discription(); }
  180. }
  181. public string TriggerTypeStr
  182. {
  183. get { return TriggerType.Discription(); }
  184. }
  185. public string TriggerPriceDisplay
  186. {
  187. get
  188. {
  189. return TriggerTypeStr + " " + TriggerPrice.ToString();
  190. }
  191. }
  192. public string BuyOrSellStr
  193. {
  194. get { return BuyOrSell.Discription(); }
  195. }
  196. public string ValidTypeStr
  197. {
  198. get { return ValidType.Discription(); }
  199. }
  200. public string OperateTypeStr
  201. {
  202. get { return OperateType.Discription(); }
  203. }
  204. /// <summary>
  205. /// 是否可撤单
  206. /// </summary>
  207. public bool IsCanCancel
  208. {
  209. get
  210. {
  211. return OrderStatus==PrepostStatus.PREPOST_STATUS_MARKET;
  212. }
  213. }
  214. }
  215. }