From 80291fc67fa8164444c155398c2607d9e8156623 Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期五, 31 五月 2024 17:32:18 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs index 4adefb6..43a78b6 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs @@ -2358,8 +2358,17 @@ oCn.BeginTran(); + ds = oCn.RunProcReturn($"select * from Sc_AssemblyBillMain where HMainSourceInterID={oBill.omodel.HProcExchInterID} and HMainSourceEntryID={oBill.omodel.HProcExchEntryID} and HBarCode_P='{HBardcode}'", "Sc_AssemblyBillMain"); + + if (ds.Tables[0].Rows.Count > 0) + { + oCn.RunProc($"delete from Sc_AssemblyBillMain where HMainSourceInterID={oBill.omodel.HProcExchInterID} and HMainSourceEntryID={oBill.omodel.HProcExchEntryID} and HBarCode_P='{HBardcode}'"); + oCn.RunProc($"delete from Sc_AssemblyBillMain where HInterID={ds.Tables[0].Rows[0]["HInterID"].ToString()} and HBarCode_P='{HBardcode}'"); + } + oCn.RunProc("delete from Sc_StationOutBillSub_SN where HInterID=" + HInterID + " and HBarCode='" + HBardcode + "'"); oCn.RunProc("update Sc_StationOutBillMain set HQty-=1 where HInterID=" + HInterID); + oCn.Commit(); -- Gitblit v1.9.1