From e92ee46c4cb0da60c497925d9cbe46354de0ac00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=94=A6=E9=BA=9F=20=E7=8E=8B?= Date: Thu, 14 May 2026 17:22:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8D=8F=E8=AE=AE=E7=BC=96?= =?UTF-8?q?=E5=8F=B7=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91=E5=8F=8A=E5=88=A9?= =?UTF-8?q?=E7=8E=87=E5=AD=97=E6=AE=B5=E5=B1=95=E7=A4=BA=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TradeConfirmationGenerator.cs | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeConfirmationGenerator.cs b/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeConfirmationGenerator.cs index 4972eba5..5edf5907 100644 --- a/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeConfirmationGenerator.cs +++ b/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeConfirmationGenerator.cs @@ -187,7 +187,21 @@ namespace YLErp.Plugins.GuoLian.DocumentGenerator ? client.Name : $"{client.Manager}作为管理人代表{client.Name}"; - dic["主协议编号"] = client.MainProtocolCode ?? ""; + // 主协议编号:优先取 client 表字段,为空时从 client_meta 表兜底 + var mainProtocolCode = client.MainProtocolCode; + if (string.IsNullOrWhiteSpace(mainProtocolCode)) + { + mainProtocolCode = Context.GetClientMeta(client.id, ConsTradeMetaKey.MainProtocolCode)?.MetaValue; + } + dic["主协议编号"] = mainProtocolCode ?? ""; + + // 补充协议编号:优先取 client 表字段,为空时从 client_meta 表兜底 + var supProtocolCode = client.SupProtocolCode; + if (string.IsNullOrWhiteSpace(supProtocolCode)) + { + supProtocolCode = Context.GetClientMeta(client.id, ConsTradeMetaKey.SupProtocolCode)?.MetaValue; + } + dic["补充协议编号"] = supProtocolCode ?? ""; dic["名义本金"] = trade.OriginalStockEqvNotional?.ToString("N2") ?? "0.00"; // 银行账户信息 @@ -208,7 +222,7 @@ namespace YLErp.Plugins.GuoLian.DocumentGenerator var bond = JsonHelper.Deserialize(underlying.ExJson) ?? new UnderlyingBond(); dic["参考标的发行人"] = bond.UnderlyingIssuer ?? ""; dic["参考标的担保人"] = ""; - dic["票面利率"] = (bond.CouponRate ?? 0).ToString("N4"); + dic["票面利率"] = ((double)(bond.CouponRate ?? 0) * 100).ToString("N4"); dic["参考标的到期日"] = underlying.MaturityDate?.ToString("yyyy年M月d日") ?? ""; } @@ -326,7 +340,7 @@ namespace YLErp.Plugins.GuoLian.DocumentGenerator dic["利率类型"] = "浮动利率"; dic["IsFloat"] = "☑"; dic["固定利率"] = ""; - dic["利差"] = ((double)interestMargin.InterestRateDefault * 10000).ToString("N2"); + dic["利差"] = ((double)interestMargin.InterestRateDefault * 10000).ToString("N0"); dic["重置频率"] = (interestMargin.interest_rest_days ?? 0) + "天"; } }