From 6633722a36386002a3d1981ab6542aa8895dd54f Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期五, 04 十月 2024 22:22:34 +0800 Subject: [PATCH] 条码档案分页数据 --- WebAPI/Controllers/WebAPIController.cs | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 55 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index 25dea84..3c20529 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -14722,6 +14722,61 @@ return objjson; } } + + #region 鏉$爜涓绘。鍒嗛〉鍒楄〃 + [Route("Gy_BarCodeBillList/page")] + [HttpGet] + public json Gy_BarCodeBillListPage(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("Gy_BarCodeBill_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳潈闄愭煡璇�!"; + objJsonResult.data = null; + return objJsonResult; + } + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("exec h_p_IF_BarCodeBillList " + page + "," + size + ",''", "h_p_IF_BarCodeBillList"); + } + else + { + ds = oCN.RunProcReturn("exec h_p_IF_BarCodeBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_IF_BarCodeBillList"); + } + + //娣诲姞鍒楀悕 + 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 + /// <summary> /// 鏍规嵁璁惧淇濆吇瑙勭▼鏄剧ず璁惧淇濆吇瑙勭▼椤圭洰 /// </summary> -- Gitblit v1.9.1