From 202d0a21ec39591d5127d4a3a4d5df2489babee2 Mon Sep 17 00:00:00 2001 From: chenhaozhe <cgz@hz-kingdee.com> Date: 星期四, 08 五月 2025 13:22:18 +0800 Subject: [PATCH] 添加 根据使用组织 生成 树状结构 方法 --- WebAPI/Controllers/WebAPIController.cs | 62 ++++++++++++++++++++++++++---- 1 files changed, 53 insertions(+), 9 deletions(-) diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index 6d215e4..8364faa 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -19080,6 +19080,51 @@ } /// <summary> + /// 鑾峰彇宸℃椤圭洰鍒楄〃 + /// </summary> + /// <returns></returns> + [Route("Web/GetPatrolCheckItemList_Json")] + [HttpGet] + public object GetPatrolCheckItemList_Json(string CheckItem) + { + DataSet ds; + try + { + sWhere = " Where HStopFlag=0 and HEndFlag=1"; + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + if(CheckItem != "" && CheckItem != null) + { + sWhere = sWhere + " and ( HNumber like '%" + CheckItem + "%' or HName like '%" + CheckItem + "%' ) "; + } + ds = oCN.RunProcReturn("Select HItemID,HNumber,HName from Gy_PatrolCheck " + sWhere + " Order by HItemID ", "Gy_DotCheck"); + if(ds == null ) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo; + objjson.data = null; + return objjson; + } + else + { + objjson.code = "1"; + 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; + } + } + + /// <summary> /// 鑾峰彇鐢熶骇浠诲姟鍗曞垪琛� /// </summary> /// <returns></returns> @@ -19291,22 +19336,18 @@ /// <returns></returns> [Route("Web/GetSc_ProcessExchangeBillListView")] [HttpGet] - public object GetSc_ProcessExchangeBillListView(string ICMOBill, int OrganizationID) - { - if (ICMOBill != "" & ICMOBill != null) - { - sWhere = " where 1=1 and 鍗曟嵁鍙� like '%" + ICMOBill + "%' "; - } + public object GetSc_ProcessExchangeBillListView(string sWhere,int OrganizationID) + { try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (sWhere == null || sWhere.Equals("")) { - ds = oCN.RunProcReturn("select top 500 * from h_v_Sc_ProcessExchangeBillList where 1=1 order by 鍗曟嵁鍙� desc,hsubid", "h_v_Sc_ProcessExchangeBillList"); - } + ds = oCN.RunProcReturn("select top 300 * from h_v_Sc_ProcessExchangeBillList where 1=1 order by 鍗曟嵁鍙� desc,hsubid", "h_v_Sc_ProcessExchangeBillList"); + } else { - string sql = "select * from h_v_Sc_ProcessExchangeBillList " + sWhere + " order by 鍗曟嵁鍙� desc,hsubid "; + string sql = "select * from h_v_Sc_ProcessExchangeBillList where 1=1 " + sWhere + " order by 鍗曟嵁鍙� desc,hsubid "; ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessExchangeBillList"); } if (ds == null || ds.Tables[0].Rows.Count <= 0) @@ -20291,6 +20332,9 @@ case "QD": HView = "h_v_Sb_EquipRepairSignBillList"; break; + case "XJ": + HView = "h_v_Sb_EquipPatrolCheckBillList"; + break; default: objjson.code = "0"; objjson.count = 0; -- Gitblit v1.9.1