From d516af1f95472c0a5f86ab3b789c7b1e3c1c8656 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期四, 18 十二月 2025 16:47:42 +0800
Subject: [PATCH] 添加 检验单 扫条码/选源单 请求通用接口

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

diff --git a/WebAPI/Controllers/BaseSet/Gy_PropertyController.cs b/WebAPI/Controllers/BaseSet/Gy_PropertyController.cs
index 4f3c7a4..2e9b717 100644
--- a/WebAPI/Controllers/BaseSet/Gy_PropertyController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_PropertyController.cs
@@ -19,6 +19,73 @@
         DataSet ds;
 
 
+        #region 杈呭姪灞炴�у垪琛�-鍒嗛〉
+        [Route("Gy_Property/listPage")]
+        [HttpGet]
+        public object listPage(string sWhere, string user, int page, int size)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();  //瀹氫箟澹版槑鍙橀噺 锛屾妸閫氳繃 new List<object>()鍒涘缓鐨� 瀹炰緥锛岃祴鍊肩粰鍙橀噺
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Gy_Property", 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_PropertyList " + page + "," + size + "," + "''", "h_p_Gy_CarList");
+                }
+                else
+                {
+                    sWhere = sWhere.Replace("'", "''");
+
+                    ds = oCN.RunProcReturn("exec h_p_IF_PropertyList " + page + "," + size + ",'" + sWhere + "'", "h_p_Gy_CarList");
+                }
+
+                //娣诲姞鍒楀悕
+                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鍒楀璞$殑鍒楀悕
+                }
+
+                if (ds.Tables[0].Rows.Count > 0)
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+                    objJsonResult.Message = "Sucess锛�";
+                    objJsonResult.list = columnNameList;
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+                objJsonResult.list = columnNameList;
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+
         /// <summary>
         /// 杩斿洖杈呭姪灞炴�у垪琛�
         ///鍙傛暟锛歴tring sql銆�

--
Gitblit v1.9.1