From abf59bc386d65013b4782eb0b3af463457dbe968 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期二, 12 三月 2024 09:23:29 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/XSGL/Kf_ICStockBackBillController.cs | 31 +++++++++++++++++++++++-------- 1 files changed, 23 insertions(+), 8 deletions(-) diff --git a/WebAPI/Controllers/XSGL/Kf_ICStockBackBillController.cs b/WebAPI/Controllers/XSGL/Kf_ICStockBackBillController.cs index 293cae1..84d34bc 100644 --- a/WebAPI/Controllers/XSGL/Kf_ICStockBackBillController.cs +++ b/WebAPI/Controllers/XSGL/Kf_ICStockBackBillController.cs @@ -57,14 +57,14 @@ ds = oCN.RunProcReturn(sql, "h_v_Kf_ICStockBackBillList_Query"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏈煡璇㈠埌鏁版嵁"; - objJsonResult.data = null; - return objJsonResult; - } + //if (ds == null || ds.Tables[0].Rows.Count == 0) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏈煡璇㈠埌鏁版嵁"; + // objJsonResult.data = null; + // return objJsonResult; + //} //娣诲姞鍒楀悕 foreach (DataColumn col in ds.Tables[0].Columns) @@ -346,6 +346,9 @@ oCN.BeginTran(); + //鍒犻櫎鍏宠仈 + oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellBack_Delete " + HInterID); + //鍒犻櫎閿�鍞��璐у崟鏁版嵁 oCN.RunProc("delete from Kf_ICStockBillMain where HInterID = " + HInterID); oCN.RunProc("delete from Kf_ICStockBillSub where HInterID='" + HInterID + "'"); @@ -384,6 +387,7 @@ } catch (Exception e) { + oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception锛�" + e.ToString(); @@ -509,9 +513,13 @@ } //================================================================================== + //oCN.BeginTran(); + ////澧炲姞鍏宠仈 + //oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellBack_Check " + HInterID + ",'" + CurUserName + "'"); //瀹℃牳鎻愪氦 if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Kf_SellOutBackBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) { + //oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "瀹℃牳鎴愬姛"; @@ -520,6 +528,7 @@ } else { + //oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; @@ -552,8 +561,12 @@ //=========================================================== //鍙嶅鏍告彁浜bandonCheck + //oCN.BeginTran(); + ////鍒犻櫎鍏宠仈 + //oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellBack_UnCheck " + HInterID + ",'" + CurUserName + "'"); if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Kf_SellOutBackBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) { + //oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "鍙嶅鏍告垚鍔�"; @@ -562,6 +575,7 @@ } else { + //oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; @@ -573,6 +587,7 @@ } catch (Exception e) { + //oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString(); -- Gitblit v1.9.1