From 359be0508a24daeabe1e687265aa6783961d1221 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期三, 18 九月 2024 18:59:20 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs |  105 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 105 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs b/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs
index 207a01f..bf7fca2 100644
--- a/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs
@@ -8,6 +8,7 @@
 using System.Data.SqlClient;
 using System.Web.Http;
 using WebAPI.Models;
+using SyntacticSugar.constant;
 
 namespace WebAPI.Controllers
 {
@@ -1531,5 +1532,109 @@
         }
         #endregion
 
+        #region 搴旀敹鍗曟煡璇㈠垪琛�
+        [Route("Xs_ReceivableBill/QueryList")]
+        [HttpGet]
+        public object QueryList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+
+                if (!DBUtility.ClsPub.Security_Log("Xs_ReceivableBill_Query", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犳潈闄愭煡鐪�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                string sql = "select * from h_v_Xs_ReceivableBillQuery where 1 = 1 ";
+
+                if (sWhere == "" || sWhere == null)
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Xs_ReceivableBillQuery  order by hmainid desc", "h_v_Xs_ReceivableBillQuery");
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn(sql + sWhere + " order by hmainid desc", "h_v_Xs_ReceivableBillQuery");
+                }
+
+
+
+                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("Xs_ReceivableBill/QuerySubList")]
+        [HttpGet]
+        public object QuerySubList(string hmainid, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+
+                if (!DBUtility.ClsPub.Security_Log("Xs_ReceivableBill_Query", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犳潈闄愭煡鐪�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                string sql = "select * from h_v_Xs_ReceivableBillQuerySub where hmainid =  " + hmainid;
+
+                ds = oCN.RunProcReturn(sql + " order by hsubid desc", "h_v_Xs_ReceivableBillQuerySub");
+
+
+                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