using BaseOUDAL;
namespace YLErp.Model
{
public class HedgingMonitor
{
///
/// 挂钩标的
///
public string UnderlyingCode { get; set; }
///
/// 交易代码
///
public string TradeCode { get; set; }
///
/// 交易类型
///
public string TradeType { get; set; }
///
/// 持仓数量
///
public double PositionNotional { get; set; }
///
/// 最新价格
///
public double? Price { get; set; }
///
/// 持仓市值
///
public double Pv { get; set; }
///
/// 今日成交总额(净值)
///
public double TradePrice { get; set; }
///
/// 今日成交总额(买入)
///
public double BuyTradePrice { get; set; }
///
/// 今日成交总额(卖出)
///
public double SellTradePrice { get; set; }
///
/// 今日市场成交总额
///
public double MarketTradePrice { get; set; }
///
/// 成交量占比
///
public double NotionalRate { get; set; }
///
/// 今日买入数量
///
public double BuyNotional { get; set; }
///
/// 今日买入最低价
///
public double BuyLowPrice { get; set; }
///
/// 今日买入均价
///
public double BuyAvgPrice { get; set; }
///
/// 今日卖出数量
///
public double SellNotional { get; set; }
///
/// 今日卖出最高价
///
public double SellHighPrice { get; set; }
///
/// 今日卖出最低价
///
public double SellLowPrice { get; set; }
///
/// 今日卖出均价
///
public double SellAvgPrice { get; set; }
public int CountRatio { get; set; }
}
public class HedgingMonitorReq : BaseSearchReq
{
///
/// 结算日期
///
public DateTime SettlementDate { get; set; }
///
/// 标的品种
///
public List VarietyIds { get; set; }
///
/// 标的代码
///
public List UnderlyingIds { get; set; }
}
public class SearchHedgingMonitorResult : SearchListResult
{
///
/// 汇总行
///
public HedgingMonitor userdata { get; private set; }
public void SetUserData()
{
this.userdata = new HedgingMonitor()
{
UnderlyingCode = "合计",
TradeCode = "合计",
PositionNotional = rows.Sum(O => O.PositionNotional).OtcFormatValue(OtcFormatFlag.notional),
Pv = Commons.OtcFormatHelper.GetTradePriceDouble(rows.Sum(O => O.Pv)),
TradePrice = Commons.OtcFormatHelper.GetTradePriceDouble(rows.Sum(O => O.TradePrice)),
MarketTradePrice = Commons.OtcFormatHelper.GetTradePriceDouble(rows.Sum(O => O.MarketTradePrice)),
BuyTradePrice = double.NaN,
SellTradePrice = double.NaN,
Price = double.NaN,
TradeType = "",
NotionalRate = double.NaN,
BuyNotional = rows.Sum(O => O.BuyNotional).OtcFormatValue(OtcFormatFlag.notional),
BuyLowPrice = double.NaN,
BuyAvgPrice = double.NaN,
SellNotional = rows.Sum(O => O.SellNotional).OtcFormatValue(OtcFormatFlag.notional),
SellHighPrice = double.NaN,
SellLowPrice = double.NaN,
SellAvgPrice = double.NaN
};
}
}
}