fix(swap): EQD-6977 closeList 排除罚息事件
GetUnwindInterests 的 closeList 查询加 IsPenaltyInterest!=1 过滤,使已落库罚息事件不进去重基数,避免当日二次部分平仓时正常利息被错误抵扣。DDL(stage1 Ver-5.7.0)须随发布。
This commit is contained in:
@@ -475,10 +475,11 @@ namespace YLErp.Modules.SwapModule
|
||||
var stockEqvNotional = realPostitions.Where(x => x.PosiDirection > 0).Sum(s => s.PosiNotionalValue); // 当前平仓前的实时剩余本金
|
||||
var posiNotionalValue = stockEqvNotional * closePercent;// 本次平仓名义本金
|
||||
var orginPv = ResolveUnwindPreviousNotional(lastEod, lastEodPositions, stockEqvNotional); // 上一日终的浮动端本金
|
||||
var closeList = DbContext.swap_flow_event.Where(x => x.SwapTradeId == tradeId
|
||||
&& x.UnwindDate == unwindDate
|
||||
&& eventTypes.Contains(x.EventType)
|
||||
&& x.DataState == (int)SwapFlowDateStateEnum.完成).ToList();
|
||||
var closeList = DbContext.swap_flow_event.Where(x => x.SwapTradeId == tradeId
|
||||
&& x.UnwindDate == unwindDate
|
||||
&& eventTypes.Contains(x.EventType)
|
||||
&& x.DataState == (int)SwapFlowDateStateEnum.完成
|
||||
&& x.IsPenaltyInterest != 1).ToList();
|
||||
bool tdClose = closeList.Count > 0;
|
||||
// 显式入口:平仓前剩余本金 + 实际平掉额 + B语义比例,盘中重放(语义见 InterestCalcRequest.IntradayUnwind)
|
||||
interests = GetIntradayUnwindInterests(InterestCalcRequest.IntradayUnwind(
|
||||
|
||||
Reference in New Issue
Block a user