SVN r582
SVN-Revision: r582
This commit is contained in:
@@ -628,7 +628,7 @@ namespace Lskj.PubBomImport
|
|||||||
SetProcessBar(60, allCount);
|
SetProcessBar(60, allCount);
|
||||||
string guid = Guid.NewGuid() + "";
|
string guid = Guid.NewGuid() + "";
|
||||||
frmBillInfo.BillSaveSql(guid);
|
frmBillInfo.BillSaveSql(guid);
|
||||||
BaseImpl.ExecSqlValue($"update p_bomImportExecTab set afterSql = '{insertbulider}' where guid = '{guid}'");
|
BaseImpl.ExecSqlValue($"update p_bomImportExecTab set afterSql = '{insertbulider.ToString().Replace("'", "''")}' where guid = '{guid}'");
|
||||||
SetProcessBar(80, allCount);
|
SetProcessBar(80, allCount);
|
||||||
//记录guid
|
//记录guid
|
||||||
string updateGuidSql = @"update QMS_wenjiangenggaitab set qms_wjgg_uuid = '{0}' where qms_wjgg_billdocument_Id = '{1}'";
|
string updateGuidSql = @"update QMS_wenjiangenggaitab set qms_wjgg_uuid = '{0}' where qms_wjgg_billdocument_Id = '{1}'";
|
||||||
@@ -701,7 +701,7 @@ namespace Lskj.PubBomImport
|
|||||||
SetProcessBar(60, allCount);
|
SetProcessBar(60, allCount);
|
||||||
string guid = Guid.NewGuid() + "";
|
string guid = Guid.NewGuid() + "";
|
||||||
frmBillInfo.BillSaveSql(guid);
|
frmBillInfo.BillSaveSql(guid);
|
||||||
BaseImpl.ExecSqlValue($"update p_bomImportExecTab set afterSql = '{insertbulider}' where guid = '{guid}'");
|
BaseImpl.ExecSqlValue($"update p_bomImportExecTab set afterSql = '{insertbulider.ToString().Replace("'", "''")}' where guid = '{guid}'");
|
||||||
SetProcessBar(80, allCount);
|
SetProcessBar(80, allCount);
|
||||||
//记录guid
|
//记录guid
|
||||||
string updateGuidSql = @"update QMS_wenjiangenggaitab set qms_wjgg_uuid = '{0}' where qms_wjgg_billdocument_Id = '{1}'";
|
string updateGuidSql = @"update QMS_wenjiangenggaitab set qms_wjgg_uuid = '{0}' where qms_wjgg_billdocument_Id = '{1}'";
|
||||||
@@ -882,7 +882,7 @@ namespace Lskj.PubBomImport
|
|||||||
SetProcessBar(60, allCount);
|
SetProcessBar(60, allCount);
|
||||||
string guid = Guid.NewGuid() + "";
|
string guid = Guid.NewGuid() + "";
|
||||||
frmBillInfo.BillSaveSql(guid);
|
frmBillInfo.BillSaveSql(guid);
|
||||||
BaseImpl.ExecSqlValue($"update p_bomImportExecTab set afterSql = '{insertbulider}' where guid = '{guid}'");
|
BaseImpl.ExecSqlValue($"update p_bomImportExecTab set afterSql = '{insertbulider.ToString().Replace("'", "''")}' where guid = '{guid}'");
|
||||||
SetProcessBar(80, allCount);
|
SetProcessBar(80, allCount);
|
||||||
//记录guid
|
//记录guid
|
||||||
string updateGuidSql = @"update QMS_wenjiangenggaitab set qms_wjgg_uuid = '{0}' where qms_wjgg_billdocument_Id = '{1}'";
|
string updateGuidSql = @"update QMS_wenjiangenggaitab set qms_wjgg_uuid = '{0}' where qms_wjgg_billdocument_Id = '{1}'";
|
||||||
@@ -914,7 +914,8 @@ namespace Lskj.PubBomImport
|
|||||||
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}' where guid = '{guid}'");
|
|
||||||
|
BaseImpl.ExecSqlValue($"update p_bomImportExecTab set afterSql = '{insertbulider.ToString().Replace("'", "''")}' where guid = '{guid}'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
@@ -1198,12 +1199,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 = '{productId}';");
|
insertbulider.AppendLine($"delete FileAttachmentMapping where MaterialCode = '{productId}';");
|
||||||
insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{productId}','{mxsourceCode + mxsourceBC}','{mxsourceCode}','{ERPInfo.Instance.UserName}','新增');");
|
insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{productId}','{mxsourceCode }','{mxsourceCode}','{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 code = (parentRow["图号"] + "").Trim();
|
string code = (parentRow["图号"] + "").Trim();
|
||||||
insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{productId}','{mxsourceCode + mxsourceBC}','{code}','{ERPInfo.Instance.UserName}','新增');");
|
insertbulider.AppendLine($"insert into FileAttachmentMapping (MaterialCode,MxFileName,RelatedAttachmentName,OperatorUser,ChangeStatus) values ('{productId}','{mxsourceCode }','{code}','{ERPInfo.Instance.UserName}','新增');");
|
||||||
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}%'");
|
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;
|
fileTableDic[code] = filetable;
|
||||||
int childMaxBc = 0;
|
int childMaxBc = 0;
|
||||||
@@ -1338,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}' 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