You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
2.5 KiB
C#

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace POSV.OtherWaiMai
{
[Serializable]
[JsonObject(MemberSerialization.OptIn)]
public class WeiXinOrderItemMake
{
/// <summary>
/// 订单明细ID
/// </summary>
[JsonProperty(PropertyName = "orderItemId")]
public string OrderItemId { get; set; }
/// <summary>
/// 做法ID
/// </summary>
[JsonProperty(PropertyName = "makeId")]
public string MakeId { get; set; }
/// <summary>
/// 商品ID
/// </summary>
[JsonProperty(PropertyName = "makeName")]
public string MakeName { get; set; }
/// <summary>
/// 商品名称
/// </summary>
[JsonProperty(PropertyName = "addPrice")]
public decimal AddPrice { get; set; }
/// <summary>
/// 做法折后加价
/// </summary>
[JsonProperty(PropertyName = "discountPrice")]
public decimal DiscountPrice { get; set; }
/// <summary>
/// 做法数量
/// </summary>
[JsonProperty(PropertyName = "count")]
public decimal Count { get; set; }
/// <summary>
/// 做法退数量
/// </summary>
[JsonProperty(PropertyName = "rcount")]
public decimal Rcount { get; set; }
/// <summary>
/// 加价总额
/// </summary>
[JsonProperty(PropertyName = "addTotal")]
public decimal AddTotal { get; set; }
/// <summary>
/// 折后总额
/// </summary>
[JsonProperty(PropertyName = "discountAddTotal")]
public decimal DiscountAddTotal { get; set; }
/// <summary>
/// 折扣率
/// </summary>
[JsonProperty(PropertyName = "discount")]
public decimal Discount { get; set; }
/// <summary>
/// 是否管理数量(0-否;1-是;)
/// </summary>
[JsonProperty(PropertyName = "mngNu")]
public int MngNu { get; set; }
public override string ToString()
{
if (this.AddTotal > 0)
{
if (this.Count > 1)
{
return string.Format("{0}*{1}{2}*{3}", this.MakeName, Constant.CNY, this.AddPrice, this.Count);
}
return string.Format("{0}*{1}{2}", this.MakeName, Constant.CNY, this.AddPrice);
}
return string.Format("{0}", this.MakeName);
}
}
}