结算报告获取平仓名义本金统一
This commit is contained in:
@@ -465,5 +465,11 @@ namespace YLErp.Plugins.TradeDocGenerator.Abstracts
|
||||
/// <param name="tradeId"></param>
|
||||
/// <returns></returns>
|
||||
List<SwapFlowDeal> GetSwapFlowDeals(int tradeId);
|
||||
/// <summary>
|
||||
/// 根据事件id 获取事件数据
|
||||
/// </summary>
|
||||
/// <param name="eventId"></param>
|
||||
/// <returns></returns>
|
||||
swap_event GetEvent(long eventId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,16 @@ namespace YLErp.Plugins.ShanXi.DocumentGenerator
|
||||
decimal interestRate = unwindFlowEvents.Where(x => ConsTrade.InterestModels.Contains(x.InterestMode)).Sum(s => s.InterestRate);
|
||||
row.InterestRate = interestRate.ToString("0.00%");
|
||||
var PosiNotionalValue = flowEventGroup.Quantity * flowEventGroup.ContractSize* posi.PosiGrossPrice;
|
||||
if (flowEventGroup.EventId.HasValue)
|
||||
{
|
||||
var swapEvent = Context.GetEvent(flowEventGroup.EventId.Value);
|
||||
if (swapEvent!=null)
|
||||
{
|
||||
swapEvent.unwindData=JsonHelper.Deserialize<UnwindData>(swapEvent.EventData);
|
||||
PosiNotionalValue = swapEvent.unwindData.CloseNotionalValue;
|
||||
}
|
||||
}
|
||||
|
||||
row.Quantity= flowEventGroup.Quantity.ToString("0.00");
|
||||
row.PosiNotionalValue = PosiNotionalValue.ToString("0.00");
|
||||
row.PosiNetPrice = (posi.PosiGrossPrice * 100).ToString("0.00000000");
|
||||
|
||||
@@ -2847,5 +2847,10 @@ namespace YLErp.Modules.TradeModule.DocGenerateModule
|
||||
{
|
||||
return DbContext.swap_flow_deal.Where(x => x.SwapTradeId == tradeId).AsNoTracking().ToList();
|
||||
}
|
||||
|
||||
public swap_event GetEvent(long eventId)
|
||||
{
|
||||
return DbContext.swap_event.FirstOrDefault(x => x.id == eventId);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user