using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace POSV.OtherWaiMai { [Serializable] [JsonObject(MemberSerialization.OptIn)] public class WeiXinOrderItems { /// /// 唯一ID /// [JsonProperty(PropertyName = "id")] public string Id { get; set; } /// /// 行号 /// [JsonProperty(PropertyName = "lineNo")] public int LineNo { get; set; } /// /// 商品ID /// [JsonProperty(PropertyName = "goodsId")] public string GoodsId { get; set; } /// /// 商品名称 /// [JsonProperty(PropertyName = "goodsName")] public string GoodsName { get; set; } /// /// 规格名称 /// [JsonProperty(PropertyName = "specName")] public string SpecName { get; set; } /// /// 分类ID /// [JsonProperty(PropertyName = "categoryId")] public string CategoryId { get; set; } /// /// 分类名称 /// [JsonProperty(PropertyName = "categoryName")] public string CategoryName { get; set; } /// /// 产品ID /// [JsonProperty(PropertyName = "productId")] public string ProductId { get; set; } /// /// 规格ID /// [JsonProperty(PropertyName = "specId")] public string SpecId { get; set; } /// /// 产品单位ID /// [JsonProperty(PropertyName = "productUnitId")] public string ProductUnitId { get; set; } /// /// 产品单位名称 /// [JsonProperty(PropertyName = "productUnitName")] public string ProductUnitName { get; set; } /// /// 数量 /// [JsonProperty(PropertyName = "count")] public decimal Count { get; set; } /// /// 退菜数量 /// [JsonProperty(PropertyName = "rcount")] public decimal Rcount { get; set; } /// /// 产品原价 /// [JsonProperty(PropertyName = "priceOrg")] public decimal PriceOrg { get; set; } /// /// 销售价格 /// [JsonProperty(PropertyName = "price")] public decimal Price { get; set; } /// /// 折后价格 /// [JsonProperty(PropertyName = "discountPrice")] public decimal DiscountPrice { get; set; } /// /// 消费金额 /// [JsonProperty(PropertyName = "amount")] public decimal Amount { get; set; } /// /// 优惠金额 /// [JsonProperty(PropertyName = "discountTotal")] public decimal DiscountTotal { get; set; } /// /// 优惠率 /// [JsonProperty(PropertyName = "discount")] public decimal Discount { get; set; } /// /// 优惠金额 /// [JsonProperty(PropertyName = "receivable")] public decimal Receivable { get; set; } /// /// 加价金额 /// [JsonProperty(PropertyName = "addPriceTotal")] public decimal AddPriceTotal { get; set; } /// /// 加价优惠金额 /// [JsonProperty(PropertyName = "discountAddTotal")] public decimal DiscountAddTotal { get; set; } /// /// 加价应收金额 /// [JsonProperty(PropertyName = "amountAddTotal")] public decimal AmountAddTotal { get; set; } /// /// 消费总额 /// [JsonProperty(PropertyName = "amountTotal")] public decimal AmountTotal { get; set; } /// /// 应收总额 /// [JsonProperty(PropertyName = "receivableTotal")] public decimal ReceivableTotal { get; set; } /// /// 是否使用会员卡(0-否;1-是;) /// [JsonProperty(PropertyName = "isMember")] public int IsMember { get; set; } /// /// 图片组名 /// [JsonProperty(PropertyName = "groupName")] public string GroupName { get; set; } /// /// 图片文件名 /// [JsonProperty(PropertyName = "picture")] public string Picture { get; set; } /// /// 访问域名 /// [JsonProperty(PropertyName = "dfsAccessDomain")] public string DfsAccessDomain { get; set; } /// /// 是否套餐1普通菜2套餐3套餐明细 /// [JsonProperty(PropertyName = "isSuit")] public int IsSuit { get; set; } /// /// 套菜ID /// [JsonProperty(PropertyName = "suitId")] public string SuitId { get; set; } /// /// 父记录ID /// [JsonProperty(PropertyName = "parentId")] public string ParentId { get; set; } /// /// 餐盒数 /// [JsonProperty(PropertyName = "boxNum")] public decimal BoxNum { get; set; } /// /// 餐盒费 /// [JsonProperty(PropertyName = "boxPrice")] public decimal BoxPrice { get; set; } /// /// 做法列表 /// [JsonProperty(PropertyName = "makes")] public List Makes { get; set; } /// /// 做法列表 /// [JsonProperty(PropertyName = "promoList")] public List PromoList { get; set; } private String _ProductName; [JsonIgnore] public string ProductName { get { this._ProductName = string.Format("{0}{1}", this.IsSuit == 3 ? "[套]" : "", this.GoodsName); return this._ProductName; } set { this._ProductName = value; } }//显示的商品名称 [JsonIgnore] public string ProductMakes { get { if (this.Makes == null || this.Makes.Count == 0) { return ""; } return string.Join(",", this.Makes.ConvertAll(m => m.ToString()).ToArray()); } } [JsonIgnore] public string ProductCount { get { return string.Format("{0}", this.Count - this.Rcount); } }//显示的数量 [JsonIgnore] public string ProductFee { get { return string.Format("{0}", this.IsSuit == 3 ? "" : ""+this.AmountTotal); } }//显示的金额 } }