From d22bbad221b392dcf606e5cca06f83b3a7b10eb7 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期四, 09 十一月 2023 21:08:30 +0800 Subject: [PATCH] 生产订单变更单:审核后反写生产订单的数量 --- WebAPI/Controllers/SCGL/Sc_ICMOChangeBillController.cs | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/SCGL/Sc_ICMOChangeBillController.cs b/WebAPI/Controllers/SCGL/Sc_ICMOChangeBillController.cs index df2b71b..e404a26 100644 --- a/WebAPI/Controllers/SCGL/Sc_ICMOChangeBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_ICMOChangeBillController.cs @@ -487,9 +487,26 @@ return objJsonResult; } + //鍙嶅啓婧愬崟鏁版嵁 + oCN.BeginTran(); + string sql = "select * from Sc_ICMOBillSub where HInterID = " + oBill.omodel.HMainSourceInterID + " and HEntryID =" + oBill.omodel.HMainSourceEntryID; + ds = oCN.RunProcReturn(sql, "Sc_ICMOBillSub"); + if(ds==null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟鏁版嵁涓嶅瓨鍦紒"; + objJsonResult.data = null; + return objJsonResult; + } + sql = "update Sc_ICMOBillSub set HQty = " + oBill.DetailColl[0].HQty_New + " where HInterID = " + oBill.omodel.HMainSourceInterID + " and HEntryID =" + oBill.omodel.HMainSourceEntryID; + oCN.RunProc(sql); + //瀹℃牳鎻愪氦 if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) { + oCN.Commit(); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "瀹℃牳鎴愬姛"; -- Gitblit v1.9.1