From bb001d64dcb47dd59179f334719a8dd95d2908a0 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期三, 11 九月 2024 21:12:21 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs index 5ba05d2..8372a99 100644 --- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs @@ -79,7 +79,7 @@ objJsonResult.data = null; return objJsonResult; } - string sql1 = string.Format(@"select * from h_v_Gy_MaterialList where 缁勭粐鍚嶇О='" + Organization + "'"); + string sql1 = string.Format(@"select top(500) * from h_v_Gy_MaterialList where 缁勭粐鍚嶇О='" + Organization + "'"); if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn(sql1 + sWhere + " order by 鐗╂枡浠g爜 desc", "h_v_Gy_MaterialList"); @@ -314,6 +314,33 @@ return objJsonResult; } } + #region 鑾峰彇浜嬩笟閮� + [Route("Gy_Material/Get_Gy_Division")] + [HttpGet] + public object Get_Gy_Division(string HOrgID) + { + try + { + DataSet oDs = new DataSet(); + //========== + oDs = oCN.RunProcReturn(" select HItemID,HName from Gy_Division", "Gy_Division"); + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鑾峰彇鎴愬姛锛�"; + objJsonResult.data = oDs.Tables[0]; + return objJsonResult; ; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + /// <summary> /// 鐗╂枡璁剧疆鑾峰彇淇℃伅 -- Gitblit v1.9.1