From a590bd43dd6b33ebf328b8768fa60f0441aaf4ac Mon Sep 17 00:00:00 2001 From: cwjbxqmz <1134865194@qq.com> Date: 星期二, 20 二月 2024 10:43:36 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 47 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs index b139a93..10af9b9 100644 --- a/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs +++ b/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs @@ -143,8 +143,55 @@ } oCN.BeginTran(); + var ds = oCN.RunProcReturn("select * from Xs_SeOutStockBillMain where HInterID=" + HInterID, "Xs_SeOutStockBillMain"); + //鍒犻櫎鍓嶆帶鍒� + DataSet BeforeDs = oCN.RunProcReturn("Exec h_p_Xs_SeOutStockBill_BeforeDelCtrl " + HInterID.ToString() + ",'" + user + "'", "h_p_Xs_SeOutStockBill_BeforeDelCtrl"); + if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍒犻櫎鍓嶅垽鏂け璐ワ紒"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍒犻櫎澶辫触锛�" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]); + objJsonResult.data = null; + return objJsonResult; + } + } + oCN.RunProc("Delete From Xs_SeOutStockBillMain where HInterID = " + HInterID); oCN.RunProc("Delete From Xs_SeOutStockBillSub where HInterID = " + HInterID); + + //鍒犻櫎鍚庢帶鍒� + DataSet EndDs = oCN.RunProcReturn("Exec h_p_Xs_SeOutStockBill_AfterDelCtrl " + HInterID.ToString() + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + user + "'", " h_p_Xs_SeOutStockBill_AfterDelCtrl"); + if (EndDs == null || EndDs.Tables.Count == 0 || EndDs.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍒犻櫎鍚庡垽鏂け璐ワ紒"; + objJsonResult.data = null; + oCN.RollBack(); + return objJsonResult; + } + else + { + if (DBUtility.ClsPub.isLong(EndDs.Tables[0].Rows[0]["HBack"]) == 1) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍒犻櫎澶辫触锛�" + DBUtility.ClsPub.isStrNull(EndDs.Tables[0].Rows[0]["HRemark"]); + objJsonResult.data = null; + return objJsonResult; + } + } + oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; -- Gitblit v1.9.1