From ef878e83104ce7e84572ad542f7438f447a9d22a Mon Sep 17 00:00:00 2001 From: wyf Date: Sat, 17 May 2025 09:37:00 +0000 Subject: [PATCH] SVN r604 SVN-Revision: r604 --- 插件库/Lskj.PubBomImport/FrmProgress.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/插件库/Lskj.PubBomImport/FrmProgress.cs b/插件库/Lskj.PubBomImport/FrmProgress.cs index f47b718..84c15d4 100644 --- a/插件库/Lskj.PubBomImport/FrmProgress.cs +++ b/插件库/Lskj.PubBomImport/FrmProgress.cs @@ -622,8 +622,12 @@ namespace Lskj.PubBomImport insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{topProductId}','{sourceCode }','{childCode}','{ERPInfo.Instance.UserName}','变更');"); if (childCode.StartsWith("QD") || childCode.StartsWith("ZZQD")) { - string tempFileName = childFileDic[childCode]; - FileInfo childInfo = new FileInfo(tempFileName); + string tempFileName = childFileDic.ContainsKey(childCode) ? childFileDic[childCode] : ""; + FileInfo childInfo = null; + if (!string.IsNullOrEmpty(tempFileName)) + { + childInfo = new FileInfo(tempFileName); + } if (childInfo == null) { //throw new Exception($"MX明细中不包含文件{childCode}");