From 5e1c0b5871c0964f38a16ff8b38941f83af8bbac Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期五, 31 五月 2024 15:08:58 +0800 Subject: [PATCH] 出站单删除子件条码优化 故障登记单查询 设备 --- 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