using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//----------------------------------------------------------------
//Module Name: $safeprojectname$
//Purpose:
//CopyRight: Muchinfo
//History:
//----------------------------------------------------------------
//DateTime 2017/1/12 23:10:03
//Author
//Description Create
//----------------------------------------------------------------
using Muchinfo.MTPClient.Data.Enums;
using Muchinfo.MTPClient.Data.Helper;
namespace Muchinfo.MTPClient.Data.Model
{
public class DepositApplyModel
{
//入库单id StoreInId ,
//入库单号 StoreInCode ,
//入库仓库 WareHouseId ,
//总手续费 TotalCharge ,
//审核状态 AuditStatus ,
//申请时间 RequestTime ,
//申请人Id RequestorId ,
//备注 Remark ,
//入库明细Id StoreInDetailId ,
//交割商品ID DeliveryGoodsId ,
// DeliveryGoodsName,
// DeliveryGoodsCode,
//单位 GoodsUnitId ,
//申请数 Qty ,
//GoodsUnitName,
//入库估价 StoreInPrice,
//入库数 StoreInQty,
//手续费 StoreInCharge ,
//状态 Status ,
// t.listingrate,
//t.DEPOSITREFERPRICE,
///
/// 入库单id
///
[PropertyDisc("StoreInId")]
public long StoreInId { get; set; }
///
/// 入库单号
///
[PropertyDisc("StoreInCode")]
public string StoreInCode { get; set; }
///
/// 入库仓库id
///
[PropertyDisc("WareHouseId")]
public int WareHouseId { get; set; }
///
/// //入库仓库
///
[PropertyDisc("WareHouseName")]
public string WareHouseName { get; set; }
///
/// 审核状态
///
[PropertyDisc("AuditStatus")]
public eAuditStatus AuditStatus { get; set; }
///
/// 申请时间
///
[PropertyDisc("RequestTime")]
public string RequestTime { get; set; }
///
/// 备注
///
[PropertyDisc("Remark")]
public string Remark { get; set; }
///
/// 冻结手续费
///
public decimal FreezeCharge
{
get
{
return Math.Round(ListingRate * DepositReferPrice * Qty, 2, MidpointRounding.AwayFromZero);
}
}
///
/// 交割商品
///
[PropertyDisc("DeliveryGoodsName")]
public string DeliveryGoodsName { get; set; }
///
/// 交割商品代码
///
[PropertyDisc("DeliveryGoodsCode")]
public string DeliveryGoodsCode { get; set; }
///
/// /申请数
///
[PropertyDisc("Qty")]
public decimal Qty { get; set; }
///
/// 单位
///
[PropertyDisc("GoodsUnitName")]
public string GoodsUnitName { get; set; }
///
/// 入库估价
///
[PropertyDisc("StoreInPrice")]
public decimal StoreInPrice { get; set; }
///
/// 入库数量
///
[PropertyDisc("StoreInQty")]
public decimal StoreInQty { get; set; }
///
/// r手续费
///
//[PropertyDisc("StoreInCharge")]
public decimal StoreInCharge
{
get
{
return Math.Round(ListingRate*DepositReferPrice*StoreInQty, 2, MidpointRounding.AwayFromZero);
}
}
///
/// 挂牌费率
///
[PropertyDisc("ListingRate")]
public decimal ListingRate { get; set; }
///
/// 参考价
///
[PropertyDisc("DEPOSITREFERPRICE")]
public decimal DepositReferPrice { get; set; }
///
/// 是否可取消
///
public bool CanCancel
{
get
{
return AuditStatus == eAuditStatus.AUDITSTATUS_CHECKING;
}
}
///
/// 状态描述
///
public string DisplayAuditStatus
{
get
{
return AuditStatus.Discription();
}
}
///
/// 显示入库数量
///
public string DisplayStoreInQty
{
get
{
if (AuditStatus == eAuditStatus.AUDITSTATUS_SUCCESS)
{
return StoreInQty + string.Empty;
}
else
{
return "--";
}
}
}
///
/// 显示入库手续费
///
public string DisplayStoreInCharge
{
get
{
if (AuditStatus == eAuditStatus.AUDITSTATUS_SUCCESS)
{
return StoreInCharge + string.Empty;
}
else
{
return "--";
}
}
}
}
public class DepositWareHouse
{
[PropertyDisc("WareHouseName")]
public string WareHouseName { get; set; }
[PropertyDisc("WareHouseId")]
public long WareHouseId { get; set; }
}
}