From edcd7574e709748c5d3ccc0bd54930414ddcfc9a Mon Sep 17 00:00:00 2001 From: chenhaozhe <cgz@hz-kingdee.com> Date: 星期五, 30 五月 2025 21:00:08 +0800 Subject: [PATCH] 合并冲突 --- WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs | 65 ++++++++++++++++++++++++++++---- 1 files changed, 57 insertions(+), 8 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs b/WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs index 4b70e17..20a17db 100644 --- a/WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs @@ -18,6 +18,7 @@ private json objJsonResult = new json(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; + ClsXt_SystemParameter oClsXt_SystemParameter = new ClsXt_SystemParameter(); /// <summary> /// 杩斿洖鏁呴殰绫诲埆鍒楄〃 @@ -169,7 +170,7 @@ //淇濆瓨鍓嶆帶鍒�========================================= - string sql1 = "exec h_p_Gy_ConkType_BeforeSaveCtrl " + HMakeEmp + ",'" + 1 + "'"; + string sql1 = "exec h_p_Gy_ConkType_BeforeSaveCtrl '" + HNumber + "','" + HName + "'," + HUSEORGID + ",1,0"; ds = oCN.RunProcReturn(sql1, "h_p_Gy_ConkType_BeforeSaveCtrl"); if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) { @@ -185,7 +186,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 1; - objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; + objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); ; objJsonResult.data = null; oCN.RollBack(); return objJsonResult; @@ -235,7 +236,7 @@ oCN.BeginTran(); //淇濆瓨鍓嶆帶鍒�========================================= - string sql1 = "exec h_p_Gy_ConkType_BeforeSaveCtrl " + HMakeEmp + ",'" + 2 + "'"; + string sql1 = "exec h_p_Gy_ConkType_BeforeSaveCtrl '" + HNumber + "','" + HName + "'," + HUSEORGID + ",3," + HItemID; ds = oCN.RunProcReturn(sql1, "h_p_Gy_ConkType_BeforeSaveCtrl"); if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) { @@ -251,7 +252,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 1; - objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; + objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); ; objJsonResult.data = null; oCN.RollBack(); return objJsonResult; @@ -306,11 +307,48 @@ oCN.Commit(); } - objJsonResult.code = "0"; + + //鑷姩瀹℃牳鍔熻兘 + if (HItemID == 0) + { + ds = oCN.RunProcReturn("select HItemID,HNumber,HName from Gy_ConkType with(nolock) where HNumber='" + HNumber + "' and HUSEORGID = " + HUSEORGID, "Gy_ConkType"); + if (ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨鎴愬姛锛佽嚜鍔ㄥ鏍稿け璐ユ壘涓嶅埌瀵瑰簲鍗曟嵁"; + objJsonResult.data = null; + return objJsonResult; + } + else if (ds.Tables[0].Rows.Count > 1) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鐩稿悓浣跨敤缁勭粐涓嬶紝鍑虹幇" + ds.Tables[0].Rows.Count + "涓浉鍚岀殑浠g爜锛�" + ds.Tables[0].Rows[0]["HNumber"]; + objJsonResult.data = null; + return objJsonResult; + } + else + { + string sAutoCheck = oClsXt_SystemParameter.GetSingleSystemParameter("Gy_ConkType_AutoCheck", ref DBUtility.ClsPub.sExeReturnInfo); + objJsonResult.Verify = "N"; + if (sAutoCheck == "Y") + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨鎴愬姛"; + objJsonResult.data = ds.Tables[0].Rows[0]["HItemID"].ToString(); + objJsonResult.Verify = "Y"; + return objJsonResult; + } + } + } + + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�"); - objJsonResult.data = 1; + objJsonResult.data = null; return objJsonResult; } catch (Exception e) @@ -336,7 +374,7 @@ try { - ds = oCN.RunProcReturn("select * from h_v_Gy_ConkTypeList where HitemID=" + HInterID, "h_v_Gy_ConkTypeList"); + ds = oCN.RunProcReturn("select * from h_v_Gy_ConkType_Edit where HitemID=" + HInterID, "h_v_Gy_ConkType_Edit"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -364,7 +402,7 @@ } } - + [Route("DeltetGy_ConkType")] [HttpGet] public object DeltetGy_ConkType(string HItemID, string user) @@ -420,6 +458,17 @@ objJsonResult.data = null; return objJsonResult; } + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "" || ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐘舵�侊紒"; + objJsonResult.data = null; + return objJsonResult; + } + } //鍒犻櫎鍓嶆帶鍒�========================================= string sql1 = "exec h_p_Gy_ConkType_BeforeDelCtrl " + HItemID + ",'" + user + "'"; ds = oCN.RunProcReturn(sql1, "h_p_Gy_ConkType_BeforeDelCtrl"); -- Gitblit v1.9.1