From 5f5f79b63e095e915aa60b6076b0d4ab89b76b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8D=E9=94=90?= <1565842059@qq.com> Date: Tue, 25 Aug 2026 17:50:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(document):=20=E4=BF=AE=E5=A4=8D=E5=8F=82?= =?UTF-8?q?=E8=80=83=E6=A0=87=E7=9A=84=E8=AF=81=E5=88=B8=E5=85=A8=E7=A7=B0?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 直接使用 underlying.UnderlyingName 属性 - 添加空值检查避免异常 - 保持原有逻辑结构不变 --- .../DocumentGenerator/TradeConfirmationGenerator.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeConfirmationGenerator.cs b/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeConfirmationGenerator.cs index 9335d06f..872e9fb5 100644 --- a/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeConfirmationGenerator.cs +++ b/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeConfirmationGenerator.cs @@ -563,7 +563,8 @@ namespace YLErp.Plugins.GuoLian.DocumentGenerator // 参考标的证券全称和参考标的名义份额(复用上方已声明的bond) dic["参考标的证券全称"] = underlying != null - ? (JsonHelper.Deserialize(underlying.ExJson)?.UnderlyingFullName ?? underlying.UnderlyingName) + // ? (JsonHelper.Deserialize(underlying.ExJson)?.UnderlyingFullName ?? underlying.UnderlyingName) + ? (underlying.UnderlyingName ?? "") : ""; dic["参考标的名义份额"] = swapPosition != null ? ((double)swapPosition.PosiQuantity).ToString("0.##")