From f50ccbe69bd123135e412b00bbcbf732a8b93c77 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期二, 07 三月 2023 09:52:54 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/WebAPIController.cs | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 46 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index c4fde65..7f01eca 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -769,6 +769,52 @@ return objjson; } } + + /// <summary> + /// 鑾峰彇鐗╂枡鍒楄〃 + /// </summary> + /// <returns></returns> + [Route("GetMaterialList_Json")] + [HttpGet] + public object GetMaterialList_Json(string Material) + { + //sWhere = " Where HStopFlag=0 and HEndFlag=1"; + ////sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); + //if (Material != "") + //{ + // sWhere = sWhere + " and ( HNumber like '%" + Material + "%' or HName like '%" + Material + "%' ) "; + //} + try + { + ds = webserver.GetMaterialList(Material, ref DBUtility.ClsPub.sErrInfo); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo; + objjson.data = null; + return objjson; + } + else + { + objjson.code = "0"; + objjson.count = 1; + objjson.Message = "鑾峰彇鎴愬姛!"; + objjson.data = ds.Tables[0]; + return objjson; + } + } + catch (Exception ex) + { + + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ex.ToString(); + objjson.data = null; + return objjson; + } + } + #endregion -- Gitblit v1.9.1