From 22d4f34cbb881161c5bc82c2043260fa6ad5d19b Mon Sep 17 00:00:00 2001 From: wyf Date: Fri, 23 May 2025 01:29:01 +0000 Subject: [PATCH] SVN r629 SVN-Revision: r629 --- 插件库/Lskj.PubBomImport/FrmProgress.cs | 39 +++++++++++++------------ 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/插件库/Lskj.PubBomImport/FrmProgress.cs b/插件库/Lskj.PubBomImport/FrmProgress.cs index 917fe5f..1dd8115 100644 --- a/插件库/Lskj.PubBomImport/FrmProgress.cs +++ b/插件库/Lskj.PubBomImport/FrmProgress.cs @@ -359,11 +359,11 @@ namespace Lskj.PubBomImport SqlHelper.ExecuteNonQuery(stringBuilder.ToString()); } - StringBuilder insertbulider = new StringBuilder(); - string mxCode = BaseImpl.GetResult($"select MxFileName from FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{beforeSourceCode}';") + ""; - insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{beforeSourceCode}';"); - insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{sourceCode}';"); - insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{topProductId}','{mxCode}','{sourceCode}','{ERPInfo.Instance.UserName}','变更');"); + //StringBuilder insertbulider = new StringBuilder(); + //string mxCode = BaseImpl.GetResult($"select MxFileName from FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{beforeSourceCode}';") + ""; + //insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{beforeSourceCode}';"); + //insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{sourceCode}';"); + //insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{topProductId}','{mxCode}','{sourceCode}','{ERPInfo.Instance.UserName}','变更');"); //更新或新增并备份清单 int.TryParse(Model.FirstRowIndex, out int index); @@ -403,7 +403,7 @@ namespace Lskj.PubBomImport SetProcessBar(60, allCount); string guid = Guid.NewGuid() + ""; frmBillInfo.BillSaveSql(guid); - BaseImpl.ExecSqlValue($"update p_bomImportExecTab set afterSql = '{insertbulider.ToString().Replace("'", "''")}' where guid = '{guid}'"); + //BaseImpl.ExecSqlValue($"update p_bomImportExecTab set afterSql = '{insertbulider.ToString().Replace("'", "''")}' where guid = '{guid}'"); SetProcessBar(80, allCount); //记录guid string updateGuidSql = @"update QMS_wenjiangenggaitab set qms_wjgg_uuid = '{0}' where qms_wjgg_billdocument_Id = '{1}'"; @@ -450,11 +450,13 @@ namespace Lskj.PubBomImport { throw new Exception($"变更版本{sourceBB}已存在,请进行版次变更"); } - StringBuilder insertbulider = new StringBuilder(); - string mxCode = BaseImpl.GetResult($"select MxFileName from FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{beforeSourceCode}';") + ""; - insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{beforeSourceCode}';"); - insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{sourceCode}';"); - insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{topProductId}','{mxCode}','{sourceCode}','{ERPInfo.Instance.UserName}','变更');"); + + //StringBuilder insertbulider = new StringBuilder(); + //string mxCode = BaseImpl.GetResult($"select MxFileName from FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{beforeSourceCode}';") + ""; + //insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{beforeSourceCode}';"); + //insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{sourceCode}';"); + //insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{topProductId}','{mxCode}','{sourceCode}','{ERPInfo.Instance.UserName}','变更');"); + //更新或新增并备份清单 int.TryParse(Model.FirstRowIndex, out int index); frmMain.FirstRowIndex = index; @@ -497,7 +499,7 @@ namespace Lskj.PubBomImport SetProcessBar(60, allCount); string guid = Guid.NewGuid() + ""; frmBillInfo.BillSaveSql(guid); - BaseImpl.ExecSqlValue($"update p_bomImportExecTab set afterSql = '{insertbulider.ToString().Replace("'", "''")}' where guid = '{guid}'"); + //BaseImpl.ExecSqlValue($"update p_bomImportExecTab set afterSql = '{insertbulider.ToString().Replace("'", "''")}' where guid = '{guid}'"); SetProcessBar(80, allCount); //记录guid string updateGuidSql = @"update QMS_wenjiangenggaitab set qms_wjgg_uuid = '{0}' where qms_wjgg_billdocument_Id = '{1}'"; @@ -769,13 +771,12 @@ namespace Lskj.PubBomImport SqlHelper.ExecuteNonQuery(string.Format(updateGuidSql, guid, primaryValue)); //记录文件变更 - StringBuilder insertbulider = new StringBuilder(); - string mxCode = BaseImpl.GetResult($"select MxFileName from FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{beforeSourceCode}';") + ""; - insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{beforeSourceCode}';"); - insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{sourceCode}';"); - insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{topProductId}','{mxCode}','{sourceCode}','{ERPInfo.Instance.UserName}','变更');"); - - BaseImpl.ExecSqlValue($"update p_bomImportExecTab set afterSql = '{insertbulider.ToString().Replace("'", "''")}' where guid = '{guid}'"); + //StringBuilder insertbulider = new StringBuilder(); + //string mxCode = BaseImpl.GetResult($"select MxFileName from FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{beforeSourceCode}';") + ""; + //insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{beforeSourceCode}';"); + //insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{topProductId}' and RelatedAttachmentName = '{sourceCode}';"); + //insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{topProductId}','{mxCode}','{sourceCode}','{ERPInfo.Instance.UserName}','变更');"); + //BaseImpl.ExecSqlValue($"update p_bomImportExecTab set afterSql = '{insertbulider.ToString().Replace("'", "''")}' where guid = '{guid}'"); } } this.DialogResult = DialogResult.OK;