From 5d0e879cf60569f0144d85dc33e2257a7f46a6f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=96=B9=E6=B5=B7?= Date: Tue, 22 Apr 2025 18:00:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E7=9B=98=E4=BA=A4=E6=98=93=E8=B4=B9?= =?UTF-8?q?=E7=94=A8=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs b/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs index f07f15f8..35559e7e 100644 --- a/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs @@ -1269,8 +1269,8 @@ namespace YLErp.Modules.SwapModule } else { - var eventTradingFee = openFlowEvents.Sum(s => s.TradingFeePending); - curretEod.PosiFeePending = eod.PosiFeePending - eventTradingFee * directionRatio; + var eventTradingFee = unwindEvents.Where(x => x.EventType == (int)SwapFlowEventTypeEnum.开仓 || x.EventType == (int)SwapFlowEventTypeEnum.平仓).Sum(s => s.TradingFeePending * (s.EventType == (int)SwapFlowEventTypeEnum.开仓 ? 1m : -1m)); + curretEod.PosiFeePending = eod.PosiFeePending + eventTradingFee; if (openFlowEvents.Count() == 0) { curretEod.PosiNetPrice = eod.PosiNetPrice;