GoodsDeliveryRelationModel.cs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  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. namespace Muchinfo.MTPClient.Data.Model.Delivery
  8. {
  9. /// <summary>
  10. /// 交易商品交割关系表
  11. /// </summary>
  12. public class GoodsDeliveryRelationModel
  13. {
  14. #region SQL字段
  15. //<select id="SearchGoodsDeliveryRelationList" parameterType="java.util.Map"
  16. // resultType="HashMap">
  17. // SELECT
  18. // dr.GOODSID,
  19. // dr.DELIVERYGOODSID,
  20. // dr.CALCPARAMATERVALUE,
  21. // dr.RELATIONCONVERSION,
  22. // dr.RelationMode,
  23. // dr.RelationGoodsId,
  24. // dg.baseprice,
  25. // dr.Conversion,
  26. // dr.DeliveryPriceCalcMethod,
  27. // dr.DELIVERYPRICEMOVE,
  28. // dr.goodsscale,
  29. // dg.GoodsUnitId,
  30. // dg.DecimalPlace,
  31. // dg.Sponsor,
  32. // dg.DeliveryGoodsStatus,
  33. // dg.ExchangeAreaId,
  34. // dg.deliverygoodsname,
  35. // minRu.parametervalue minDeliveryQty,
  36. // maxRu.parametervalue maxDeliveryQty,
  37. // fe.feecalcMethod buyDeliveryMode,
  38. // fe.parameterValue as buyDeliveryFee,
  39. // askfe.feecalcmethod AskDeliveryMode,
  40. // askfe.parameterValue as askDeliveryFee,
  41. // rufax.parametervalue as faxValue,
  42. // gp.agreeunit currentAgreeunit,
  43. // gp.goodsunit currentGoodsunit,
  44. // gp.moneymode currentMoneymode,
  45. // gp.decimalplace currentDecimalplace,
  46. // g.goodsname currentGoodsname,
  47. // g.goodscode currentGoodscode,
  48. // mt.trademode currentTradeMode,
  49. // rg.goodsname RelationGoodsname,
  50. // rg.goodscode RelationGoodscode,
  51. // rp.agreeunit RelationAgreeunit,
  52. // rp.goodsunit RelationGoodsunit,
  53. // rp.moneymode RelationMoneymode,
  54. // rmt.trademode RelationtTradeMode,
  55. // rp.decimalplace RelationDecimalplace
  56. // from GoodsDeliveryRelation dr
  57. //left join goodsproperty gp on gp.goodsid = dr.goodsid
  58. //left join goods g on g.goodsid= gp.goodsid
  59. //left join goods rg on rg.goodsid= dr.RelationGoodsId
  60. //left join goodsproperty rp on rp.goodsid = dr.RelationGoodsId
  61. //left join markettype mt on mt.markettypeid = g.markettypeid
  62. //left join markettype rmt on rmt.markettypeid = rg.markettypeid
  63. //left join DeliveryGoods dg on dg.DeliveryGoodsId=dr.DeliveryGoodsId
  64. //left join DeliveryRule minRu on minRu.DeliveryGoodsId=dr.DeliveryGoodsId and minRu.ruleid= 1801
  65. //left join DeliveryRule maxRu on maxRu.DeliveryGoodsId=dr.DeliveryGoodsId and maxRu.ruleid= 1802
  66. //left join deliveryfee fe on fe.deliverygoodsid=dr.deliverygoodsid and fe.tradefeeid=1801
  67. //left join deliveryfee askfe on askfe.deliverygoodsid=dr.deliverygoodsid and askfe.tradefeeid=1802
  68. //left join deliveryrule rufax on rufax.deliverygoodsid=dr.deliverygoodsid and rufax.ruleid=2022
  69. // </select>
  70. #endregion
  71. /// <summary>
  72. /// 交易商品Id
  73. /// </summary>
  74. [PropertyDisc("GoodsId")]
  75. public long GoodsId { get; set; }
  76. /// <summary>
  77. /// 关联模式
  78. /// </summary>
  79. [PropertyDisc("RelationMode")]
  80. public eDeliveryContractLink RelationMode { get; set; }
  81. /// <summary>
  82. /// 关联交易商品Id
  83. /// </summary>
  84. [PropertyDisc("RelationGoodsId")]
  85. public long RelationGoodsId { get; set; }
  86. /// <summary>
  87. /// 交割商品Id
  88. /// </summary>
  89. [PropertyDisc("DeliveryGoodsId")]
  90. public long DeliveryGoodsId { get; set; }
  91. /// <summary>
  92. /// 兑换系数
  93. /// </summary>
  94. [PropertyDisc("Conversion")]
  95. public decimal Conversion { get; set; }
  96. /// <summary>
  97. /// 交割价算法
  98. /// </summary>
  99. [PropertyDisc("DeliveryPriceCalcMethod")]
  100. public eReckonPriceCalcMethodType DeliveryPriceCalcMethod { get; set; }
  101. /// <summary>
  102. /// 算法参数
  103. /// </summary>
  104. [PropertyDisc("CalcParamaterValue")]
  105. public decimal CalcParamaterValue { get; set; }
  106. /// <summary>
  107. /// 差价升贴水
  108. /// </summary>
  109. [PropertyDisc("DeliveryPriceMove")]
  110. public decimal DeliveryPriceMove { get; set; }
  111. /// <summary>
  112. /// 商品配比【申报商品-关联商品】
  113. /// </summary>
  114. [PropertyDisc("goodsscale")]
  115. public decimal goodsscale { get; set; }
  116. /// <summary>
  117. /// 关联交易商品兑换系数
  118. /// </summary>
  119. [PropertyDisc("RELATIONCONVERSION")]
  120. public decimal RELATIONCONVERSION { get; set; }
  121. #region 交割商品表DeliveryGoods
  122. /// <summary>
  123. /// 商品状态:0待激活、1正常、 2已注销
  124. /// </summary>
  125. [PropertyDisc("DeliveryGoodsStatus")]
  126. public eGoodsStatus DeliveryGoodsStatus { get; set; }
  127. /// <summary>
  128. /// 交割商品合约单位-数据库表中,此字段删除
  129. /// </summary>
  130. //[PropertyDisc("AgreeUnit")]
  131. //public decimal AgreeUnit { get; set; }
  132. /// <summary>
  133. /// 商品单位
  134. /// </summary>
  135. [PropertyDisc("GoodsUnitId")]
  136. public long GoodsUnitId { get; set; }
  137. /// <summary>
  138. /// 交割商品名称
  139. /// </summary>
  140. [PropertyDisc("deliverygoodsname")]
  141. public string deliverygoodsname { get; set; }
  142. /// <summary>
  143. /// 交割商品代码
  144. /// </summary>
  145. [PropertyDisc("deliverygoodscode")]
  146. public string deliverygoodscode { get; set; }
  147. /// <summary>
  148. /// 交割商品名称代码
  149. /// </summary>
  150. public string DeliveryGoodsNameCode
  151. {
  152. get
  153. {
  154. return deliverygoodsname + " " + deliverygoodscode;
  155. }
  156. }
  157. /// <summary>
  158. /// 价格小数位
  159. /// </summary>
  160. [PropertyDisc("DecimalPlace")]
  161. public decimal DecimalPlace { get; set; }
  162. /// <summary>
  163. /// 发起方式'1买方限定,2卖方限定,3双方自由';
  164. /// </summary>
  165. [PropertyDisc("Sponsor")]
  166. public eSponsorType Sponsor { get; set; }
  167. /// <summary>
  168. /// 基准价
  169. /// </summary>
  170. [PropertyDisc("BasePrice")]
  171. public decimal BasePrice { get; set; }
  172. #endregion
  173. #region 交割规则表DeliveryRule
  174. ///// <summary>
  175. ///// 规则id
  176. ///// </summary>
  177. //[PropertyDisc("Ruleid")]
  178. //public long Ruleid { get; set; }
  179. ///// <summary>
  180. ///// 参数值
  181. ///// </summary>
  182. //[PropertyDisc("ParameterValue")]
  183. //public decimal ParameterValue { get; set; }
  184. /// <summary>
  185. /// 最小交割数量
  186. /// </summary>
  187. [PropertyDisc("minDeliveryQty")]
  188. public decimal minDeliveryQty { get; set; }
  189. /// <summary>
  190. /// 最大交割数量
  191. /// </summary>
  192. [PropertyDisc("maxDeliveryQty")]
  193. public decimal maxDeliveryQty { get; set; }
  194. private DateTime _minDateDeliveryDate =DateTime.MinValue;
  195. /// <summary>
  196. /// 交割开始日期
  197. /// </summary>
  198. [PropertyDisc("minDateDeliveryDate")]
  199. public DateTime MinDateDeliveryDate
  200. {
  201. get { return _minDateDeliveryDate; }
  202. set { _minDateDeliveryDate = value; }
  203. }
  204. private DateTime _maxDateDeliveryDate = DateTime.MinValue;
  205. /// <summary>
  206. /// 交割结束日期
  207. /// </summary>
  208. [PropertyDisc("maxDateDeliveryDate")]
  209. public DateTime MaxDateDeliveryDate
  210. {
  211. get { return _maxDateDeliveryDate; }
  212. set { _maxDateDeliveryDate = value; }
  213. }
  214. #endregion
  215. #region 买交割手续费
  216. // fe.feecalcMethod buyDeliveryMode, 手续费类型
  217. //fe.parameterValue as buyDeliveryFee, 手续费参数值
  218. //askfe.feecalcmethod AskDeliveryMode, 卖手续费类型
  219. //askfe.parameterValue as askDeliveryFee 卖手续费参数值
  220. /// <summary>
  221. /// 手续费类型
  222. /// </summary>
  223. [PropertyDisc("buyDeliveryMode")]
  224. public long buyDeliveryMode { get; set; }
  225. /// <summary>
  226. /// 手续费参数值
  227. /// </summary>
  228. [PropertyDisc("buyDeliveryFee")]
  229. public decimal buyDeliveryFee { get; set; }
  230. #endregion
  231. #region 商品属性表
  232. /// <summary>
  233. /// 交易商品-合约单位
  234. /// </summary>
  235. [PropertyDisc("currentAgreeunit")]
  236. public decimal currentAgreeunit { get; set; }
  237. /// <summary>
  238. /// 交易商品-商品单位
  239. /// </summary>
  240. [PropertyDisc("currentGoodsunit")]
  241. public decimal currentGoodsunit { get; set; }
  242. /// <summary>
  243. /// 交易商品-资金模式-1:保证金、2:全款划扣
  244. /// </summary>
  245. [PropertyDisc("currentMoneymode")]
  246. public eMoneyMode currentMoneymode { get; set; }
  247. /// <summary>
  248. /// 交易商品-价格小数位
  249. /// </summary>
  250. [PropertyDisc("currentDecimalplace")]
  251. public int currentDecimalplace { get; set; }
  252. /// <summary>
  253. /// 交易商品-商品名称
  254. /// </summary>
  255. [PropertyDisc("currentGoodsname")]
  256. public string currentGoodsname { get; set; }
  257. /// <summary>
  258. /// 交易商品-商品代码
  259. /// </summary>
  260. [PropertyDisc("currentGoodscode")]
  261. public string currentGoodscode { get; set; }
  262. /// <summary>
  263. /// 交易商品-交易市场
  264. /// </summary>
  265. [PropertyDisc("currentTradeMode")]
  266. public eTradeMode currentTradeMode { get; set; }
  267. /// <summary>
  268. /// 关联交易商品-商品名称
  269. /// </summary>
  270. [PropertyDisc("RelationGoodsname")]
  271. public string RelationGoodsname { get; set; }
  272. /// <summary>
  273. /// 关联交易商品-商品代码
  274. /// </summary>
  275. [PropertyDisc("RelationGoodscode")]
  276. public string RelationGoodscode { get; set; }
  277. /// <summary>
  278. /// 关联交易商品-商品名称代码
  279. /// </summary>
  280. public string RelationGoodsNameCode
  281. {
  282. get
  283. {
  284. return RelationGoodsname + " " + RelationGoodscode;
  285. }
  286. }
  287. /// <summary>
  288. /// 关联交易商品-合约单位
  289. /// </summary>
  290. [PropertyDisc("RelationAgreeunit")]
  291. public decimal RelationAgreeunit { get; set; }
  292. /// <summary>
  293. /// 关联交易商品-商品单位
  294. /// </summary>
  295. [PropertyDisc("RelationGoodsunit")]
  296. public decimal RelationGoodsunit { get; set; }
  297. /// <summary>
  298. /// 关联交易商品-资金模式-1:保证金、2:全款划扣
  299. /// </summary>
  300. [PropertyDisc("RelationMoneymode")]
  301. public eMoneyMode RelationMoneymode { get; set; }
  302. /// <summary>
  303. /// 关联交易商品-价格小数位
  304. /// </summary>
  305. [PropertyDisc("RelationDecimalplace")]
  306. public int RelationDecimalplace { get; set; }
  307. /// <summary>
  308. /// 关联交易商品-交易市场
  309. /// </summary>
  310. [PropertyDisc("RelationtTradeMode")]
  311. public eTradeMode RelationtTradeMode { get; set; }
  312. #endregion
  313. #region 卖交收
  314. /// <summary>
  315. /// 卖手续费类型
  316. /// </summary>
  317. [PropertyDisc("AskDeliveryMode")]
  318. public long AskDeliveryMode { get; set; }
  319. /// <summary>
  320. /// 手续费参数值
  321. /// </summary>
  322. [PropertyDisc("askDeliveryFee")]
  323. public decimal AskDeliveryFee { get; set; }
  324. #endregion
  325. /// <summary>
  326. /// 税款参数
  327. /// </summary>
  328. [PropertyDisc("faxValue")]
  329. public decimal FaxValue { get; set; }
  330. /// <summary>
  331. /// 交割价算法-字符转换:'指定价,持仓价,结算价,协议价,昨结算价';
  332. /// </summary>
  333. public string DeliveryPriceCalcMethodDisplay
  334. {
  335. get
  336. {
  337. return DeliveryPriceCalcMethod.Discription();
  338. }
  339. }
  340. }
  341. }