SVN r629
SVN-Revision: r629
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user