SVN r624
SVN-Revision: r624
This commit is contained in:
@@ -85,7 +85,7 @@ namespace Lskj.PubBomImport
|
||||
if (sourceCode.StartsWith("QD"))
|
||||
{
|
||||
stringBuilder.AppendLine($"if not exists (select productid from p_ProductTab where productid = '{sourceCode}')");
|
||||
stringBuilder.AppendLine($"begin insert into p_ProductTab (productid,appellation,bak,SpeciesNo) values ('{sourceCode.Replace("'", "''")}','{sourceName.Replace("'", "''")}','','0199') end;");
|
||||
stringBuilder.AppendLine($"begin insert into p_ProductTab (productid,appellation,spec,model,bak,SpeciesNo) values ('{sourceCode.Replace("'", "''")}','{sourceName.Replace("'", "''")}','{sourceCode.Replace("'", "''")}','{sourceCode.Replace("'", "''")}','','0199') end;");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -352,7 +352,7 @@ namespace Lskj.PubBomImport
|
||||
if (sourceCode.StartsWith("QD"))
|
||||
{
|
||||
stringBuilder.AppendLine($"if not exists (select productid from p_ProductTab where productid = '{sourceCode}')");
|
||||
stringBuilder.AppendLine($"begin insert into p_ProductTab (productid,appellation,bak,SpeciesNo) values ('{sourceCode.Replace("'", "''")}','{sourceName.Replace("'", "''")}','','0199') end;");
|
||||
stringBuilder.AppendLine($"begin insert into p_ProductTab (productid,appellation,spec,model,bak,SpeciesNo) values ('{sourceCode.Replace("'", "''")}','{sourceName.Replace("'", "''")}','{sourceCode.Replace("'", "''")}','{sourceCode.Replace("'", "''")}','','0199') end;");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(stringBuilder.ToString()))
|
||||
{
|
||||
@@ -598,10 +598,10 @@ namespace Lskj.PubBomImport
|
||||
foreach (DataRow dataRow in parentTable.Rows)
|
||||
{
|
||||
string childCode = (dataRow["图号"] + "").Trim();
|
||||
if (childCode.StartsWith("QD") || childCode.StartsWith("ZZQD"))
|
||||
if (childCode.StartsWith("QD"))
|
||||
{
|
||||
stringBuilder.AppendLine($"if not exists (select productid from p_ProductTab where productid = '{childCode}')");
|
||||
stringBuilder.AppendLine($"begin insert into p_ProductTab (productid,appellation,bak,SpeciesNo) values ('{childCode.Replace("'", "''")}','{(dataRow["名称"] + "").Replace("'", "''")}','{(dataRow["备注"] + "").Replace("'", "''")}','0199') end;");
|
||||
stringBuilder.AppendLine($"begin insert into p_ProductTab (productid,appellation,spec,model,bak,SpeciesNo) values ('{childCode.Replace("'", "''")}','{(dataRow["名称"] + "").Replace("'", "''")}','{childCode.Replace("'", "''")}','{childCode.Replace("'", "''")}','{(dataRow["备注"] + "").Replace("'", "''")}','0199') end;");
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(stringBuilder.ToString()))
|
||||
@@ -918,10 +918,10 @@ namespace Lskj.PubBomImport
|
||||
foreach (DataRow dataRow in parentTable.Rows)
|
||||
{
|
||||
string code = (dataRow["图号"] + "").Trim();
|
||||
if (code.StartsWith("QD") || code.StartsWith("ZZQD"))
|
||||
if (code.StartsWith("QD"))
|
||||
{
|
||||
stringBuilder.AppendLine($"if not exists (select productid from p_ProductTab where productid = '{code}')");
|
||||
stringBuilder.AppendLine($"begin insert into p_ProductTab (productid,appellation,bak,SpeciesNo) values ('{code.Replace("'", "''")}','{(dataRow["名称"] + "").Replace("'", "''")}','{(dataRow["备注"] + "").Replace("'", "''")}','0199') end;");
|
||||
stringBuilder.AppendLine($"begin insert into p_ProductTab (productid,appellation,spec,model,bak,SpeciesNo) values ('{code.Replace("'", "''")}','{(dataRow["名称"] + "").Replace("'", "''")}','{code.Replace("'", "''")}','{code.Replace("'", "''")}','{(dataRow["备注"] + "").Replace("'", "''")}','0199') end;");
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(stringBuilder.ToString()))
|
||||
@@ -1567,6 +1567,7 @@ namespace Lskj.PubBomImport
|
||||
BaseImpl.ExecSqlValue($"update p_bomImportExecTab set success = 1 where guid = '{execGuid}'");
|
||||
}
|
||||
}
|
||||
|
||||
BaseImpl.ExecSqlValue($"update p_fm_filetab set isdisabled = 0 where fileid = '{fileId}'");
|
||||
SetProcessBar(100, finishCount);
|
||||
SetProcessLabelAllMsg($"总进度:{nowCount + 1}/{sourceTable.Rows.Count + 1}");
|
||||
|
||||
Reference in New Issue
Block a user