From 170dc25004f6d0a22add0d71fdec602545902999 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期二, 11 十一月 2025 10:38:18 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs |   63 +++++++++++++++++++++++++++++++
 1 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs b/WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs
index 29368da..eeabb57 100644
--- a/WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs
@@ -26,6 +26,7 @@
         DataSet ds;
         string fileip = System.Configuration.ConfigurationManager.AppSettings["FileIP"];
 
+        #region 杩斿洖鑱屽憳鍒楄〃
         /// <summary>
         /// 杩斿洖鑱屽憳鍒楄〃
         ///鍙傛暟锛歴tring sql銆�
@@ -84,6 +85,68 @@
             }
         }
 
+        #endregion
+
+        #region 杩斿洖鑱屽憳鍒楄〃
+        /// <summary>
+        /// 杩斿洖鑱屽憳鍒楄〃
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Gy_Employee/listPage")]
+        [HttpGet]
+        public object lislistPaget(string sWhere, string user, string Organization, int page, int size)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_Employee_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn($@"exec h_p_IF_EmployeeListPage {page}, {size}, ''", "h_p_IF_StockPlaceListPage");
+                }
+                else
+                {
+                    sWhere = sWhere.Replace("'", "''");
+
+                    ds = oCN.RunProcReturn($@"exec h_p_IF_EmployeeListPage {page}, {size}, '{sWhere}'", "h_p_IF_StockPlaceListPage");
+                }
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+
         #region 鑱屽憳 鏍戝舰鍥�
         public class TreeModel
         {

--
Gitblit v1.9.1