From 752a904c8c3bee0c56bd9c4129ffa868cd7a3917 Mon Sep 17 00:00:00 2001
From: black-goat-me <226547893@qq.com>
Date: 星期五, 19 五月 2023 16:10:08 +0800
Subject: [PATCH] 任意字段过滤:未完成

---
 WebAPI/Controllers/MateOutController.cs |  106 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 105 insertions(+), 1 deletions(-)

diff --git a/WebAPI/Controllers/MateOutController.cs b/WebAPI/Controllers/MateOutController.cs
index 25f29e2..68911ff 100644
--- a/WebAPI/Controllers/MateOutController.cs
+++ b/WebAPI/Controllers/MateOutController.cs
@@ -1317,6 +1317,110 @@
                 return objJsonResult;
             }
         }
-     
+
+
+
+        //#region 鐧藉澂鍙戝竷姹囨�绘姤琛�
+        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+        //private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        //DataSet ds;
+
+        public class MaterOutSumReport
+        {
+            public DateTime HBeginDate;
+            public DateTime HEndDate;
+            public string HMaterNumber;
+            public string HBillNo;
+            public string HProductName;
+            public string HProductModel;
+            //public string RandomSearch;
+        }
+
+        //鐧藉澂鍙戝竷姹囨�绘姤琛�
+        [Route("MaterOutSumReport/MaterOutSumReport_Cloth")]
+        [HttpGet]
+        public object MaterOutSumReport_Cloth(string sWhere)
+        {
+            try
+            {
+                //鍙嶅簭鍒楀寲浼犻�掔殑鍊�
+                MaterOutSumReport com = JsonConvert.DeserializeObject<MaterOutSumReport>(sWhere.ToString());
+
+                ds = oCN.RunProcReturn($"exec h_p_Kf_MaterOutSumReport_Cloth '{com.HBeginDate}','{com.HEndDate}'" +
+                    $",'{com.HMaterNumber}','{com.HBillNo}','{com.HProductName}','{com.HProductModel}'", "h_p_Kf_MaterOutSumReport_Cloth");
+
+                //鑾峰彇鍒楀悕
+                List<object> columnNameList = new List<object>();
+                //娣诲姞鍒楀悕
+                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.list = columnNameList;
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+
+        //鐧藉澂鍙戝竷鏄庣粏鎶ヨ〃
+        [Route("MaterOutEntryReport/MaterOutEntryReport_Cloth")]
+        [HttpGet]
+        public object MaterOutEntryReport_Cloth(string sWhere)
+        {
+            int i = 0;
+            try
+            {
+                //鍙嶅簭鍒楀寲浼犻�掔殑鍊�
+                MaterOutSumReport com = JsonConvert.DeserializeObject<MaterOutSumReport>(sWhere.ToString());
+
+                ds = oCN.RunProcReturn($"exec h_p_Kf_MaterOutEntryReport_Cloth '{com.HBeginDate}','{com.HEndDate}'" +
+                    $",'{com.HMaterNumber}','{com.HBillNo}','{com.HProductName}','{com.HProductModel}'", "h_p_Kf_MaterOutEntryReport_Cloth");
+
+                //鑾峰彇鍒楀悕
+                List<object> columnNameList = new List<object>();
+                //娣诲姞鍒楀悕
+                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.list = columnNameList;
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+
+        //#endregion
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1