using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
//----------------------------------------------------------------
//Module Name: $safeprojectname$
//Purpose:
//CopyRight: Muchinfo
//History:
//----------------------------------------------------------------
//DateTime 2016/8/5 9:31:32
//Author
//Description Create
//----------------------------------------------------------------
using Muchinfo.MTPClient.Data.Enums;
using Muchinfo.MTPClient.Data.Helper;
using GalaSoft.MvvmLight;
using System.Windows;
namespace Muchinfo.MTPClient.Data.Model.Delivery
{
///
/// 交割申报查询
///
public class DeliveryEntrustOrder : ViewModelBase
{
///
/// 最小交割手数mtp.2.0 NEW
///
[PropertyDisc("LimitSum")]
public long LimitSum { get; set; }
///
/// 主辅商品比的主手数 mtp.2.0 NEW
///
[PropertyDisc("XLIMITCONVERSION")]
public long XlimitConversion { get; set; }
///
/// 主辅商品比的辅手数 mtp.2.0 NEW
///
[PropertyDisc("PLIMITCONVERSION")]
public long PlimitConversion { get; set; }
///
/// 交易收申请ID
///
[PropertyDisc("DeliveryOrderId")]
public long DeliveryOrderId { get; set; }
///
/// 交收商品ID
///
[PropertyDisc("DeliveryGoodsId")]
public uint DeliveryGoodsId { get; set; }
///
/// 交收商品代码
///
[PropertyDisc("DeliveryGoodsCode")]
public string DeliveryGoodsCode { get; set; }
///
/// 交收商品名称
///
[PropertyDisc("DeliveryGoodsName")]
public string DeliveryGoodsName { get; set; }
///
/// 交收商品数量
///
[PropertyDisc("DeliveryQty")]
public decimal DeliveryQty { get; set; }
///
/// 交割关系-兑换系数
///
[PropertyDisc("Conversion")]
public decimal Conversion { get; set; }
///
/// 冻结保证金
///
[PropertyDisc("FreezeMargin")]
public decimal FreezeMargin { get; set; }
///
/// 主商品交易货款/冻结货款
///
[PropertyDisc("OrderAmount")]
public decimal OrderAmount { get; set; }
public string OrderAmountDisplay
{
get
{
if (OrderAmount != decimal.Zero)
{
return OrderAmount.ToString("f2");
}
else
{
return "-";
}
}
}
///
/// 申报状态
///
[PropertyDisc("DeliveryOrderStatus")]
public eDeliveryOrderStatus OrderStatus { get; set; }
private eOrderFromType _orderFrom = eOrderFromType.Ative;
///
/// 申报来源:0 客户端,1 管理端
///
[PropertyDisc("OrderFrom")]
public eOrderFromType OrderFrom
{
get { return _orderFrom; }
set { _orderFrom = value; }
}
///
/// 申报时间
///
[PropertyDisc("OrderTime")]
public DateTime OrderTime { get; set; }
///
/// 申报时间-转换FORMAT
///
public string OrderTimeDisplay
{
get
{
return OrderTime == DateTime.MinValue ? "-" : OrderTime.ToString("yyyy-MM-dd HH:mm:ss");
}
}
///
/// 账号
///
[PropertyDisc("accountid")]
public ulong accountid { get; set; }
///
/// 申报人
///
[PropertyDisc("OperatorId")]
public ulong OperatorId { get; set; }
///
/// 审核时间
///
[PropertyDisc("AuditTime")]
public DateTime AuditTime { get; set; }
///
/// 账号
///
[PropertyDisc("accountname")]
public string Accountname { get; set; }
///
/// 申报备注
///
[PropertyDisc("AuditRemark")]
public string AuditRemark { get; set; }
///
/// 商品ID
///
[PropertyDisc("XGoodsId")]
public long XGoodsId { get; set; }
///
/// 交易商代碼
///
[PropertyDisc("XGoodsCode")]
public string XGoodsCode { get; set; }
///
/// 交易商品名称
///
[PropertyDisc("XGoodsName")]
public string XGoodsName { get; set; }
///
/// 交易商品-结算价
///
[PropertyDisc("XDeliveryPrice")]
public decimal XDeliveryPrice { get; set; }
public string XDeliveryPriceDisplay
{
get
{
if (XDeliveryPrice != decimal.Zero && XDeliveryPrice != 0)
{
return XDeliveryPrice.ToString("f2");
}
else
{
return "-";
}
}
}
///
/// 交易商品-数量
///
[PropertyDisc("XDeliveryQty")]
public decimal XDeliveryQty { get; set; }
///
/// 关联交易商品ID
///
[PropertyDisc("PGoodsID")]
public long PGoodsID { get; set; }
///
/// 关联交易商品1名称
///
[PropertyDisc("PGoodsName")]
public string PGoodsName { get; set; }
///
///关联交易2 商品代码
///
[PropertyDisc("PGoodsCode")]
public string PGoodsCode { get; set; }
///
/// 关联交易商品数量
///
[PropertyDisc("PDeliveryQty")]
public decimal PDeliveryQty { get; set; }
///
/// 关联交易商品价格
///
[PropertyDisc("PDeliveryPrice")]
public decimal PDeliveryPrice { get; set; }
///
/// 关联交易商品价格- 字符显示=》结算价
///
public string PDeliveryPriceDisplay
{
get
{
if (PDeliveryPrice != decimal.Zero && PDeliveryPrice != 0)
{
return PDeliveryPrice.ToString("f2");
}
else
{
return "-";
}
}
}
[PropertyDisc("PPriceMode")]
public int PPriceMode { get; set; }
///
/// 关联交易商品ID2
///
[PropertyDisc("P2GoodsID")]
public long P2GoodsID { get; set; }
///
/// 关联交易商品名称2
///
[PropertyDisc("P2GoodsName")]
public string P2GoodsName { get; set; }
///
///关联交易 商品代码
///
[PropertyDisc("P2GoodsCode")]
public string P2GoodsCode { get; set; }
///
/// 关联交易商品数量2
///
[PropertyDisc("P2DeliveryQty")]
public decimal P2DeliveryQty { get; set; }
///
/// 关联交易商品价格
///
[PropertyDisc("P2DeliveryPrice")]
public decimal P2DeliveryPrice { get; set; }
///
/// 关联交易商品价格- 字符显示=》结算价
///
public string P2DeliveryPriceDisplay
{
get
{
if (P2DeliveryPrice != decimal.Zero && P2DeliveryPrice != 0)
{
return P2DeliveryPrice.ToString("f2");
}
else
{
return "-";
}
}
}
[PropertyDisc("P2PriceMode")]
public int P2PriceMode { get; set; }
#region 是否隐藏- P模式
private Visibility _isVisibility_RelationMode = Visibility.Visible;
///
/// 是否隐藏- P模式
///
public Visibility IsVisibility_RelationModeP
{
get
{
return _isVisibility_RelationMode;
}
set
{
Set(() => IsVisibility_RelationModeP, ref _isVisibility_RelationMode, value);
}
}
private Visibility _isVisibility_RelationMode2 = Visibility.Visible;
///
/// 是否隐藏- P模式
///
public Visibility IsVisibility_RelationModeP2
{
get
{
return _isVisibility_RelationMode2;
}
set
{
Set(() => IsVisibility_RelationModeP2, ref _isVisibility_RelationMode2, value);
}
}
#endregion
//新加字段20160919
///
/// 资金模式
///
[PropertyDisc("moneyMode")]
public eMoneyMode moneyMode { get; set; }
///
/// 交割单状态-显示文字
///
public string OrderStatusDisplay
{
get
{
return OrderStatus.Discription();
}
}
///
/// 申报来源:0 客户端,1 管理端
///
public string OrderFromDisplay
{
get
{
return OrderFrom.Discription();
}
}
///
/// 交割数量/配对成功数量
///
public string DeliveryQtyDisplay
{
get
{
if (DeliveryQty != decimal.Zero && DeliveryQty != 0)
{
return DeliveryQty.ToString();
}
else
{
return "-";
}
}
}
///
/// 申报备注
///
public string AuditRemarkDisplay
{
get
{
if (AuditRemark != null && AuditRemark != "")
{
return AuditRemark.Replace("\n", "").Replace("\r", "");
}
else
{
return "-";
}
}
}
///
/// 商品名称转换
///
public string DeliveryGoodsNameDisplay
{
get
{
return string.Format("{0}/{1}", DeliveryGoodsCode, DeliveryGoodsName);
}
}
public string PGoodsNameDisplay
{
get
{
return string.Format("{0}/{1}", PGoodsCode, PGoodsName);
}
}
public string P2GoodsNameDisplay
{
get
{
return string.Format("{0}/{1}", P2GoodsCode, P2GoodsName);
}
}
///
/// 交易商品-合约单位
///
[PropertyDisc("currentAgreeunit")]
public decimal currentAgreeunit { get; set; }
///
/// 交易商品-商品单位
///
[PropertyDisc("currentGoodsunit")]
public decimal currentGoodsunit { get; set; }
}
}