From c42507edbe94f0c71044cf7c69d1b5698d194217 Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期四, 31 十月 2024 09:40:34 +0800 Subject: [PATCH] 增加设备工艺参数点检表查询方法, --- WebAPI/Controllers/WebAPIController.cs | 52 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 49 insertions(+), 3 deletions(-) diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index 953bd54..ece6a5d 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -1537,6 +1537,52 @@ } /// <summary> + /// 鑾峰彇鐝粍鍒楄〃 鏍规嵁鐢ㄦ埛瀵瑰簲鐝粍鍏崇郴锛岃幏鍙栫敤鎴峰搴旂殑鐝粍 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Web/GetGroupListByUser_Json")] + [HttpGet] + public object GetGroupListByUser_Json(string sWhere, string user) + { + try + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + + //鏍规嵁鐢ㄦ埛瀵瑰簲鐝粍鐨勫叧绯伙紝杩囨护鏉′欢涓鍔犲彧鏄剧ず瀵瑰簲鐨勭彮缁� + DataSet dsHitemID = oCN.RunProcReturn("exec h_p_Gy_GetSQLGroupByUser '" + user + "'", "h_p_Gy_GetSQLGroupByUser"); + sWhere = sWhere + DBUtility.ClsPub.isStrNull(dsHitemID.Tables[0].Rows[0]["HBack"]); + + DataSet ds = oCN.RunProcReturn("Select HItemID,鐝粍浠g爜 鐝粍浠g爜,鐝粍鍚嶇О 鐝粍 from h_v_GroupList where 1=1 " + sWhere + " Order by HItemID ", "h_v_GroupList"); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触"; + objjson.data = null; + return objjson; + } + else + { + objjson.code = "0"; + objjson.count = 1; + objjson.Message = "鑾峰彇鎴愬姛!"; + objjson.data = ds.Tables[0]; + return objjson; + } + } + catch (Exception e) + { + + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + e.ToString(); + objjson.data = null; + return objjson; + } + } + + /// <summary> /// 鑾峰彇閮ㄩ棬鍒楄〃 /// </summary> /// <returns></returns> @@ -14171,7 +14217,7 @@ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (sWhere == null || sWhere.Equals("")) { - ds = oCN.RunProcReturn(" select * from h_v_Sc_ProcessExchangeBillList where 1=1 and 鏃ユ湡>=DATEADD(MONTH,-2,GETDATE()) order by 鍗曟嵁鍙� desc,hsubid", "h_v_Sc_ProcessExchangeBillList"); + ds = oCN.RunProcReturn("select top 500 * from h_v_Sc_ProcessExchangeBillList where 1=1 order by 鍗曟嵁鍙� desc,hsubid", "h_v_Sc_ProcessExchangeBillList"); } else { @@ -14772,7 +14818,7 @@ res.count = CountConstant.FAIL; res.Message = "Exception锛�" + e.ToString(); res.data = null; - return objJsonResult; + return res; } } #endregion @@ -14937,7 +14983,7 @@ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") { objjson.code = "0"; - objjson.count = 1; + objjson.count = 0; objjson.Message = "璇ヨ澶囨湁澶氫釜璁″垝鍗曟垨鐐规瑙勭▼,鎵嬪姩閫夌潃" ; objjson.data = null; return objjson; -- Gitblit v1.9.1