平仓总额计算规则调整

This commit is contained in:
锦麟 王
2026-06-29 15:54:07 +08:00
parent 3c5f25a5a0
commit 1e4ab52c1e
@@ -413,9 +413,9 @@ namespace YLErp.Modules.SwapModule
var ratio = x.InterestDirection == (int)SwapDirectionEnum. ? 1 : -1;
interestTotal += x.InterestClosePnL * ratio;
});
unwindData.SwapCloseAmount = interestTotal;
unwindData.SwapCloseAmount = interestTotal + unwindData.SwapMarginRebatePnl;//需要算上预付金利息,只是不要算预付金返还
unwindData.SwapDividendPnl = 0;
unwindData.SwapRealizedPnL = unwindData.SwapCloseAmount + unwindData.SwapMarginRebatePnl;
unwindData.SwapRealizedPnL = unwindData.SwapCloseAmount;
SaveAutoSwapDeal(td, autoInterests, unwindData, interval);
}
@@ -491,7 +491,7 @@ namespace YLErp.Modules.SwapModule
unwindData.PosiNotionalValue = curEodPositions.Sum(x => x.PosiNotionalValue);
unwindData.PayDate = dividendPayDate;
unwindData.SwapDividendPnl = dividendTotal;
unwindData.SwapCloseAmount = 0;
unwindData.SwapCloseAmount = dividendTotal;//需要算上分红
unwindData.SwapMarginRebatePnl = 0;
unwindData.SwapRealizedPnL = dividendTotal;