From 7010c7d2adfa1794983810473b1bff5a503d6523 Mon Sep 17 00:00:00 2001 From: YL <YL@LAPTOP-SE03PLUR> Date: 星期二, 08 三月 2022 09:02:17 +0800 Subject: [PATCH] nothing --- WebAPI/Controllers/BaseSet/Gy_GroupController.cs | 67 +++++++++++++++++++++------------ 1 files changed, 42 insertions(+), 25 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Gy_GroupController.cs b/WebAPI/Controllers/BaseSet/Gy_GroupController.cs index 98a55ca..fd38cb0 100644 --- a/WebAPI/Controllers/BaseSet/Gy_GroupController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_GroupController.cs @@ -30,12 +30,12 @@ { try { - //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + //鏌ョ湅鏉冮檺 if (!DBUtility.ClsPub.Security_Log("Gy_Group_Query", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; objJsonResult.data = null; return objJsonResult; } @@ -50,22 +50,23 @@ string sql = sql1 + sWhere+ " order by 鐝粍浠g爜 "; ds = oCN.RunProcReturn(sql, "h_v_GroupList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "false锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { @@ -156,10 +157,26 @@ { var _value = oMain["oMain"].ToString(); string msg1 = _value.ToString(); + string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + string msg2 = sArray[0].ToString(); + string msg3 = sArray[1].ToString(); + string msg4 = sArray[2].ToString(); + string msg5 = sArray[3].ToString(); + + //鍒ゆ柇鏉冮檺 + if (!ClsPub.Security_Log(msg5, 1, false, msg4)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犱繚瀛樻潈闄�"; + objJsonResult.data = null; + return objJsonResult; + } + //鍙嶅簭鍒楀寲 - msg1 = "[" + msg1.ToString() + "]"; + msg2 = "[" + msg2.ToString() + "]"; DAL.ClsGy_Group_Ctl oDept = new DAL.ClsGy_Group_Ctl(); - List<Gy_Group> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_Group>>(msg1); + List<Gy_Group> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_Group>>(msg2); long HItemID = list[0].HItemID; string HNumber = list[0].HNumber; string HName = list[0].HName; @@ -274,12 +291,12 @@ long HLevel = 1; //var HProcID = ""; - ////鍒ゆ柇鏉冮檺 + //鍒ゆ柇鏉冮檺 //if (!ClsPub.Security_Log(msg5, 1, false, msg4)) //{ // objJsonResult.code = "0"; // objJsonResult.count = 0; - // objJsonResult.Message = "娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒"; + // objJsonResult.Message = "鏃犱繚瀛樻潈闄�"; // objJsonResult.data = null; // return objJsonResult; //} @@ -451,7 +468,7 @@ /// 鐝粍鍒犻櫎鍔熻兘 /// </summary> /// <returns></returns> - [Route("DeltetGy_Group")] + [Route("Gy_Group/DeltetGy_Group")] [HttpGet] public object DeltetGy_Group(string HItemID,string user) { @@ -461,11 +478,11 @@ try { //鍒犻櫎鏉冮檺 - if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, user)) + if (!DBUtility.ClsPub.Security_Log("Gy_Group_Delete", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�"; + objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; objJsonResult.data = null; return objJsonResult; } -- Gitblit v1.9.1