From 681c617b48ddbc556fdbe6a251161a3b9584adab Mon Sep 17 00:00:00 2001 From: YL <YL@LAPTOP-SE03PLUR> Date: 星期三, 19 一月 2022 21:55:51 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs | 37 +++++++++++++------------------------ 1 files changed, 13 insertions(+), 24 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs b/WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs index 6baaaa8..c763c47 100644 --- a/WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs +++ b/WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs @@ -25,7 +25,7 @@ /// </summary> [Route("Xt_ORGANIZATIONS/list")] [HttpGet] - public object list(string sWhere,string Organization) + public object list(string sWhere, string Organization) { try { @@ -39,22 +39,11 @@ string sql = sql1 + sWhere + "order by HItemID desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_ORGANIZATIONSList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; } catch (Exception e) { @@ -85,12 +74,12 @@ long HItemID = list[0].HItemID; string HNumber = list[0].HNumber; string HName = list[0].HName; - + long HParentID = list[0].HParentID; - + string HRemark = list[0].HRemark; bool HStopflag = list[0].HStopflag; - + if (!DBUtility.ClsPub.AllowNumber(HNumber)) { objJsonResult.code = "0"; @@ -167,7 +156,7 @@ bool HStopflag = list[0].HStopflag; ////鍒ゆ柇鏉冮檺 - //if (!ClsPub.Security_Log(msg5, 1, true, msg4)) + //if (!ClsPub.Security_Log(msg5, 1, false, msg4)) //{ // objJsonResult.code = "0"; // objJsonResult.count = 0; @@ -203,7 +192,7 @@ ",HStopflag,HMakeTime" + ",HRemark) " + " Values('" + HNumber + "','" + HName + "'," + HParentID.ToString() + - "," + HStopflag + "getdate()"+ + "," + HStopflag + "getdate()" + ",'" + HRemark + "')", ref DBUtility.ClsPub.sExeReturnInfo); //淇敼涓婄骇涓洪潪鏈骇浠g爜 @@ -246,7 +235,7 @@ /// </summary> /// <returns></returns> [Route("DeltetXt_ORGANIZATIONSList")] - + [HttpGet] public object DeltetXt_ORGANIZATIONSList(string HItemID) { @@ -255,7 +244,7 @@ try { //鍒犻櫎鏉冮檺 - //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName)) + //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName)) //{ // objJsonResult.code = "0"; // objJsonResult.count = 0; -- Gitblit v1.9.1