diff --git a/Framework/YLErp.Core/DBModels/SwapFlowEvent.cs b/Framework/YLErp.Core/DBModels/SwapFlowEvent.cs
index b635b672..7b61672f 100644
--- a/Framework/YLErp.Core/DBModels/SwapFlowEvent.cs
+++ b/Framework/YLErp.Core/DBModels/SwapFlowEvent.cs
@@ -400,5 +400,18 @@ namespace YLErp.DBModels
[NotMapped]
public decimal? InitYtm { get; set; }
+ ///
+ /// 期末标的结算收益率(EQD-6953 平仓)。普通债券类收益互换平仓时由债券计算器按
+ /// 期末标的交割全价反算(估值日=平仓日 ValueDate),允许手工覆盖。
+ /// 命名遵循《互换价格字段命名规范决策文档》时点维度:平仓/了结用 Exit(勿用 End/Close/Final)。
+ /// [NotMapped]:不落 swap_flow_event 表列;仅随 UnwindData 序列化进 swap_event.EventData JSON,
+ /// 由平仓待复核回显(GetSwapEvent)与结算确认书 Excel(TradeSettleBillGenerator) 消费。
+ /// ⚠️ 存储口径为【展示态百分数】(如 6.3721 表示 6.3721%),与同页期末交割全价(展示态)一致,
+ /// 区别于录入页 trade.InitYtm 的存储态小数(0.063721)——两者载体不同、互不干扰,勿"顺手统一"。
+ /// 精度:确认书导出固定 4 位小数不去零(ToString("0.0000"));本字段保留 4 位(四舍五入)。
+ ///
+ [NotMapped]
+ public decimal? ExitYtm { get; set; }
+
}
}
diff --git a/Framework/YLErp.Core/Models/SwapEndConfirmModel.cs b/Framework/YLErp.Core/Models/SwapEndConfirmModel.cs
index b796debe..55ddcf9e 100644
--- a/Framework/YLErp.Core/Models/SwapEndConfirmModel.cs
+++ b/Framework/YLErp.Core/Models/SwapEndConfirmModel.cs
@@ -45,5 +45,11 @@ namespace YLErp.Models
public string DividendIn { get; set; }
public string Quantity { get; set; }
+
+ ///
+ /// 期末标的结算收益率(EQD-6953)。普通债券类收益互换平仓收益率,展示态百分数,
+ /// 固定 4 位小数不去零("0.0000");非债券/历史无值时为空串。
+ ///
+ public string ExitYtm { get; set; }
}
}
diff --git a/Plugins/YLErp.Plugins.GuoLian/App_Docs/settlement_template/nodma_01.xlsx b/Plugins/YLErp.Plugins.GuoLian/App_Docs/settlement_template/nodma_01.xlsx
index 2cf6a553..0415cc61 100644
Binary files a/Plugins/YLErp.Plugins.GuoLian/App_Docs/settlement_template/nodma_01.xlsx and b/Plugins/YLErp.Plugins.GuoLian/App_Docs/settlement_template/nodma_01.xlsx differ
diff --git a/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeSettleBillGenerator.cs b/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeSettleBillGenerator.cs
index 7523323b..e78f361b 100644
--- a/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeSettleBillGenerator.cs
+++ b/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeSettleBillGenerator.cs
@@ -67,6 +67,9 @@ namespace YLErp.Plugins.GuoLian.DocumentGenerator
decimal interestRate = unwindFlowEvents.Where(x => ConsTrade.InterestModels.Contains(x.InterestMode)).Sum(s => s.InterestRate);
row.InterestRate = interestRate.ToString("0.00%");
var PosiNotionalValue = flowEventGroup.Quantity * flowEventGroup.ContractSize * posi.PosiGrossPrice;
+ // EQD-6953 期末标的结算收益率:平仓簿记时随 UnwindData 存进 swap_event.EventData,
+ // 此处从浮动腿(PositionType>0)回读。存储态=展示态百分数(6.3721),导出固定 4 位不去零。
+ decimal? exitYtm = null;
if (flowEventGroup.EventId.HasValue)
{
var swapEvent = Context.GetEvent(flowEventGroup.EventId.Value);
@@ -74,8 +77,12 @@ namespace YLErp.Plugins.GuoLian.DocumentGenerator
{
swapEvent.unwindData = JsonHelper.Deserialize(swapEvent.EventData);
PosiNotionalValue = swapEvent.unwindData.CloseNotionalValue;
+ exitYtm = swapEvent.unwindData.FlowEvents?
+ .FirstOrDefault(f => f.PositionType > 0)?
+ .ExitYtm;
}
}
+ row.ExitYtm = exitYtm?.ToString("0.0000") ?? string.Empty;
row.Quantity = flowEventGroup.Quantity.ToString("0.00");
row.PosiNotionalValue = PosiNotionalValue.ToString("0.00");