From 956970d74fa97208d0fa873ff1f8ab7ecdc393e4 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期二, 29 十月 2024 10:08:45 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs |  104 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 104 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
index 316a33e..6a95f89 100644
--- a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
@@ -2556,5 +2556,109 @@
             }
         }
         #endregion
+
+        #region 鏀舵枡閫氱煡鍗曟煡璇㈠垪琛�
+        [Route("Cg_POInStockBill/QueryList")]
+        [HttpGet]
+        public object QueryList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+
+                if (!DBUtility.ClsPub.Security_Log("Cg_POInStockBillQuery", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犳潈闄愭煡鐪�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                string sql = "select * from h_v_Cg_POInStockBillQuery where 1 = 1 ";
+
+                if (sWhere == "" || sWhere == null)
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Cg_POInStockBillQuery  order by hmainid desc", "h_v_Cg_POInStockBillQuery");
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn(sql + sWhere + " order by hmainid desc", "h_v_Cg_POInStockBillQuery");
+                }
+
+
+
+                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 = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鏀舵枡閫氱煡鍗曟煡璇㈠瓙鍒楄〃
+        [Route("Cg_POInStockBill/QuerySubList")]
+        [HttpGet]
+        public object QuerySubList(string hmainid, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+
+                if (!DBUtility.ClsPub.Security_Log("Cg_POInStockBillQuery", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犳潈闄愭煡鐪�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                string sql = "select * from h_v_Cg_POInStockBillQuerySub where hmainid =  " + hmainid;
+
+                ds = oCN.RunProcReturn(sql + " order by hsubid desc", "h_v_Cg_POInStockBillQuerySub");
+
+
+                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 = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1