SVN-Revision: r624
This commit is contained in:
wyf
2025-05-22 12:50:15 +00:00
parent 759bcca5b7
commit 0c349162c1
+7 -6
View File
@@ -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}");