From 44d9632aa0f529e7426b4e492a169a8071cff5be Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期四, 22 五月 2025 19:15:12 +0800 Subject: [PATCH] 器具分类:禁用/反禁用功能 --- WebAPI/Controllers/WebAPIController.cs | 82 ++++++++++++++++++++++++++++++++-------- 1 files changed, 65 insertions(+), 17 deletions(-) diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index 6d215e4..914c003 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -7234,6 +7234,18 @@ } else//缂栬緫鏃跺垽鏂� { + //宸插鏍镐笉鍏佽淇敼 + DataSet dss; + dss = oCN.RunProcReturn("select * from Gy_PostSkill where HItemID=" + oItem.HItemID, "Gy_Group"); + //鍒ゆ柇鏄惁鍙紪杈� + if (dss.Tables[0].Rows[0]["HCheckEmp"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "姝ゅ崟鎹姸鎬佸凡缁忓鏍革紝涓嶅厑璁镐慨鏀癸紒"; + objJsonResult.data = null; + return objJsonResult; + } //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦� string sParent; sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim()); @@ -7864,6 +7876,18 @@ } else//缂栬緫鏃跺垽鏂� { + //宸插鏍镐笉鍏佽淇敼 + DataSet dss; + dss = oCN.RunProcReturn("select * from Gy_Post where HItemID=" + oItem.HItemID, "Gy_Post"); + //鍒ゆ柇鏄惁鍙紪杈� + if (dss.Tables[0].Rows[0]["HCheckEmp"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "姝ゅ崟鎹姸鎬佸凡缁忓鏍革紝涓嶅厑璁镐慨鏀癸紒"; + objJsonResult.data = null; + return objJsonResult; + } //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦� string sParent; sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim()); @@ -19291,23 +19315,19 @@ /// <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_PDA where 1=1 order by 鍗曟嵁鍙� desc,hsubid", "h_v_Sc_ProcessExchangeBillList_PDA"); + } else { - string sql = "select * from h_v_Sc_ProcessExchangeBillList " + sWhere + " order by 鍗曟嵁鍙� desc,hsubid "; - ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessExchangeBillList"); + string sql = "select * from h_v_Sc_ProcessExchangeBillList_PDA where 1=1 " + sWhere + " order by 鍗曟嵁鍙� desc,hsubid "; + ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessExchangeBillList_PDA"); } if (ds == null || ds.Tables[0].Rows.Count <= 0) { @@ -20971,6 +20991,33 @@ return objJsonResult; } } + + //鑾峰彇鎵�鏈夋ā鍧楅〉闈� + [Route("Web/ModePageList")] + [HttpGet] + public object ModePageList() + { + try + { + + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + ds = oCn.RunProcReturn("Select * from Gy_Menu_1 where isnull(Hurl,'') like'%html%' Order by HItemID ", "Gy_Menu"); //鑾峰彇Gy_Menu_1涓殑鎵�鏈夎彍鍗曚俊鎭紝鐢ㄤ簬涓簃enuInitList鍒楄〃鍏� + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鏌ヨ鎴愬姛锛�"; + objJsonResult.data = ds; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ヨ澶辫触锛�"; + objJsonResult.data = e.ToString(); + return objJsonResult; + } + } #endregion #region 淇濆瓨鑷畾涔夋暟鎹� @@ -21070,7 +21117,7 @@ //蹇嵎鏂瑰紡鑷畾涔夎彍鍗曪細鑾峰彇鏍戠粍浠舵暟鎹� [Route("Web/Xt_UserFastMenu_Display")] [HttpGet] - public object Xt_UserFastMenu_Display(string HMakeName, string HType) + public object Xt_UserFastMenu_Display(string HMakeName, string HType,string HModelAtributos) { try { @@ -21095,7 +21142,7 @@ menuInit.HSelected = false; //鍒ゆ柇鐢ㄦ埛鏄惁閫変腑鏄剧ず璇ヨ彍鍗� - String sql = "Select * from Xt_UserFastMenu where HSubFuncID = '" + ds.Tables[0].Rows[i]["HItemID"] + "' and HUserID='" + HMakeName + "'"; + String sql = "Select * from Xt_UserFastMenu where HSubFuncID = '" + ds.Tables[0].Rows[i]["HItemID"] + "' and HUserID='" + HMakeName + "' and HModelAtributos='" + HModelAtributos + "'"; ds1 = oCn.RunProcReturn(sql, "Xt_UserFastMenu"); if (ds1.Tables[0].Rows.Count > 0) //瀵逛簬Gy_Menu_1琛ㄤ腑鐨勮彍鍗曡妭鐐癸紝閫氳繃妫�绱㈠湪Gy_MenuDefineSet琛ㄤ腑瀵瑰簲鐢ㄦ埛鏄惁瀛樺湪璇ヨ妭鐐圭殑淇℃伅锛屽垽鏂鐢ㄦ埛鏄惁閫変腑璇ヨ妭鐐归渶瑕佸姞杞芥樉绀哄湪渚ц彍鍗曟爮 { @@ -21163,6 +21210,7 @@ string HMakeName = sArray[1].ToString(); string saveData = sArray[0].ToString(); string HTypes = sArray[2].ToString(); + string HModelAtributos = sArray[3].ToString(); List<SaveDefineMenu> saveDataList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SaveDefineMenu>>(saveData); //澹版槑鏁版嵁搴撴搷浣滃伐鍏� @@ -21172,7 +21220,7 @@ oCN.BeginTran(); //鍒犻櫎褰撳墠鐢ㄦ埛鐨勮嚜瀹氫箟鏁版嵁 - string sql = "delete from Xt_UserFastMenu where HUserID = '" + HMakeName + "' and HType = '" + HTypes + "'"; + string sql = "delete from Xt_UserFastMenu where HUserID = '" + HMakeName + "' and HType = '" + HTypes + "' and HModelAtributos = '" + HModelAtributos + "'"; oCN.RunProc(sql); //鎻掑叆褰撳墠鐢ㄦ埛鏈�鏂扮殑鑷畾涔夋暟鎹� @@ -21191,7 +21239,7 @@ string HCaption = ds.Tables[0].Rows[0]["HName"].ToString(); string HType = ds.Tables[0].Rows[0]["HType"].ToString(); - sql = "insert into Xt_UserFastMenu(HUserID,HSubFuncID,HCaption,HType) values('" + HUserID + "','" + HSubFuncID + "','" + HCaption + "','" + HType + "')"; + sql = "insert into Xt_UserFastMenu(HUserID,HSubFuncID,HCaption,HType,HModelAtributos) values('" + HUserID + "','" + HSubFuncID + "','" + HCaption + "','" + HType + "','"+ HModelAtributos + "')"; oCN.RunProc(sql); } } @@ -21221,17 +21269,17 @@ //蹇嵎鏂瑰紡鑷畾涔夎彍鍗曪細鑾峰彇鏍戠粍浠舵暟鎹� [Route("Web/Xt_UserFastMenu_Init")] [HttpGet] - public object Xt_UserFastMenu_Init(string HMakeName, string HType) + public object Xt_UserFastMenu_Init(string HMakeName, string HType,string HModelAtributos) { try { SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); - string sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID where a.HUserID = '" + HMakeName + "' and b.HType = '" + HType + "' Order by a.HItemID"; + string sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID where a.HUserID = '" + HMakeName + "' and b.HType = '" + HType + "' and a.HModelAtributos = '" + HModelAtributos + "' Order by a.HItemID"; ds = oCn.RunProcReturn(sql, "Xt_UserFastMenu"); //鑾峰彇Xt_UserFastMenu涓鐢ㄦ埛璁剧疆鐨勮嚜瀹氫箟鑿滃崟淇℃伅锛岀敤浜庡湪鍓嶇鍔犺浇 if (ds == null || ds.Tables[0].Rows.Count == 0) { - sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID where a.HUserID = 'admin' and b.HType = '" + HType + "' Order by a.HItemID"; + sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID where a.HUserID = 'admin' and b.HType = '" + HType + "' and a.HModelAtributos = '" + HModelAtributos + "' Order by a.HItemID"; ds = oCn.RunProcReturn(sql, "Xt_UserFastMenu"); //鑾峰彇Xt_UserFastMenu涓鐢ㄦ埛璁剧疆鐨勮嚜瀹氫箟鑿滃崟淇℃伅锛岀敤浜庡湪鍓嶇鍔犺浇 } -- Gitblit v1.9.1