From cdd9bd546daf58c031950fa7e219aed233629386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=94=A6=E9=BA=9F=20=E7=8E=8B?= Date: Wed, 25 Mar 2026 14:56:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=B0=E6=89=B9=E9=87=8F=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E7=9A=84=E6=9C=9F=E6=9D=83=E7=A1=AE=E8=AE=A4=E4=B9=A6=E7=94=9F?= =?UTF-8?q?=E6=88=90=E7=94=A8=E9=BB=98=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DocGenerateModule/BatchConfirmationGenerateService.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/YLErpDAL/Modules/TradeModule/DocGenerateModule/BatchConfirmationGenerateService.cs b/YLErpDAL/Modules/TradeModule/DocGenerateModule/BatchConfirmationGenerateService.cs index 38a43d8d..52df4a9d 100644 --- a/YLErpDAL/Modules/TradeModule/DocGenerateModule/BatchConfirmationGenerateService.cs +++ b/YLErpDAL/Modules/TradeModule/DocGenerateModule/BatchConfirmationGenerateService.cs @@ -90,7 +90,11 @@ namespace YLErp.Modules.TradeModule.DocGenerateModule AppManager.TryResolve(out ITradeConfirmationGenerator generatorV2); var tradeContractGroupTradeIds = tradeDic.Values.Select(x => x.trade.id).ToList(); - if (generatorV2 != null) + + // 如果包含互换交易,强制走V1默认逻辑(不走插件) + var hasSwapTrade = tradeDic.Values.Any(x => x.trade.TradeType == "收益互换"); + + if (generatorV2 != null && hasSwapTrade) { var result = GenerateSingleV2( generatorV2, @@ -109,7 +113,7 @@ namespace YLErp.Modules.TradeModule.DocGenerateModule resultList.Add(GenerateSingleV1(item.Value, docType)); } } - if (generatorV2 == null) + if (generatorV2 == null || hasSwapTrade) { DbContext.SaveChanges(); }