From 5a3caef6e991f1ee69d8e5dc355468e570805e32 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 16 一月 2025 12:56:07 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs |   66 ++++++++++++++++++++++++++++++---
 1 files changed, 60 insertions(+), 6 deletions(-)

diff --git a/WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs b/WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs
index 99bd24d..aad3df7 100644
--- a/WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
 using Pub_Class;
 using System;
 using System.Collections;
@@ -19,7 +20,7 @@
         DataSet ds;
 
         /// <summary>
-        /// 杩斿洖浠撳簱鍒楄〃
+        /// 杩斿洖鏁呴殰绫诲埆鍒楄〃
         ///鍙傛暟锛歴tring sql銆�
         ///杩斿洖鍊硷細object銆�
         /// </summary>
@@ -29,6 +30,7 @@
         {
             try
             {
+                List<object> columnNameList = new List<object>();
                 //缂栬緫鏉冮檺
                 //if (!DBUtility.ClsPub.Security_Log_second("Gy_ConkType", 1, false, user))
                 //{
@@ -49,11 +51,19 @@
                     ds = oCN.RunProcReturn(sql, "h_v_Gy_ConkTypeList");
                 }
 
+                //娣诲姞鍒楀悕
+                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 = 1;
                 objJsonResult.Message = "Sucess锛�";
                 objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
                 return objJsonResult;
             }
             catch (Exception e)
@@ -240,10 +250,7 @@
             }
         }
 
-        /// <summary>
-        /// 鍖呰鏂瑰紡鍒楄〃鍒犻櫎鍔熻兘
-        /// </summary>
-        /// <returns></returns>
+      
         [Route("DeltetGy_ConkType")]
         [HttpGet]
         public object DeltetGy_ConkType(string HItemID, string user)
@@ -329,5 +336,52 @@
             }
         }
 
+
+
+
+        [Route("Gy_ConkType/List_PDA")]
+        [HttpGet]
+        public object List_PDA(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (sWhere != "" && sWhere != null) 
+                {
+                    sWhere = " and 绂佺敤鏍囧織=''  and ( 鏁呴殰绫诲埆浠g爜 like '%" + sWhere + "%' or 鏁呴殰绫诲埆 like '%" + sWhere + "%' ) ";
+                }
+                else
+                {
+                    sWhere = " and 绂佺敤鏍囧織='' ";
+                }
+                string sql1 = string.Format(@"select * from h_v_Gy_ConkTypeList where 1=1 ");
+                ds = oCN.RunProcReturn(sql1 + sWhere + " order by 鏁呴殰绫诲埆浠g爜 ", "h_v_Gy_ConkTypeList");
+
+                //娣诲姞鍒楀悕
+                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 = 1;
+                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;
+            }
+        }
+
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1