From 3ea315ad8827148db4266b21e459e355bb2b5262 Mon Sep 17 00:00:00 2001 From: wyf Date: Wed, 11 Jun 2025 07:47:30 +0000 Subject: [PATCH] SVN r713 SVN-Revision: r713 --- 插件库/Lskj.PubBomImport/FrmProgress.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/插件库/Lskj.PubBomImport/FrmProgress.cs b/插件库/Lskj.PubBomImport/FrmProgress.cs index 7f020a8..3b4b4c7 100644 --- a/插件库/Lskj.PubBomImport/FrmProgress.cs +++ b/插件库/Lskj.PubBomImport/FrmProgress.cs @@ -1503,7 +1503,8 @@ namespace Lskj.PubBomImport { int.TryParse(parentRow["套数"] + "", out int tamount); string childCode = parentRow["图号"] + ""; - insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{topProductId}','{sourceCode }','{childCode}','{ERPInfo.Instance.UserName}','变更');"); + string unionTzName = parentRow.Table.Columns.Contains("关联装配图") ? (parentRow["关联装配图"] + "").Trim() : ""; + insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus,UnionTZName) values ('{topProductId}','{sourceCode }','{childCode}','{ERPInfo.Instance.UserName}','变更','{unionTzName}');"); if (childCode.StartsWith("QD") || childCode.StartsWith("ZZQD")) { string tempFileName = childFileDic.ContainsKey(childCode) ? childFileDic[childCode] : ""; @@ -1823,12 +1824,13 @@ namespace Lskj.PubBomImport { int.TryParse(parentRow["套数"] + "", out int tamount); string code = (parentRow["图号"] + "").Trim(); + string unionTzName = parentRow.Table.Columns.Contains("关联装配图") ? (parentRow["关联装配图"] + "").Trim() : ""; int codeCount = mxCodeRows.Where(n => (n["图号"] + "").Trim().StartsWith(code)).Count(); if (codeCount > 1)//只允许存在一个 { throw new Exception($"MX中的{code}重复,请修改"); } - insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{productId}','{mxsourceCode }','{code}','{ERPInfo.Instance.UserName}','新增');"); + insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus,UnionTZName) values ('{productId}','{mxsourceCode }','{code}','{ERPInfo.Instance.UserName}','新增','{unionTzName}');"); DataTable filetable = BaseImpl.GetDataTableResult($"select sname,fileId,webpath from p_fm_filetab where parentid in (select dirid from P_fm_DirectoryTab where pid = '{code}' and dllcoid = '1000202') and speciesno = '010106' and sname like '{code}%'"); fileTableDic[code] = filetable; int childMaxBc = -1; @@ -2631,12 +2633,13 @@ namespace Lskj.PubBomImport { int.TryParse(parentRow["套数"] + "", out int tamount); string code = (parentRow["图号"] + "").Trim(); + string unionTzName = parentRow.Table.Columns.Contains("关联装配图") ? (parentRow["关联装配图"] + "").Trim() : ""; int codeCount = mxCodeRows.Where(n => (n["图号"] + "").Trim().StartsWith(code)).Count(); if (codeCount > 1)//只允许存在一个 { throw new Exception($"MX中的{code}重复,请修改"); } - insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{productId}','{mxsourceCode }','{code}','{ERPInfo.Instance.UserName}','新增');"); + insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus,UnionTZName) values ('{productId}','{mxsourceCode }','{code}','{ERPInfo.Instance.UserName}','新增','{unionTzName}');"); DataTable filetable = BaseImpl.GetDataTableResult($"select sname,fileId,webpath from p_fm_filetab where parentid in (select dirid from P_fm_DirectoryTab where pid = '{code}' and dllcoid = '1000202') and speciesno = '010106' and sname like '{code}%'"); fileTableDic[code] = filetable; int childMaxBc = -1;