From 63ffd1c539688841c9375e44cef91efd44ffb496 Mon Sep 17 00:00:00 2001 From: wyf Date: Fri, 13 Jun 2025 09:16:29 +0000 Subject: [PATCH] SVN r728 SVN-Revision: r728 --- 插件库/Lskj.PubBomImport/FrmProgress.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/插件库/Lskj.PubBomImport/FrmProgress.cs b/插件库/Lskj.PubBomImport/FrmProgress.cs index 1728f8b..fb958ce 100644 --- a/插件库/Lskj.PubBomImport/FrmProgress.cs +++ b/插件库/Lskj.PubBomImport/FrmProgress.cs @@ -746,7 +746,9 @@ namespace Lskj.PubBomImport foreach (int bomRowIndex in bomRowIndexs) { DataRow dataRow = gridControlEx.GridView.GetDataRow(bomRowIndex); - string sql = $@"insert bom_bgRwTab (guid,productid,appellation,spec,yproductid,yappellation,yspec,xdopname,xddate,BomOperatorId,comid) OUTPUT INSERTED.BGID + + string sql = $@"delete from bom_bgRwTab where guid = '{guid}'; + insert bom_bgRwTab (guid,productid,appellation,spec,yproductid,yappellation,yspec,xdopname,xddate,BomOperatorId,comid) OUTPUT INSERTED.BGID select '{guid}','{dataRow["productid"] + ""}','{dataRow["appellation"] + ""}','{dataRow["spec"] + ""}',productid,appellation,spec,'{ERPInfo.Instance.UserName}',getdate(),(select top 1 OperatorId from bom_billTab WITH (NOLOCK) where productid = '{dataRow["productid"] + ""}'),2 from p_producttab where productid = '{dataRow["Yproductid"] + ""}'"; string insertId = SqlHelper.ExecuteScalar(sql) + "";