diff --git a/插件库/Lskj.PubBomImport/FrmProgress.cs b/插件库/Lskj.PubBomImport/FrmProgress.cs index 3126aab..111eba6 100644 --- a/插件库/Lskj.PubBomImport/FrmProgress.cs +++ b/插件库/Lskj.PubBomImport/FrmProgress.cs @@ -925,8 +925,8 @@ namespace Lskj.PubBomImport string code = (dataRow["图号"] + "").Trim(); if (code.StartsWith("QD") || code.StartsWith("ZZQD")) { - stringBuilder.AppendLine($"if not exists (select productid from p_ProductTab where productid = '{dataRow["图号"] + ""}')"); - stringBuilder.AppendLine($"begin insert into p_ProductTab (productid,appellation,bak,SpeciesNo) values ('{(dataRow["图号"] + "").Replace("'", "''")}','{(dataRow["名称"] + "").Replace("'", "''")}','{(dataRow["备注"] + "").Replace("'", "''")}','0199') end;"); + 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;"); } } if (!string.IsNullOrEmpty(stringBuilder.ToString()))