From 914689a1f034903242195d6893522cb0b5d738e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E5=86=B0=E5=86=B0?= <437394478@qq.com> Date: Thu, 27 Aug 2026 10:56:45 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E6=9F=A5=E7=9C=8B=E4=BA=A4=E6=98=93?= =?UTF-8?q?=E7=9A=84=20=E6=8F=90=E5=89=8D=E7=BB=88=E6=AD=A2=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=20=E5=A2=9E=E5=8A=A0=20=E6=9C=9F=E6=9C=AB=E6=A0=87?= =?UTF-8?q?=E7=9A=84=E7=BB=93=E7=AE=97=E6=94=B6=E7=9B=8A=E7=8E=87%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Framework/YLErp.Core/DBModels/SwapFlowEvent.cs | 5 ++--- .../DocumentGenerator/TradeSettleBillGenerator.cs | 4 ++-- YLErpWeb/Views/SwapTrade2/TradeView.cshtml | 3 +++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Framework/YLErp.Core/DBModels/SwapFlowEvent.cs b/Framework/YLErp.Core/DBModels/SwapFlowEvent.cs index 7b61672f..bff00109 100644 --- a/Framework/YLErp.Core/DBModels/SwapFlowEvent.cs +++ b/Framework/YLErp.Core/DBModels/SwapFlowEvent.cs @@ -404,13 +404,12 @@ namespace YLErp.DBModels /// 期末标的结算收益率(EQD-6953 平仓)。普通债券类收益互换平仓时由债券计算器按 /// 期末标的交割全价反算(估值日=平仓日 ValueDate),允许手工覆盖。 /// 命名遵循《互换价格字段命名规范决策文档》时点维度:平仓/了结用 Exit(勿用 End/Close/Final)。 - /// [NotMapped]:不落 swap_flow_event 表列;仅随 UnwindData 序列化进 swap_event.EventData JSON, - /// 由平仓待复核回显(GetSwapEvent)与结算确认书 Excel(TradeSettleBillGenerator) 消费。 + /// 直接保存到 swap_flow_event.ExitYtm,提前终止详情页和结算确认书均读取该次平仓浮动腿记录。 /// ⚠️ 存储口径为【展示态百分数】(如 6.3721 表示 6.3721%),与同页期末交割全价(展示态)一致, /// 区别于录入页 trade.InitYtm 的存储态小数(0.063721)——两者载体不同、互不干扰,勿"顺手统一"。 /// 精度:确认书导出固定 4 位小数不去零(ToString("0.0000"));本字段保留 4 位(四舍五入)。 /// - [NotMapped] + [Column("ExitYtm", TypeName = "decimal(18,4)")] public decimal? ExitYtm { get; set; } } diff --git a/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeSettleBillGenerator.cs b/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeSettleBillGenerator.cs index 53d448db..1521fbb4 100644 --- a/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeSettleBillGenerator.cs +++ b/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeSettleBillGenerator.cs @@ -92,8 +92,8 @@ namespace YLErp.Plugins.GuoLian.DocumentGenerator UnderlyingInstrumentType = underlying?.UnderlyingInstrumentType, CloseNotionalValue = closeNotionalValue, CurrentDayFloatingDividend = currentDayFloatingDividend, - ExitYtm = unwindData?.FlowEvents? - .FirstOrDefault(x => x.PositionType > 0)?.ExitYtm, + // 与提前终止详情页保持同一来源:读取 swap_flow_event 中的平仓浮动腿记录。 + ExitYtm = flowEventGroup.ExitYtm, IncludePeriodPaymentInNetting = (tradeExtend?.ExtendObj?.DividendPayDate ?? 1) == 0 }); table.Add(row); diff --git a/YLErpWeb/Views/SwapTrade2/TradeView.cshtml b/YLErpWeb/Views/SwapTrade2/TradeView.cshtml index 137a958c..365044b2 100644 --- a/YLErpWeb/Views/SwapTrade2/TradeView.cshtml +++ b/YLErpWeb/Views/SwapTrade2/TradeView.cshtml @@ -850,6 +850,7 @@ {