From b6df3c3b0da45b6a70dd8ea152e8ea4293740a64 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期三, 16 二月 2022 08:50:16 +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 c8fe01b..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 " + 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 1 = 1 ";
-                    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