From dac1d793ad118eebf9048588a356ae0ea8a3aa95 Mon Sep 17 00:00:00 2001 From: zzr99 <1940172413@qq.com> Date: 星期四, 10 二月 2022 17:42:41 +0800 Subject: [PATCH] 基础建模每个模块的权限 --- WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs index aeba8ab..cf358d6 100644 --- a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs @@ -25,18 +25,28 @@ /// </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 where 绂佺敤鏍囪='' " + sWhere, "h_v_IF_BadReasonList"); + ds = oCN.RunProcReturn("select * from h_v_IF_BadReasonList " + sWhere+ " order by 涓嶈壇鍘熷洜浠g爜 ", "h_v_IF_BadReasonList"); } else { - string sql1 = "select * from h_v_IF_BadReasonList where 绂佺敤鏍囪='' "; - string sql = sql1 + sWhere; + string sql1 = "select * from h_v_IF_BadReasonList where 1 = 1"; + string sql = sql1 + sWhere+ " order by 涓嶈壇鍘熷洜浠g爜 "; ds = oCN.RunProcReturn(sql, "h_v_IF_BadReasonList"); } if (ds == null || ds.Tables[0].Rows.Count == 0) -- Gitblit v1.9.1