| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375 |
- using Muchinfo.MTPClient.Data.Enums;
- using Muchinfo.MTPClient.Data.Helper;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace Muchinfo.MTPClient.Data.Model.Delivery
- {
- /// <summary>
- /// 交易商品交割关系表
- /// </summary>
- public class GoodsDeliveryRelationModel
- {
- #region SQL字段
- //<select id="SearchGoodsDeliveryRelationList" parameterType="java.util.Map"
- // resultType="HashMap">
- // SELECT
- // dr.GOODSID,
- // dr.DELIVERYGOODSID,
- // dr.CALCPARAMATERVALUE,
- // dr.RELATIONCONVERSION,
- // dr.RelationMode,
- // dr.RelationGoodsId,
- // dg.baseprice,
- // dr.Conversion,
- // dr.DeliveryPriceCalcMethod,
- // dr.DELIVERYPRICEMOVE,
- // dr.goodsscale,
- // dg.GoodsUnitId,
- // dg.DecimalPlace,
- // dg.Sponsor,
- // dg.DeliveryGoodsStatus,
- // dg.ExchangeAreaId,
- // dg.deliverygoodsname,
- // minRu.parametervalue minDeliveryQty,
- // maxRu.parametervalue maxDeliveryQty,
- // fe.feecalcMethod buyDeliveryMode,
- // fe.parameterValue as buyDeliveryFee,
- // askfe.feecalcmethod AskDeliveryMode,
- // askfe.parameterValue as askDeliveryFee,
- // rufax.parametervalue as faxValue,
- // gp.agreeunit currentAgreeunit,
- // gp.goodsunit currentGoodsunit,
- // gp.moneymode currentMoneymode,
- // gp.decimalplace currentDecimalplace,
- // g.goodsname currentGoodsname,
- // g.goodscode currentGoodscode,
- // mt.trademode currentTradeMode,
- // rg.goodsname RelationGoodsname,
- // rg.goodscode RelationGoodscode,
- // rp.agreeunit RelationAgreeunit,
- // rp.goodsunit RelationGoodsunit,
- // rp.moneymode RelationMoneymode,
- // rmt.trademode RelationtTradeMode,
- // rp.decimalplace RelationDecimalplace
- // from GoodsDeliveryRelation dr
- //left join goodsproperty gp on gp.goodsid = dr.goodsid
- //left join goods g on g.goodsid= gp.goodsid
- //left join goods rg on rg.goodsid= dr.RelationGoodsId
- //left join goodsproperty rp on rp.goodsid = dr.RelationGoodsId
- //left join markettype mt on mt.markettypeid = g.markettypeid
- //left join markettype rmt on rmt.markettypeid = rg.markettypeid
- //left join DeliveryGoods dg on dg.DeliveryGoodsId=dr.DeliveryGoodsId
- //left join DeliveryRule minRu on minRu.DeliveryGoodsId=dr.DeliveryGoodsId and minRu.ruleid= 1801
- //left join DeliveryRule maxRu on maxRu.DeliveryGoodsId=dr.DeliveryGoodsId and maxRu.ruleid= 1802
- //left join deliveryfee fe on fe.deliverygoodsid=dr.deliverygoodsid and fe.tradefeeid=1801
- //left join deliveryfee askfe on askfe.deliverygoodsid=dr.deliverygoodsid and askfe.tradefeeid=1802
- //left join deliveryrule rufax on rufax.deliverygoodsid=dr.deliverygoodsid and rufax.ruleid=2022
- // </select>
- #endregion
- /// <summary>
- /// 交易商品Id
- /// </summary>
- [PropertyDisc("GoodsId")]
- public long GoodsId { get; set; }
- /// <summary>
- /// 关联模式
- /// </summary>
- [PropertyDisc("RelationMode")]
- public eDeliveryContractLink RelationMode { get; set; }
- /// <summary>
- /// 关联交易商品Id
- /// </summary>
- [PropertyDisc("RelationGoodsId")]
- public long RelationGoodsId { get; set; }
- /// <summary>
- /// 交割商品Id
- /// </summary>
- [PropertyDisc("DeliveryGoodsId")]
- public long DeliveryGoodsId { get; set; }
- /// <summary>
- /// 兑换系数
- /// </summary>
- [PropertyDisc("Conversion")]
- public decimal Conversion { get; set; }
- /// <summary>
- /// 交割价算法
- /// </summary>
- [PropertyDisc("DeliveryPriceCalcMethod")]
- public eReckonPriceCalcMethodType DeliveryPriceCalcMethod { get; set; }
- /// <summary>
- /// 算法参数
- /// </summary>
- [PropertyDisc("CalcParamaterValue")]
- public decimal CalcParamaterValue { get; set; }
- /// <summary>
- /// 差价升贴水
- /// </summary>
- [PropertyDisc("DeliveryPriceMove")]
- public decimal DeliveryPriceMove { get; set; }
- /// <summary>
- /// 商品配比【申报商品-关联商品】
- /// </summary>
- [PropertyDisc("goodsscale")]
- public decimal goodsscale { get; set; }
- /// <summary>
- /// 关联交易商品兑换系数
- /// </summary>
- [PropertyDisc("RELATIONCONVERSION")]
- public decimal RELATIONCONVERSION { get; set; }
- #region 交割商品表DeliveryGoods
- /// <summary>
- /// 商品状态:0待激活、1正常、 2已注销
- /// </summary>
- [PropertyDisc("DeliveryGoodsStatus")]
- public eGoodsStatus DeliveryGoodsStatus { get; set; }
- /// <summary>
- /// 交割商品合约单位-数据库表中,此字段删除
- /// </summary>
- //[PropertyDisc("AgreeUnit")]
- //public decimal AgreeUnit { get; set; }
- /// <summary>
- /// 商品单位
- /// </summary>
- [PropertyDisc("GoodsUnitId")]
- public long GoodsUnitId { get; set; }
- /// <summary>
- /// 交割商品名称
- /// </summary>
- [PropertyDisc("deliverygoodsname")]
- public string deliverygoodsname { get; set; }
- /// <summary>
- /// 交割商品代码
- /// </summary>
- [PropertyDisc("deliverygoodscode")]
- public string deliverygoodscode { get; set; }
- /// <summary>
- /// 交割商品名称代码
- /// </summary>
- public string DeliveryGoodsNameCode
- {
- get
- {
- return deliverygoodsname + " " + deliverygoodscode;
- }
- }
- /// <summary>
- /// 价格小数位
- /// </summary>
- [PropertyDisc("DecimalPlace")]
- public decimal DecimalPlace { get; set; }
- /// <summary>
- /// 发起方式'1买方限定,2卖方限定,3双方自由';
- /// </summary>
- [PropertyDisc("Sponsor")]
- public eSponsorType Sponsor { get; set; }
- /// <summary>
- /// 基准价
- /// </summary>
- [PropertyDisc("BasePrice")]
- public decimal BasePrice { get; set; }
- #endregion
- #region 交割规则表DeliveryRule
- ///// <summary>
- ///// 规则id
- ///// </summary>
- //[PropertyDisc("Ruleid")]
- //public long Ruleid { get; set; }
- ///// <summary>
- ///// 参数值
- ///// </summary>
- //[PropertyDisc("ParameterValue")]
- //public decimal ParameterValue { get; set; }
- /// <summary>
- /// 最小交割数量
- /// </summary>
- [PropertyDisc("minDeliveryQty")]
- public decimal minDeliveryQty { get; set; }
- /// <summary>
- /// 最大交割数量
- /// </summary>
- [PropertyDisc("maxDeliveryQty")]
- public decimal maxDeliveryQty { get; set; }
-
-
- private DateTime _minDateDeliveryDate =DateTime.MinValue;
- /// <summary>
- /// 交割开始日期
- /// </summary>
- [PropertyDisc("minDateDeliveryDate")]
- public DateTime MinDateDeliveryDate
- {
- get { return _minDateDeliveryDate; }
- set { _minDateDeliveryDate = value; }
- }
-
- private DateTime _maxDateDeliveryDate = DateTime.MinValue;
- /// <summary>
- /// 交割结束日期
- /// </summary>
- [PropertyDisc("maxDateDeliveryDate")]
- public DateTime MaxDateDeliveryDate
- {
- get { return _maxDateDeliveryDate; }
- set { _maxDateDeliveryDate = value; }
- }
- #endregion
- #region 买交割手续费
- // fe.feecalcMethod buyDeliveryMode, 手续费类型
- //fe.parameterValue as buyDeliveryFee, 手续费参数值
- //askfe.feecalcmethod AskDeliveryMode, 卖手续费类型
- //askfe.parameterValue as askDeliveryFee 卖手续费参数值
- /// <summary>
- /// 手续费类型
- /// </summary>
- [PropertyDisc("buyDeliveryMode")]
- public long buyDeliveryMode { get; set; }
- /// <summary>
- /// 手续费参数值
- /// </summary>
- [PropertyDisc("buyDeliveryFee")]
- public decimal buyDeliveryFee { get; set; }
- #endregion
- #region 商品属性表
- /// <summary>
- /// 交易商品-合约单位
- /// </summary>
- [PropertyDisc("currentAgreeunit")]
- public decimal currentAgreeunit { get; set; }
- /// <summary>
- /// 交易商品-商品单位
- /// </summary>
- [PropertyDisc("currentGoodsunit")]
- public decimal currentGoodsunit { get; set; }
- /// <summary>
- /// 交易商品-资金模式-1:保证金、2:全款划扣
- /// </summary>
- [PropertyDisc("currentMoneymode")]
- public eMoneyMode currentMoneymode { get; set; }
- /// <summary>
- /// 交易商品-价格小数位
- /// </summary>
- [PropertyDisc("currentDecimalplace")]
- public int currentDecimalplace { get; set; }
- /// <summary>
- /// 交易商品-商品名称
- /// </summary>
- [PropertyDisc("currentGoodsname")]
- public string currentGoodsname { get; set; }
- /// <summary>
- /// 交易商品-商品代码
- /// </summary>
- [PropertyDisc("currentGoodscode")]
- public string currentGoodscode { get; set; }
- /// <summary>
- /// 交易商品-交易市场
- /// </summary>
- [PropertyDisc("currentTradeMode")]
- public eTradeMode currentTradeMode { get; set; }
- /// <summary>
- /// 关联交易商品-商品名称
- /// </summary>
- [PropertyDisc("RelationGoodsname")]
- public string RelationGoodsname { get; set; }
- /// <summary>
- /// 关联交易商品-商品代码
- /// </summary>
- [PropertyDisc("RelationGoodscode")]
- public string RelationGoodscode { get; set; }
- /// <summary>
- /// 关联交易商品-商品名称代码
- /// </summary>
- public string RelationGoodsNameCode
- {
- get
- {
- return RelationGoodsname + " " + RelationGoodscode;
- }
- }
- /// <summary>
- /// 关联交易商品-合约单位
- /// </summary>
- [PropertyDisc("RelationAgreeunit")]
- public decimal RelationAgreeunit { get; set; }
- /// <summary>
- /// 关联交易商品-商品单位
- /// </summary>
- [PropertyDisc("RelationGoodsunit")]
- public decimal RelationGoodsunit { get; set; }
- /// <summary>
- /// 关联交易商品-资金模式-1:保证金、2:全款划扣
- /// </summary>
- [PropertyDisc("RelationMoneymode")]
- public eMoneyMode RelationMoneymode { get; set; }
- /// <summary>
- /// 关联交易商品-价格小数位
- /// </summary>
- [PropertyDisc("RelationDecimalplace")]
- public int RelationDecimalplace { get; set; }
- /// <summary>
- /// 关联交易商品-交易市场
- /// </summary>
- [PropertyDisc("RelationtTradeMode")]
- public eTradeMode RelationtTradeMode { get; set; }
- #endregion
- #region 卖交收
- /// <summary>
- /// 卖手续费类型
- /// </summary>
- [PropertyDisc("AskDeliveryMode")]
- public long AskDeliveryMode { get; set; }
- /// <summary>
- /// 手续费参数值
- /// </summary>
- [PropertyDisc("askDeliveryFee")]
- public decimal AskDeliveryFee { get; set; }
- #endregion
- /// <summary>
- /// 税款参数
- /// </summary>
- [PropertyDisc("faxValue")]
- public decimal FaxValue { get; set; }
- /// <summary>
- /// 交割价算法-字符转换:'指定价,持仓价,结算价,协议价,昨结算价';
- /// </summary>
- public string DeliveryPriceCalcMethodDisplay
- {
- get
- {
- return DeliveryPriceCalcMethod.Discription();
- }
- }
- }
- }
|