From bc037c4d44846befb4015d915dad0db6b3e337e3 Mon Sep 17 00:00:00 2001
From: pzy <2829717936@qq.com>
Date: 星期二, 13 八月 2024 16:10:09 +0800
Subject: [PATCH] 工艺参数分类基础功能实现

---
 WebAPI/Controllers/Sc_MouldRepairInBillListController.cs |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index e11326f..a5f4767 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -606,6 +606,49 @@
         }
         #endregion
 
+        #region 鍣ㄥ叿瀵垮懡鑰楃敤鍒嗘瀽鎶ヨ〃 
+        [Route("Sc_MouldRepairInBillList/Get_Sc_MouldLifeUsePicReport")]
+        [HttpGet]
+        public object Get_Sc_MouldLifeUsePicReport(string sWhere)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Sc_MouldLifeUsePicReport order by 鏈堜唤 desc", "h_v_Sc_MouldLifeUsePicReport");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_Sc_MouldLifeUsePicReport where 1 = 1 ";
+                    string sql = sql1 + sWhere + " order by 鏃ユ湡 ";
+                    ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldLifeUsePicReport");
+                }
+                //娣诲姞鍒楀悕
+                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;
+            }
+        }
+        #endregion
 
 
         /// <summary>

--
Gitblit v1.9.1