FuturesQuoteItem.cs 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. using System;
  2. namespace Muchinfo.MTPClient.Data.Model.QuoteItem
  3. {
  4. public class FuturesQuoteItem : QuoteItemBase2
  5. {
  6. #region Fields
  7. /// <summary>
  8. /// 日增仓
  9. /// </summary>
  10. private int _dayAddPositions;
  11. /// <summary>
  12. /// 交收日
  13. /// </summary>
  14. private DateTime _deliveryDate;
  15. /// <summary>
  16. /// 昨持仓量
  17. /// </summary>
  18. private long _lastPositions;
  19. /// <summary>
  20. /// 昨结算
  21. /// </summary>
  22. private decimal _lastSettlement;
  23. /// <summary>
  24. /// 持仓
  25. /// </summary>
  26. private long _positions;
  27. /// <summary>
  28. /// 报价单位
  29. /// </summary>
  30. private string _quoteUnit;
  31. /// <summary>
  32. /// 结算
  33. /// </summary>
  34. private decimal _settlement;
  35. /// <summary>
  36. /// 成交量
  37. /// </summary>
  38. private int _volume;
  39. #endregion Fields
  40. #region Properties
  41. #region Public Properties
  42. /// <summary>
  43. /// 日增仓
  44. /// </summary>
  45. public int DayAddPositions
  46. {
  47. get
  48. {
  49. return _dayAddPositions;
  50. }
  51. set
  52. {
  53. Set(() => DayAddPositions, ref _dayAddPositions, value);
  54. }
  55. }
  56. /// <summary>
  57. /// 交收日
  58. /// </summary>
  59. public DateTime DeliveryDate
  60. {
  61. get
  62. {
  63. return _deliveryDate;
  64. }
  65. set
  66. {
  67. Set(() => DeliveryDate, ref _deliveryDate, value);
  68. }
  69. }
  70. /// <summary>
  71. /// 昨持仓量
  72. /// </summary>
  73. public long LastPositions
  74. {
  75. get
  76. {
  77. return _lastPositions;
  78. }
  79. set
  80. {
  81. Set(() => LastPositions, ref _lastPositions, value);
  82. }
  83. }
  84. /// <summary>
  85. /// 昨结算
  86. /// </summary>
  87. public decimal LastSettlement
  88. {
  89. get
  90. {
  91. return _lastSettlement;
  92. }
  93. set
  94. {
  95. Set(() => LastSettlement, ref _lastSettlement, value);
  96. }
  97. }
  98. /// <summary>
  99. /// 持仓
  100. /// </summary>
  101. public long Positions
  102. {
  103. get
  104. {
  105. return _positions;
  106. }
  107. set
  108. {
  109. Set(() => Positions, ref _positions, value);
  110. }
  111. }
  112. /// <summary>
  113. /// 报价单位
  114. /// </summary>
  115. public string QuoteUnit
  116. {
  117. get
  118. {
  119. return _quoteUnit;
  120. }
  121. set
  122. {
  123. Set(() => QuoteUnit, ref _quoteUnit, value);
  124. }
  125. }
  126. /// <summary>
  127. /// 结算
  128. /// </summary>
  129. public decimal Settlement
  130. {
  131. get
  132. {
  133. return _settlement;
  134. }
  135. set
  136. {
  137. Set(() => Settlement, ref _settlement, value);
  138. }
  139. }
  140. /// <summary>
  141. /// 成交量
  142. /// </summary>
  143. public int Volume
  144. {
  145. get
  146. {
  147. return _volume;
  148. }
  149. set
  150. {
  151. Set(() => Volume, ref _volume, value);
  152. }
  153. }
  154. #endregion Public Properties
  155. #endregion Properties
  156. #region Methods
  157. #region Public Methods
  158. /// <summary>
  159. /// 更新对象属性值(只更新需要字段)
  160. /// </summary>
  161. /// <param name="item">The item.</param>
  162. public override void UpdateFrom(QuoteItemBase item)
  163. {
  164. base.UpdateFrom(item);
  165. var furturesItem = item as FuturesQuoteItem;
  166. if (furturesItem == null)
  167. {
  168. return;
  169. }
  170. this.DayAddPositions = furturesItem.DayAddPositions;
  171. ////this.DeliveryDate = furturesItem.DeliveryDate;
  172. this.Positions = furturesItem.Positions;
  173. this.Settlement = furturesItem.Settlement;
  174. this.Volume = furturesItem.Volume;
  175. }
  176. #endregion Public Methods
  177. #endregion Methods
  178. }
  179. }