From a1cdb2cd1914cb7fc58d2b121568225f0e4b1e75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8D=E9=94=90?= <1565842059@qq.com> Date: Fri, 7 Aug 2026 10:52:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(swap):=20=E4=BF=AE=E6=AD=A3=E5=B9=B3?= =?UTF-8?q?=E4=BB=93=E4=BA=8B=E4=BB=B6=E6=97=A5=E6=9C=9F=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将平仓事件的日期过滤从 EventDate 改为 UnwindDate - 确保正确识别结算日期后的平仓流程 - 修复平仓事件日期比较逻辑的一致性问题 --- YLErpDAL/Modules/SwapModule/SwapDealService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YLErpDAL/Modules/SwapModule/SwapDealService.cs b/YLErpDAL/Modules/SwapModule/SwapDealService.cs index 3b44d623..ae13fc52 100644 --- a/YLErpDAL/Modules/SwapModule/SwapDealService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapDealService.cs @@ -688,7 +688,7 @@ namespace YLErp.Modules.SwapModule { realPositions ??= new List(); var futureFlows = (completedFlowEvents ?? Enumerable.Empty()) - .Where(x => x.EventType == (int)SwapEventTypeEnum.平仓 && x.EventDate > settleDate) + .Where(x => x.EventType == (int)SwapEventTypeEnum.平仓 && x.UnwindDate > settleDate) .ToList(); var originalNotional = origPositions.Where(x => x.PosiDirection > 0) .Sum(x => x.PosiNotionalValue); @@ -701,7 +701,7 @@ namespace YLErp.Modules.SwapModule .GroupBy(x => x.PositionId) .ToDictionary(x => x.Key, x => x.Sum(v => v.InterestPrincipal)); var priorClosePositionIds = new HashSet((completedFlowEvents ?? Enumerable.Empty()) - .Where(x => x.EventType == (int)SwapEventTypeEnum.平仓 && x.EventDate <= settleDate) + .Where(x => x.EventType == (int)SwapEventTypeEnum.平仓 && x.UnwindDate <= settleDate) .Select(x => x.PositionId)); return origPositions.Where(x => x.PosiDirection == 0).Select(p =>