From 8c8be9fbcc6888f0770dd95fcf96cd75bff1a952 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期五, 29 十一月 2024 12:11:09 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/CGGL/YF_PayMentBillController.cs |   58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 57 insertions(+), 1 deletions(-)

diff --git a/WebAPI/Controllers/CGGL/YF_PayMentBillController.cs b/WebAPI/Controllers/CGGL/YF_PayMentBillController.cs
index bbc13bd..eb79f21 100644
--- a/WebAPI/Controllers/CGGL/YF_PayMentBillController.cs
+++ b/WebAPI/Controllers/CGGL/YF_PayMentBillController.cs
@@ -25,6 +25,62 @@
         SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
         DataSet ds;
 
+        #region 浠樻鍗曞垎椤靛垪琛�
+        [Route("YF_PayMentBill/page")]
+        [HttpGet]
+        public object YF_PayMentBillPage(string sWhere, string user, int page, int size)
+        {
+            DataSet ds;
+            json res = new json();
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鍒ゆ柇鏉冮檺
+                //if (!DBUtility.ClsPub.Security_Log("Kf_POStockInBillList", 1, false, user))
+                //{
+                //    objJsonResult.code = CodeConstant.FAIL;
+                //    objJsonResult.count = CountConstant.FAIL;
+                //    objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
+
+                sWhere = sWhere.Replace("'", "''");
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("exec h_p_YF_PayMentBillList_New " + page + "," + size + ",''", "h_p_YF_PayMentBillList_New");
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn("exec h_p_YF_PayMentBillList_New " + page + "," + size + ",'" + sWhere + "'", "h_p_YF_PayMentBillList_New");
+                }
+
+                //娣诲姞鍒楀悕
+                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鍒楀璞$殑鍒楀悕
+                }
+
+                res.code = CodeConstant.SUCCEED;
+                res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+                res.Message = "Sucess锛�";
+                res.list = columnNameList;
+                res.data = ds.Tables[0];
+                return res;
+            }
+            catch (Exception e)
+            {
+                res.code = CodeConstant.FAIL;
+                res.count = CountConstant.FAIL;
+                res.Message = "Exception锛�" + e.ToString();
+                res.data = null;
+                return res;
+            }
+        }
+        #endregion
+
         #region 浠樻鍗曞垪琛� 鏌ヨ
         /// <summary>
         /// 杩斿洖椤圭洰闃舵鍒楄〃
@@ -1108,7 +1164,7 @@
                 
                 string sql = "select * from h_v_YF_PayMentBillQuerySub where hmainid =  " + hmainid;
 
-                ds = oCN.RunProcReturn(sql + " order by hsubid desc", "h_v_YF_PayMentBillQuerySub");
+                ds = oCN.RunProcReturn(sql + " order by hsubid ASC", "h_v_YF_PayMentBillQuerySub");
 
 
                 foreach (DataColumn col in ds.Tables[0].Columns)

--
Gitblit v1.9.1