SVN r583
SVN-Revision: r583
This commit is contained in:
@@ -588,7 +588,7 @@ namespace Lskj.PubBomImport
|
|||||||
StringBuilder insertbulider = new StringBuilder();
|
StringBuilder insertbulider = new StringBuilder();
|
||||||
string mxCode = BaseImpl.GetResult($"select MxFileName from FileAttachmentMapping where MaterialCode = '{productCode}' and RelatedAttachmentName = '{beforeSourceCode}';") + "";
|
string mxCode = BaseImpl.GetResult($"select MxFileName from FileAttachmentMapping where MaterialCode = '{productCode}' and RelatedAttachmentName = '{beforeSourceCode}';") + "";
|
||||||
insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{productCode}' and RelatedAttachmentName = '{beforeSourceCode}';");
|
insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{productCode}' and RelatedAttachmentName = '{beforeSourceCode}';");
|
||||||
insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{productCode}','{mxCode}','{sourceCode}'),'{ERPInfo.Instance.UserName}','变更';");
|
insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{productCode}','{mxCode}','{sourceCode}','{ERPInfo.Instance.UserName}','变更');");
|
||||||
|
|
||||||
//更新或新增并备份清单
|
//更新或新增并备份清单
|
||||||
int.TryParse(Model.FirstRowIndex, out int index);
|
int.TryParse(Model.FirstRowIndex, out int index);
|
||||||
@@ -658,7 +658,7 @@ namespace Lskj.PubBomImport
|
|||||||
StringBuilder insertbulider = new StringBuilder();
|
StringBuilder insertbulider = new StringBuilder();
|
||||||
string mxCode = BaseImpl.GetResult($"select MxFileName from FileAttachmentMapping where MaterialCode = '{productCode}' and RelatedAttachmentName = '{beforeSourceCode}';") + "";
|
string mxCode = BaseImpl.GetResult($"select MxFileName from FileAttachmentMapping where MaterialCode = '{productCode}' and RelatedAttachmentName = '{beforeSourceCode}';") + "";
|
||||||
insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{productCode}' and RelatedAttachmentName = '{beforeSourceCode}';");
|
insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{productCode}' and RelatedAttachmentName = '{beforeSourceCode}';");
|
||||||
insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{productCode}','{mxCode}','{sourceCode}'),'{ERPInfo.Instance.UserName}','变更';");
|
insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{productCode}','{mxCode}','{sourceCode}','{ERPInfo.Instance.UserName}','变更');");
|
||||||
//更新或新增并备份清单
|
//更新或新增并备份清单
|
||||||
int.TryParse(Model.FirstRowIndex, out int index);
|
int.TryParse(Model.FirstRowIndex, out int index);
|
||||||
frmMain.FirstRowIndex = index;
|
frmMain.FirstRowIndex = index;
|
||||||
@@ -800,12 +800,12 @@ namespace Lskj.PubBomImport
|
|||||||
DataTable childTable = frmBillInfo.GcMainView.GridControl.DataSourceTable().Clone();
|
DataTable childTable = frmBillInfo.GcMainView.GridControl.DataSourceTable().Clone();
|
||||||
StringBuilder insertbulider = new StringBuilder();
|
StringBuilder insertbulider = new StringBuilder();
|
||||||
insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{productCode}';");
|
insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{productCode}';");
|
||||||
insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{productCode}','{sourceCode + sourceBC}','{sourceCode}'),'{ERPInfo.Instance.UserName}','变更';");
|
insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{productCode}','{sourceCode }','{sourceCode}','{ERPInfo.Instance.UserName}','变更');");
|
||||||
foreach (DataRow parentRow in parentTable.Rows)
|
foreach (DataRow parentRow in parentTable.Rows)
|
||||||
{
|
{
|
||||||
int.TryParse(parentRow["套数"] + "", out int tamount);
|
int.TryParse(parentRow["套数"] + "", out int tamount);
|
||||||
string childCode = parentRow["图号"] + "";
|
string childCode = parentRow["图号"] + "";
|
||||||
insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{productCode}','{sourceCode + sourceBC}','{childCode}','{ERPInfo.Instance.UserName}','变更');");
|
insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{productCode}','{sourceCode }','{childCode}','{ERPInfo.Instance.UserName}','变更');");
|
||||||
if (childCode.StartsWith("QD") || childCode.StartsWith("ZZQD"))
|
if (childCode.StartsWith("QD") || childCode.StartsWith("ZZQD"))
|
||||||
{
|
{
|
||||||
string tempFileName = childFileDic[childCode];
|
string tempFileName = childFileDic[childCode];
|
||||||
@@ -913,7 +913,7 @@ namespace Lskj.PubBomImport
|
|||||||
StringBuilder insertbulider = new StringBuilder();
|
StringBuilder insertbulider = new StringBuilder();
|
||||||
string mxCode = BaseImpl.GetResult($"select MxFileName from FileAttachmentMapping where MaterialCode = '{productCode}' and RelatedAttachmentName = '{beforeSourceCode}';") + "";
|
string mxCode = BaseImpl.GetResult($"select MxFileName from FileAttachmentMapping where MaterialCode = '{productCode}' and RelatedAttachmentName = '{beforeSourceCode}';") + "";
|
||||||
insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{productCode}' and RelatedAttachmentName = '{beforeSourceCode}';");
|
insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{productCode}' and RelatedAttachmentName = '{beforeSourceCode}';");
|
||||||
insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{productCode}','{mxCode}','{sourceCode}'),'{ERPInfo.Instance.UserName}','变更';");
|
insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{productCode}','{mxCode}','{sourceCode}','{ERPInfo.Instance.UserName}','变更');");
|
||||||
|
|
||||||
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}'");
|
||||||
}
|
}
|
||||||
@@ -1339,7 +1339,7 @@ namespace Lskj.PubBomImport
|
|||||||
frmBillInfo.AddOrUpdateBill(masterRow, childTable);
|
frmBillInfo.AddOrUpdateBill(masterRow, childTable);
|
||||||
string guid = Guid.NewGuid() + "";
|
string guid = Guid.NewGuid() + "";
|
||||||
frmBillInfo.BillSaveSql(guid);
|
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, 0);
|
SetProcessBar(80, 0);
|
||||||
//上传文件
|
//上传文件
|
||||||
string uploadFileId = mxMaxBcFileId;
|
string uploadFileId = mxMaxBcFileId;
|
||||||
|
|||||||
Reference in New Issue
Block a user