From 0c349162c1718f2a8bb0aa9f387277b6802620dc Mon Sep 17 00:00:00 2001 From: wyf Date: Thu, 22 May 2025 12:50:15 +0000 Subject: [PATCH] SVN r624 SVN-Revision: r624 --- 插件库/Lskj.PubBomImport/FrmProgress.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/插件库/Lskj.PubBomImport/FrmProgress.cs b/插件库/Lskj.PubBomImport/FrmProgress.cs index 72f18c9..84dbdbe 100644 --- a/插件库/Lskj.PubBomImport/FrmProgress.cs +++ b/插件库/Lskj.PubBomImport/FrmProgress.cs @@ -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}");