| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- 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>
- /// P+X交割商品信息
- /// </summary>
- public class RelationPAndXGoodsInfoModel
- {
- #region SQL字段
- // <select id="SearchRelationPAndXGoodsInfo" parameterType="java.util.Map"
- // resultType="HashMap">
- // SELECT
- // dr.GOODSID,
- // dr.AUTOID RelationId,
- // dr.deliverygoodsid,
- // dr.RelationMode,
- // dr.RelationGoodsId,
- // dr.Conversion,
- // dr.DELIVERYPRICEMOVE,
- // dr.goodsscale,
- // dg.deliverygoodsname,
- // dg.deliverygoodscode,
- // dg.GoodsUnitId,
- // dg.Sponsor,
- // dg.deliverygoodsstatus,
- // gs.name as goodsUnitName,
- //rg.goodsname RelationGoodsname,
- //to_char(minDate.Parametervalue, 'yyyy-MM-dd hh24:mi:ss') minDateDeliveryDate,
- //to_char(maxDate.Parametervalue, 'yyyy-MM-dd hh24:mi:ss') maxDateDeliveryDate,
- // rg.goodscode RelationGoodscode,
- //(select listagg(to_char(wr.brand),'/') within group (order by wr.brand) as GroupBrand from (select distinct wh.brand as brand,wh.deliverygoodsid from warehousereciept wh ) wr where wr.brand is not null and wr.deliverygoodsid =dr.deliverygoodsid group by wr.deliverygoodsid) BrandList,
- //(select listagg(to_char(wc.ranks),'/') within group (order by wc.ranks) as GroupRanks from (select distinct wh.rank as ranks,wh.deliverygoodsid from warehousereciept wh ) wc where wc.ranks is not null and wc.deliverygoodsid =dr.deliverygoodsid group by wc.deliverygoodsid) RankList,
- //(select listagg(to_char(wl.warehousename),'/') within group (order by wl.warehousename) as GroupWarehouse from (select distinct wa.warehousename as warehousename,wh.deliverygoodsid from warehousereciept wh left join warehouse wa on wh.warehouseid=wa.warehouseid ) wl where wl.warehousename is not null and wl.deliverygoodsid =dr.deliverygoodsid group by wl.deliverygoodsid) WarehouseList
- // from GoodsDeliveryRelation dr
- //left join goods rg on rg.goodsid= dr.RelationGoodsId
- //left join DeliveryGoods dg on dg.DeliveryGoodsId=dr.DeliveryGoodsId
- //left join goodsunit gs on gs.goodsunitid =dg.goodsunitid
- //left join DeliveryRule minDate on minDate.Deliverygoodsid=dr.goodsid and minDate.ruleid= 3001
- //left join DeliveryRule maxDate on maxDate.DeliveryGoodsId=dr.goodsid and minDate.ruleid= 3002
- // </select>
- #endregion
- /// <summary>
- /// 交易商品Id
- /// </summary>
- [PropertyDisc("GoodsId")]
- public long GoodsId { get; set; }
- /// <summary>
- /// 交割关系id
- /// </summary>
- [PropertyDisc("RelationId")]
- public long RelationId { 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("AgreeUnit")]
- //public decimal AgreeUnit { get; set; }
- /// <summary>
- /// 发起方式'1买方限定,2卖方限定,3双方自由';
- /// </summary>
- [PropertyDisc("Sponsor")]
- public eSponsorType Sponsor { get; set; }
- /// <summary>
- /// 商品单位
- /// </summary>
- [PropertyDisc("GoodsUnitId")]
- public long GoodsUnitId { get; set; }
- /// <summary>
- /// 商品单位名称
- /// </summary>
- [PropertyDisc("goodsUnitName")]
- public string goodsUnitName { get; set; }
- /// <summary>
- /// 差价升贴水
- /// </summary>
- [PropertyDisc("DeliveryPriceMove")]
- public decimal DeliveryPriceMove { get; set; }
- /// <summary>
- /// 交割商品名称
- /// </summary>
- [PropertyDisc("deliverygoodsname")]
- public string deliverygoodsname { get; set; }
- /// <summary>
- /// 交割商品代码
- /// </summary>
- [PropertyDisc("deliverygoodscode")]
- public string deliverygoodscode { get; set; }
- /// <summary>
- /// 关联交易商品-商品名称
- /// </summary>
- [PropertyDisc("RelationGoodsname")]
- public string RelationGoodsname { get; set; }
- /// <summary>
- /// 关联交易商品-商品代码
- /// </summary>
- [PropertyDisc("RelationGoodscode")]
- public string RelationGoodscode { get; set; }
- public string RelationGoodsNameCodeDisplay
- {
- get
- {
- if (RelationGoodsname != null && RelationGoodsname != "" && RelationGoodsname.Length > 8)
- {
- return RelationGoodsname.Substring(0, 8) + "..." + " " + RelationGoodscode;
- }
- else
- {
- return RelationGoodsname + " " + RelationGoodscode;
- }
-
- }
- }
- private string _WarehouseList = "-";
- /// <summary>
- /// 交割商品属性-仓库
- /// </summary>
- [PropertyDisc("WarehouseList")]
- public string WarehouseList
- {
- get { return _WarehouseList; }
- set { _WarehouseList = value; }
- }
- private string _BrandList ="-";
- /// <summary>
- /// 交割商品属性-品牌
- /// </summary>
- [PropertyDisc("BrandList")]
- public string BrandList
- {
- get { return _BrandList; }
- set { _BrandList = value; }
- }
- private string _RankList = "-";
- /// <summary>
- /// 交割商品属性-等级
- /// </summary>
- [PropertyDisc("RankList")]
- public string RankList
- {
- get { return _RankList; }
- set { _RankList = value; }
- }
- 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; }
- }
- /// <summary>
- /// 商品配比
- /// </summary>
- [PropertyDisc("goodsscale")]
- public decimal GoodsScale { get; set; }
- }
- }
|