64 lines
2.2 KiB
C#
64 lines
2.2 KiB
C#
namespace YLErp.Modules.RiskExposure
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class RiskRequestModel
|
|
{
|
|
public IEnumerable<int> TraderIds { get; set; }
|
|
|
|
public List<int> ClientIds { get; set; } = new List<int>();
|
|
|
|
public List<int> BookIds { get; set; } = new List<int>();
|
|
|
|
public List<int> AssetIdGroupList { get; set; } = new List<int>();
|
|
|
|
public IEnumerable<string> TradeTypes { get; set; }
|
|
|
|
public IEnumerable<int> VarietyIds { get; set; }
|
|
|
|
public IEnumerable<int> UnderlyingIds { get; set; }
|
|
|
|
public DateTime? ValueDateStart { get; set; }
|
|
|
|
/// <summary>
|
|
/// 结算日期
|
|
/// </summary>
|
|
public DateTime ValueDateEnd { get; set; }
|
|
|
|
/// <summary>
|
|
/// 数据源价格类型
|
|
/// </summary>
|
|
public string EodSettlePriceMode { get; set; }
|
|
/// <summary>
|
|
/// 定价环境(分红率) 业务、采集--国元特有
|
|
/// </summary>
|
|
public string DividendRateType { get; set; }
|
|
/// <summary>
|
|
/// 规范化数据(所有集合设置为非null),返回自己
|
|
/// </summary>
|
|
public RiskRequestModel Normalize()
|
|
{
|
|
TraderIds = TraderIds == null ? Enumerable.Empty<int>() : TraderIds.Where(n => n > 0).ToArray();
|
|
ClientIds = ClientIds == null ? new List<int>() : ClientIds.Where(n => n > 0).ToList();
|
|
BookIds = BookIds == null ? new List<int>() : BookIds.ToList();
|
|
TradeTypes = TradeTypes == null ? Enumerable.Empty<string>() : TradeTypes.Where(n => !string.IsNullOrEmpty(n)).ToArray();
|
|
VarietyIds = VarietyIds == null ? Enumerable.Empty<int>() : VarietyIds.Where(n => n > 0).ToArray();
|
|
UnderlyingIds = UnderlyingIds == null ? Enumerable.Empty<int>() : UnderlyingIds.Where(n => n > 0).ToArray();
|
|
EodSettlePriceMode = EodSettlePriceMode == null ? "收盘价" : EodSettlePriceMode;
|
|
return this;
|
|
}
|
|
|
|
public List<int> UserAssets { get; set; }
|
|
|
|
public List<int> UserClients { get; set; }
|
|
|
|
public List<int> CurUserTradeIds { get; set; }
|
|
|
|
/// <summary>
|
|
/// 标签值
|
|
/// </summary>
|
|
public List<int> TagIds { get; set; }
|
|
}
|
|
}
|