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;