From 4548e24916ac5f63eef736cabdcd634864f8de16 Mon Sep 17 00:00:00 2001
From: wangbin <lan@DESKTOP-MG88OFJ>
Date: 星期一, 08 七月 2024 10:39:16 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
index 8ce880c..be44a06 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
@@ -88,6 +88,64 @@
         }
         #endregion
 
+        #region 鍣ㄥ叿淇濆吇瑙勭▼鍗曞垪琛≒DA
+        [Route("Sc_MouldMaintainRuleBill/GetMouldMaintainRuleListPDA")]
+        [HttpGet]
+        public object GetMouldMaintainRuleListPDA(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鍙嶅簭鍒楀寲浼犻�掔殑鍊�
+                //HlpBill com = JsonConvert.DeserializeObject<HlpBill>(sWhere.ToString());
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainRuleBillList", 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_Sc_MouldMaintainRuleListByMould " + sWhere + " order by hmainid desc", "h_v_Sc_MouldMaintainRuleListByMould");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_Sc_MouldMaintainRuleListByMould where 1 = 1";
+                    string sql = sql1 + sWhere + " order by hmainid desc";
+                    ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainRuleListByMould");
+                }
+
+                //娣诲姞鍒楀悕
+                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 ex)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
         #region 鍣ㄥ叿淇濆吇瑙勭▼璁板綍鍒犻櫎鍔熻兘
         [Route("Sc_MouldMaintainRuleBill/DeltetMouldMaintainRuleBillList")]
         [HttpGet]

--
Gitblit v1.9.1