From 0391bddfdda8f0b45a66d13f07ae87c0537a02c7 Mon Sep 17 00:00:00 2001 From: zzr99 <1940172413@qq.com> Date: 星期四, 21 四月 2022 14:01:59 +0800 Subject: [PATCH] 标准工时完善 --- WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs | 45 ++++++++++++++++++++++++++++----------------- 1 files changed, 28 insertions(+), 17 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs index 3910256..204b3c0 100644 --- a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs @@ -25,10 +25,20 @@ /// </summary> [Route("Gy_BadReason/list")] [HttpGet] - public object list(string sWhere) + public object list(string sWhere,string user) { try { + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Gy_BadReason", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_IF_BadReasonList " + sWhere+ " order by 涓嶈壇鍘熷洜浠g爜 ", "h_v_IF_BadReasonList"); @@ -39,22 +49,23 @@ string sql = sql1 + sWhere+ " order by 涓嶈壇鍘熷洜浠g爜 "; ds = oCN.RunProcReturn(sql, "h_v_IF_BadReasonList"); } - 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) { -- Gitblit v1.9.1