From a2ba0925be296ea2d3e792c57ec746799cb9e407 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期二, 15 十月 2024 10:37:09 +0800
Subject: [PATCH] 工资结算单个人集体数据库分页

---
 WebAPI/Controllers/工资管理/Pay_GroupBalBillController.cs |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 56 insertions(+), 0 deletions(-)

diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs"
index c5ecf76..b64e2a2 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs"
@@ -9,6 +9,7 @@
 using System.Web.Http;
 using WebAPI.Models;
 using System.Windows.Forms;
+using SyntacticSugar.constant;
 
 namespace WebAPI.Controllers
 {
@@ -82,6 +83,61 @@
         }
         #endregion
 
+        #region 宸ヨ祫缁撶畻鍗�(闆嗕綋)鍒嗛〉鍒楄〃
+        [Route("Pay_GroupBalBillController/page")]
+        [HttpGet]
+        public json Pay_SingleBalBillPage(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(ModRightNameList, 3, 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_Pay_GroupBalBillList " + page + "," + size + ",''", "h_p_Pay_GroupBalBillList");
+                }
+                else
+                {
+                    ds = oCn.RunProcReturn("exec h_p_Pay_GroupBalBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_Pay_GroupBalBillList");
+                }
+
+                //娣诲姞鍒楀悕
+                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 objJsonResult;
+            }
+        }
+        #endregion
+
         #region 宸ヨ祫缁撶畻鍗曪紙闆嗕綋锛� 鍒犻櫎
         /// <summary>
         /// 鍒犻櫎宸ヨ祫缁撶畻鍗曪紙闆嗕綋锛�

--
Gitblit v1.9.1