From 067596ed46c962ce38d90a3ed33e9c55f184225c Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期二, 03 六月 2025 11:16:30 +0800 Subject: [PATCH] 器具主档:删除时判断是否已经审核,若已经审核则删除失败 --- WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 57 insertions(+), 3 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs index 5129042..a7fd6f6 100644 --- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs @@ -570,6 +570,7 @@ oItem.HShortNumber = sShortNumber;//鐭唬鐮� oItem.HEndFlag = true;//鏈骇鏍囧織 oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //绛夌骇 + oItem.HMakeEmp = msg2; oBill.oModel = oItem; } //淇濆瓨 @@ -1120,11 +1121,11 @@ [HttpGet] public object DeltetGy_Material(string HItemID, string user) { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + oCN.BeginTran();//寮�濮嬩簨鍔� DataSet ds; try { - SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - if (user == "10000")//api鍚屾鏂瑰紡 { oCN.RunProc("delete from Gy_Material where HERPItemID=" + HItemID); @@ -1152,7 +1153,7 @@ objJsonResult.data = null; return objJsonResult; } - oCN.BeginTran();//寮�濮嬩簨鍔� + ds = oCN.RunProcReturn("select * from Gy_Material where HItemID=" + HItemID, "Gy_Material"); if (ds == null || ds.Tables[0].Rows.Count == 0) { @@ -1386,7 +1387,49 @@ } #endregion + #region 鑾峰彇褰撳墠鍏徃鍚� + /// <summary> + /// + /// </summary> + /// <param name="HInterID">鍗曟嵁ID</param> + /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param> + /// <param name="CurUserName">瀹℃牳浜�</param> + /// <returns></returns> + [Route("Xt_getInfo/getCompanyName")] + [HttpGet] + public object getCompanyName() + { + try + { + string sErr = ""; + if(oSystemParameter.ShowBill(ref sErr)) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = oSystemParameter.omodel.WMS_CampanyName; + objJsonResult.data = oSystemParameter.omodel.WMS_CampanyName; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "褰撳墠鍏徃鍚嶈幏鍙栧け璐ワ紒" ; + objJsonResult.data = null; + } + return objJsonResult; + } + catch (Exception e) + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion /// <summary> @@ -2594,6 +2637,17 @@ objJsonResult.data = null; return objJsonResult; } + + ds = oCN.RunProcReturn("select * from Gy_MouldFileMain where HInterID = " + hmainid + " and ISNULL(HChecker,'') <> ''", "Gy_MouldFileMain"); + if (ds.Tables[0].Rows.Count > 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍒犻櫎澶辫触锛佸崟鎹凡瀹℃牳锛�"; + objJsonResult.data = null; + return objJsonResult; + } + if (oBill.DeleteBill(hmainid, ref DBUtility.ClsPub.sExeReturnInfo)) { oCN.BeginTran(); -- Gitblit v1.9.1