From c4379d4b907224633705e59ce534c6dc80bb9466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8D=E9=94=90?= <1565842059@qq.com> Date: Thu, 23 Jul 2026 17:49:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(swap):=20=E4=BF=AE=E6=AD=A3=E6=97=A5?= =?UTF-8?q?=E7=BB=88=E4=BF=9D=E8=AF=81=E9=87=91=E6=9C=AC=E9=87=91=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除保证金本金的1/10缩放处理,改为直接使用实际本金数值 - 修正了保证金本金计算中的除以10逻辑,确保显示正确的本金金额 - 保持利息计算使用原始本金累积值,避免破坏保证金利息金额准确性 - 更新注释说明,明确当前风险页按日终保证金 --- YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs b/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs index 59aa0707..6975a5ee 100644 --- a/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs @@ -2327,24 +2327,23 @@ namespace YLErp.Modules.SwapModule item.PeriodPaymentValuation = item.FloatingUnrealizedPnl + item.position.InterestPnL; } // eod_swap 的保证金本金来自 trade_span;缺少 span 数据时会被保存为 0。 - // 本风险页改按日终保证金腿展示,且该页面保证金本金采用原始本金的 1/10 口径。 - // 利息仍使用原始本金累积值,不能同步缩放,否则会破坏保证金利息金额。 + // 本风险页改按日终保证金腿的实际本金展示。 item.position.InitMarginGain = marginLegs .Where(x => x.InterestMode == (int)InterestModeEnum.初始预付金 && x.InterestDirection == (int)SwapDirectionEnum.收取) - .Sum(x => Math.Abs(x.InterestPrincipalFix)) / 10m; + .Sum(x => Math.Abs(x.InterestPrincipalFix)); item.position.InitMarginLoss = marginLegs .Where(x => x.InterestMode == (int)InterestModeEnum.初始预付金 && x.InterestDirection == (int)SwapDirectionEnum.支付) - .Sum(x => Math.Abs(x.InterestPrincipalFix)) / 10m; + .Sum(x => Math.Abs(x.InterestPrincipalFix)); item.position.PostionMarginGain = marginLegs .Where(x => x.InterestMode == (int)InterestModeEnum.追加预付金 && x.InterestDirection == (int)SwapDirectionEnum.收取) - .Sum(x => Math.Abs(x.InterestPrincipalFix)) / 10m; + .Sum(x => Math.Abs(x.InterestPrincipalFix)); item.position.PostionMarginLoss = marginLegs .Where(x => x.InterestMode == (int)InterestModeEnum.追加预付金 && x.InterestDirection == (int)SwapDirectionEnum.支付) - .Sum(x => Math.Abs(x.InterestPrincipalFix)) / 10m; + .Sum(x => Math.Abs(x.InterestPrincipalFix)); // 保证金本金方向与我方的利息现金流方向相反:原始“收取”保证金 // 表示我方占用客户资金,应向客户支付利息;支付金额按负数展示。