123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
-
- namespace Edge.Core.Domain.FccOrderInfo.Output
- {
- /// <summary>
- /// fcc 订单页分页查询结果对象
- /// </summary>
- public class OrderInfoOutput
- {
- /// <summary>
- /// 总数
- /// </summary>
- public int Total { get; set; }
- /// <summary>
- /// 订单
- /// </summary>
- public List<OrderInfo> List { get; set; }
-
- }
- /// <summary>
- /// fcc 订单页数据对象
- /// </summary>
- public class OrderInfo
- {
- public OrderInfo(FccOrderInfo fccOrderInfo,string stationName,string machineName)
- {
- this.StationName = stationName;
- this.MachineName = machineName;
- this.Id = fccOrderInfo.Id;
- this.Ttc = fccOrderInfo.Ttc;
- this.AuthorizationTime = fccOrderInfo.AuthorizationTime;
- this.EndTime = fccOrderInfo.EndTime;
- this.PaymentTime = fccOrderInfo.PaymentTime;
- this.NozzleNum = fccOrderInfo.NozzleNum;
- this.OilName = fccOrderInfo.OilName;
- this.PaymentStatus = fccOrderInfo.PaymentStatus;
- this.PayType = fccOrderInfo.PayType;
- this.CloundOrderId = fccOrderInfo.CloundOrderId;
- this.Amount = fccOrderInfo.Amount;
- this.Volume = fccOrderInfo.Volume;
- this.AmountPayable = fccOrderInfo.AmountPayable;
- this.Price = fccOrderInfo.Price;
- this.RefundAmount = fccOrderInfo.RefundAmount;
- this.UserName = fccOrderInfo.UserName;
- this.PhoneNumber = fccOrderInfo.PhoneNumber;
- this.PaymentName = fccOrderInfo.PaymentName;
- this.AuthorizationStatus = fccOrderInfo.AuthorizationStatus;
- this.RefundStatus = fccOrderInfo.RefundStatus;
- this.VolumePayable = fccOrderInfo.VolumePayable;
- }
- /// <summary>
- /// 油站名
- /// </summary>
- public string StationName { get; set; }
- /// <summary>
- /// 油机号
- /// </summary>
- public string MachineName { get; set; }
- /// <summary>
- /// 订单id
- /// </summary>
- public long Id { get; set; }
- /// <summary>
- /// 流水号
- /// </summary>
- public int Ttc { get; set; }
- /// <summary>
- /// 授权时间
- /// </summary>
- public DateTime AuthorizationTime { get; set; }
- /// <summary>
- /// 挂枪时间
- /// </summary>
- public DateTime? EndTime { get; set; }
- /// <summary>
- /// 交易时间
- /// </summary>
- public DateTime? PaymentTime { get; set; }
- /// <summary>
- /// 枪号
- /// </summary>
- public int NozzleNum { get; set; }
- /// <summary>
- /// 油品名
- /// </summary>
- public String OilName { get; set; }
- /// <summary>
- /// 支付状态
- /// </summary>
- public int PaymentStatus { get; set; }
- /// <summary>
- /// 支付类型
- /// </summary>
- public int? PayType { get; set; }
- /// <summary>
- /// 云端id
- /// </summary>
- public long? CloundOrderId { get; set; }
- /// <summary>
- /// 实际加油金额
- /// </summary>
- public decimal Amount { get; set; }
- /// <summary>
- /// 实际加油升数
- /// </summary>
- public decimal Volume { get; set; }
- /// <summary>
- /// 实际支付金额
- /// </summary>
- public decimal? AmountPayable { get; set; }
- /// <summary>
- /// 单价
- /// </summary>
- public decimal Price { get; set; }
- /// <summary>
- /// 退款金额
- /// </summary>
- public decimal? RefundAmount { get; set; }
- /// <summary>
- /// 用户名
- /// </summary>
- public string UserName { get; set; }
- /// <summary>
- /// 手机号
- /// </summary>
- public string PhoneNumber { get; set; }
- /// <summary>
- /// 支付类型名称
- /// </summary>
- public string PaymentName { get; set; }
- /// <summary>
- /// 授权状态
- /// </summary>
- public int AuthorizationStatus { get; set; }
- /// <summary>
- /// 退款状态
- /// </summary>
- public int RefundStatus { get; set; }
- /// <summary>
- /// 预定升数
- /// </summary>
- public decimal? VolumePayable { get; set; }
- /// <summary>
- /// 获取支付状态
- /// </summary>
- private Dictionary<int,string> paystatusValue = new Dictionary<int, string>() { {0,"未支付"}, { 1, "已支付" }, { 2, "订单正在支付中" }, { 3, "订单通过卡支付" }, { 4, "订单已完成" }, { 5, "已取消" } };
- public string GetPaystatus()
- {
- return paystatusValue[PaymentStatus];
- }
- /// <summary>
- /// 获取授权状态
- /// </summary>
- private Dictionary<int, string> authorizationValue = new Dictionary<int, string>() { { 0, "未授权" }, { 1, "授权" }, { 2, "等待授权" }, { 3, "加油中" }, { 4, "已完成" } };
- public string GetAuthorizationStatus()
- {
- return authorizationValue[AuthorizationStatus];
- }
- public FccOrderInfo ToComponent()
- {
- return new FccOrderInfo
- {
- Ttc = this.Ttc,
- AuthorizationTime = this.AuthorizationTime,
- EndTime = this.EndTime,
- PaymentTime = this.PaymentTime,
- NozzleNum = this.NozzleNum,
- OilName = this.OilName,
- PaymentStatus = this.PaymentStatus,
- PayType = this.PayType,
- CloundOrderId = this.CloundOrderId,
- Amount = this.Amount,
- Volume = this.Volume,
- AmountPayable = this.AmountPayable,
- Price = this.Price,
- RefundAmount = this.RefundAmount,
- UserName = this.UserName,
- PhoneNumber = this.PhoneNumber,
- PaymentName = this.PaymentName
- };
- }
- }
- }
|