From 9dd3335301f79d7462bf4acb41ba6456cd6e74e1 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期四, 31 八月 2023 10:46:40 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/WebAPIController.cs | 386 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 370 insertions(+), 16 deletions(-) diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index 98b0bd7..af3e59b 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -342,6 +342,122 @@ } + #region 鐢ㄦ埛璁剧疆 + #region 鑾峰彇鐢ㄦ埛淇℃伅 + [Route("Gy_USERSet_PDA/GetGy_Czygl_Info")] + [HttpGet] + public object GetGy_Czygl_Info(string Czybm, string user) + { + try + { + //鏌ョ湅鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + string sql = @"select Czybm, Czymc, HWhID, HWhName, HSecManagerID, HSecManager, HKeeperID, HKeeper, HDeptID, HDept, HCloudUserName, HCloudUserPsd from Gy_Czygl where Czybm = '" + Czybm + "'"; + ds = oCN.RunProcReturn(sql, "Gy_Czygl"); + + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏈壘鍒扮浉鍏虫暟鎹紒"; + objJsonResult.data = null; + return objJsonResult; + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #region 淇濆瓨鐢ㄦ埛淇℃伅 + [Route("Gy_USERSet_PDA/SaveGy_Czygl_Info")] + [HttpPost] + public object SaveGy_Czygl_Info([FromBody] JObject sMainSub) + { + try + { + //鑾峰彇鍙傛暟 + var _value = sMainSub["sMainSub"].ToString(); + string msg1 = _value.ToString(); + string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + + Int64 HWhID = Int64.Parse(sArray[0].ToString()); + string HWhName = sArray[1].ToString(); + Int64 HSecManagerID = Int64.Parse(sArray[2].ToString()); + string HSecManager = sArray[3].ToString(); + Int64 HKeeperID = Int64.Parse(sArray[4].ToString()); + string HKeeper = sArray[5].ToString(); + Int64 HDeptID = Int64.Parse(sArray[6].ToString()); + string HDept = sArray[7].ToString(); + string HCloudUserName = sArray[8].ToString().Trim(); + string HCloudUserPsd = sArray[9].ToString().Trim(); + + string Czybm = sArray[10].ToString(); + string user = sArray[11].ToString(); //鎿嶄綔鐢ㄦ埛鐨勭敤鎴峰悕 + + ////鍒ゆ柇鏄惁鏈夋柊澧炴潈闄� + //if (!DBUtility.ClsPub.Security_Log("Sc_ICMOBillQualityStatus_Tmp_Edit", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳柊澧炴潈闄�!"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + string sql = "update Gy_Czygl set " + + "HWhID = " + HWhID + + ", HWhName = '" + HWhName + + "', HSecManagerID = " + HSecManagerID + + ", HSecManager = '" + HSecManager + + "', HKeeperID = " + HKeeperID + + ", HKeeper = '" + HKeeper + + "', HDeptID = " + HDeptID + + ", HDept = '" + HDept + + "', HCloudUserName = '" + HCloudUserName + + "', HCloudUserPsd = '" + HCloudUserPsd + + "' where Czybm = '" + Czybm + "'"; + + oCN.RunProc(sql); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #endregion + + //鎾ら攢缂撳瓨鍒楄〃璁板綍 [Route("Web/Rescind_Json")] @@ -2663,7 +2779,7 @@ try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - string sql = "Select a.HItemID ,HNumber 鏍哥畻鏂瑰紡缁勪唬鐮�,HName 鏍哥畻鏂瑰紡缁勫悕绉�,HDeptID,b.閮ㄩ棬鍚嶇О 閮ㄩ棬 from Gy_ClassTimePrjGroup a left join h_v_Gy_Department b on a.HDeptID=b.HItemID"; + string sql = "Select a.HItemID ,HNumber 鏍哥畻鏂瑰紡缁勪唬鐮�,HName 鏍哥畻鏂瑰紡缁勫悕绉�,HDeptID,b.閮ㄩ棬浠g爜,b.閮ㄩ棬鍚嶇О 閮ㄩ棬 from Gy_ClassTimePrjGroup a left join h_v_Gy_Department b on a.HDeptID=b.HItemID"; if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn(sql, "Gy_ClassTimePrjGroup"); @@ -3379,6 +3495,174 @@ } /// <summary> + /// 鑾峰彇鎶芥牱鏂规鍒楄〃 + /// </summary> + /// <returns></returns> + [Route("Web/GetGy_SampleScheme")] + [HttpGet] + public object GetSampleScheme(string SampleScheme, int OrganizationID) + { + if (SampleScheme != "") + { + sWhere = " and ( 鎶芥牱鏂规浠g爜 like '%" + SampleScheme + "%' or 鎶芥牱鏂规鍚嶇О like '%" + SampleScheme + "%' ) "; + } + try + { + List<object> columnNameList = new List<object>(); + + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + string sql = "Select * from h_v_Gy_GetSampleSchemeListView where 1 = 1 " + sWhere + "Order by hmainid "; + ds = oCN.RunProcReturn(sql, "h_v_Gy_GetSampleSchemeListView"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + 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 = "1"; + objjson.count = 1; + objjson.Message = "鑾峰彇鎴愬姛!"; + objjson.data = ds.Tables[0]; + objjson.list = columnNameList; + return objjson; + } + } + catch (Exception ex) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ex.ToString(); + objjson.data = null; + return objjson; + } + } + + /// <summary> + /// 鑾峰彇妫�楠屽�煎垪琛� + /// </summary> + /// <returns></returns> + [Route("Web/GetGy_InspectValue")] + [HttpGet] + public object GetInspectValue(string InspectValue, int OrganizationID) + { + if (InspectValue != "") + { + sWhere = " and ( 妫�楠屽�间唬鐮� like '%" + InspectValue + "%' or 妫�楠屽�煎悕绉� like '%" + InspectValue + "%' ) "; + } + try + { + List<object> columnNameList = new List<object>(); + + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + string sql = "Select * from h_v_Gy_GetInspectValueList where 1 = 1 " + sWhere + "Order by hmainid "; + ds = oCN.RunProcReturn(sql, "h_v_Gy_GetInspectValueList"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + 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 = "1"; + objjson.count = 1; + objjson.Message = "鑾峰彇鎴愬姛!"; + objjson.data = ds.Tables[0]; + objjson.list = columnNameList; + return objjson; + } + } + catch (Exception ex) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ex.ToString(); + objjson.data = null; + return objjson; + } + } + + /// <summary> + /// 鑾峰彇妫�浠櫒鍒楄〃 + /// </summary> + /// <returns></returns> + [Route("Web/GetGy_InspectInstruMent")] + [HttpGet] + public object GetGy_InspectInstruMent(string InspectInstruMent, int OrganizationID) + { + if (InspectInstruMent != "") + { + sWhere = " and ( 妫�楠屼华鍣ㄤ唬鐮� like '%" + InspectInstruMent + "%' or 妫�楠屼华鍣ㄥ悕绉� like '%" + InspectInstruMent + "%' ) "; + } + try + { + List<object> columnNameList = new List<object>(); + + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + string sql = "Select * from h_v_Gy_InspectInstruMent where 1 = 1 " + sWhere + "Order by HItemID "; + ds = oCN.RunProcReturn(sql, "h_v_Gy_InspectInstruMent"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + 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 = "1"; + objjson.count = 1; + objjson.Message = "鑾峰彇鎴愬姛!"; + objjson.data = ds.Tables[0]; + objjson.list = columnNameList; + return objjson; + } + } + catch (Exception ex) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ex.ToString(); + objjson.data = null; + return objjson; + } + } + + /// <summary> /// 鏍规嵁妫�楠屾柟妗堜富鍐呯爜鑾峰彇妫�楠岄」鐩� /// </summary> /// <returns></returns> @@ -3397,7 +3681,7 @@ try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - string sql = "select c.HItemID HQCCheckItemID,c.HName 妫�楠岄」鐩�,b.HQCStd,b.HQCUnit HUnit from Gy_QCCheckProjectMain a left join Gy_QCCheckProjectSub b on a.HInterID = b.HInterID left join Gy_QCCheckItem c on b.HQCCheckItemID = c.HItemID where a.HInterID = " + CheckProjectID; + string sql = "select * from h_v_Gy_GetQCCheckItemByProject where hmainid = " + CheckProjectID; ds = oCN.RunProcReturn(sql, "Gy_QCCheckProjectMain"); if (ds == null || ds.Tables[0].Rows.Count <= 0) { @@ -3927,17 +4211,17 @@ [Route("Web/MenuList")] [HttpGet] - public object MenuList(string HMakeName) + public object MenuList(string HMakeName, string HType) { try { List<MenuLoad> mu = new List<MenuLoad>(); //浠ョ埗瀛愮骇缁撴瀯瀛樻斁鑿滃崟娓呭崟淇℃伅 SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); //鏁版嵁搴撴搷浣滃伐鍏� - string sql = "select HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HPicNum from Gy_MenuDefineSet where HMakeName = '" + HMakeName + "' order by HItemID"; + string sql = "select HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HPicNum from Gy_MenuDefineSet where HMakeName = '" + HMakeName + "' and HType = '" + HType + "' order by HPosition"; ds = oCn.RunProcReturn(sql, "Gy_MenuDefineSet"); //鏌ヨ褰撳墠鐢ㄦ埛鐨勮嚜瀹氫箟鑿滃崟鏁版嵁 if (ds.Tables[0]==null || ds.Tables[0].Rows.Count == 0) //鍒ゆ柇褰撳墠鐢ㄦ埛鏄惁鏈夎缃繃鑷畾涔変俊鎭紝鑻ヨ褰曟暟涓�0锛屽垯娌℃湁璁剧疆杩囷紝鍔犺浇鎵�鏈夌殑鑿滃崟淇℃伅 { - sql = "Select * from Gy_Menu_1 Order by HItemID "; + sql = "Select * from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition "; ds = oCn.RunProcReturn(sql, "Gy_Menu"); } @@ -4052,7 +4336,7 @@ //鑷畾涔夎彍鍗曪細鑾峰彇鏍戠粍浠舵暟鎹� [Route("Web/MenuDefineSet")] [HttpGet] - public object MenuDefineSet(string HMakeName) + public object MenuDefineSet(string HMakeName, string HType) { try { @@ -4060,7 +4344,7 @@ List<MenuInit> menuInitList = new List<MenuInit>(); //鐢ㄤ互鑾峰彇Gy_Menu_1涓殑鎵�鏈夎彍鍗曚俊鎭紝浠ュ強瀵瑰簲鑺傜偣鏄惁琚�変腑闇�瑕佸姞杞芥樉绀� SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); - ds = oCn.RunProcReturn("Select * from Gy_Menu_1 Order by HItemID ", "Gy_Menu"); //鑾峰彇Gy_Menu_1涓殑鎵�鏈夎彍鍗曚俊鎭紝鐢ㄤ簬涓簃enuInitList鍒楄〃鍏呭疄鏁版嵁 + ds = oCn.RunProcReturn("Select * from Gy_Menu_1 where HType = '" +HType + "' Order by HItemID ", "Gy_Menu"); //鑾峰彇Gy_Menu_1涓殑鎵�鏈夎彍鍗曚俊鎭紝鐢ㄤ簬涓簃enuInitList鍒楄〃鍏呭疄鏁版嵁 DataSet ds1 = new DataSet(); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) //灏咷y_Menu_1涓殑鑿滃崟淇℃伅鍙婇�変腑鎯呭喌淇濆瓨鍒癿enuInitList鍒楄〃涓紝 @@ -4149,6 +4433,7 @@ string[] sArray = msg.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string HMakeName = sArray[1].ToString(); string saveData = sArray[0].ToString(); + string HTypes = sArray[2].ToString(); List<SaveDefineMenu> saveDataList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SaveDefineMenu>>(saveData); //澹版槑鏁版嵁搴撴搷浣滃伐鍏� @@ -4158,7 +4443,7 @@ oCN.BeginTran(); //鍒犻櫎褰撳墠鐢ㄦ埛鐨勮嚜瀹氫箟鏁版嵁 - string sql = "delete from Gy_MenuDefineSet where HMakeName = '" + HMakeName + "'"; + string sql = "delete from Gy_MenuDefineSet where HMakeName = '" + HMakeName + "' and HType = '" + HTypes + "'"; oCN.RunProc(sql); //鎻掑叆褰撳墠鐢ㄦ埛鏈�鏂扮殑鑷畾涔夋暟鎹� @@ -4173,9 +4458,20 @@ int HLevel = int.Parse(ds.Tables[0].Rows[0]["HLevel"].ToString()); string Hurl = ds.Tables[0].Rows[0]["Hurl"].ToString(); string HType = ds.Tables[0].Rows[0]["HType"].ToString(); + string HPicNum = ds.Tables[0].Rows[0]["HPicNum"].ToString(); - sql = "insert into Gy_MenuDefineSet values('" + saveDataList[i].HItemID + "','" + HPartentID + "','" + HNumber + "','" + saveDataList[i].HName + "'," + HLevel + ",'" + Hurl + "','" + HType + "','" + HMakeName + "')"; - oCN.RunProc(sql); + if(HPartentID == "0" || HPartentID == ds.Tables[0].Rows[0]["HItemID"].ToString()) + { + string HPosition = ds.Tables[0].Rows[0]["HPosition"].ToString(); + sql = "insert into Gy_MenuDefineSet(HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HMakeName,HPicNum,HPosition) values('" + saveDataList[i].HItemID + "','" + HPartentID + "','" + HNumber + "','" + saveDataList[i].HName + "'," + HLevel + ",'" + Hurl + "','" + HType + "','" + HMakeName + "','" + HPicNum + "','" + HPosition + "')"; + oCN.RunProc(sql); + } + else + { + sql = "insert into Gy_MenuDefineSet(HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HMakeName,HPicNum,HPosition) values('" + saveDataList[i].HItemID + "','" + HPartentID + "','" + HNumber + "','" + saveDataList[i].HName + "'," + HLevel + ",'" + Hurl + "','" + HType + "','" + HMakeName + "','" + HPicNum + "','z')"; + oCN.RunProc(sql); + } + } } //鎻愪氦鏁版嵁搴撴搷浣� @@ -4211,7 +4507,7 @@ //蹇嵎鏂瑰紡鑷畾涔夎彍鍗曪細鑾峰彇鏍戠粍浠舵暟鎹� [Route("Web/Xt_UserFastMenu_Display")] [HttpGet] - public object Xt_UserFastMenu_Display(string HMakeName) + public object Xt_UserFastMenu_Display(string HMakeName, string HType) { try { @@ -4219,7 +4515,7 @@ List<MenuInit> menuInitList = new List<MenuInit>(); //鐢ㄤ互鑾峰彇Gy_Menu_1涓殑鎵�鏈夎彍鍗曚俊鎭紝浠ュ強瀵瑰簲鑺傜偣鏄惁琚�変腑闇�瑕佸姞杞芥樉绀� SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); - ds = oCn.RunProcReturn("Select * from Gy_Menu_1 Order by HItemID ", "Gy_Menu"); //鑾峰彇Gy_Menu_1涓殑鎵�鏈夎彍鍗曚俊鎭紝鐢ㄤ簬涓簃enuInitList鍒楄〃鍏呭疄鏁版嵁 + ds = oCn.RunProcReturn("Select * from Gy_Menu_1 where HType = '" + HType + "' Order by HItemID ", "Gy_Menu"); //鑾峰彇Gy_Menu_1涓殑鎵�鏈夎彍鍗曚俊鎭紝鐢ㄤ簬涓簃enuInitList鍒楄〃鍏呭疄鏁版嵁 DataSet ds1 = new DataSet(); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) //灏咷y_Menu_1涓殑鑿滃崟淇℃伅鍙婇�変腑鎯呭喌淇濆瓨鍒癿enuInitList鍒楄〃涓紝 @@ -4303,6 +4599,7 @@ string[] sArray = msg.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string HMakeName = sArray[1].ToString(); string saveData = sArray[0].ToString(); + string HTypes = sArray[2].ToString(); List<SaveDefineMenu> saveDataList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SaveDefineMenu>>(saveData); //澹版槑鏁版嵁搴撴搷浣滃伐鍏� @@ -4312,7 +4609,7 @@ oCN.BeginTran(); //鍒犻櫎褰撳墠鐢ㄦ埛鐨勮嚜瀹氫箟鏁版嵁 - string sql = "delete from Xt_UserFastMenu where HUserID = '" + HMakeName + "'"; + string sql = "delete from Xt_UserFastMenu where HUserID = '" + HMakeName + "' and HType = '" + HTypes + "'"; oCN.RunProc(sql); //鎻掑叆褰撳墠鐢ㄦ埛鏈�鏂扮殑鑷畾涔夋暟鎹� @@ -4329,8 +4626,9 @@ string HUserID = HMakeName; string HSubFuncID = ds.Tables[0].Rows[0]["HItemID"].ToString(); 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) values('" + HUserID + "','" + HSubFuncID + "','" + HCaption + "')"; + sql = "insert into Xt_UserFastMenu(HUserID,HSubFuncID,HCaption,HType) values('" + HUserID + "','" + HSubFuncID + "','" + HCaption + "','" + HType + "')"; oCN.RunProc(sql); } } @@ -4360,12 +4658,68 @@ //蹇嵎鏂瑰紡鑷畾涔夎彍鍗曪細鑾峰彇鏍戠粍浠舵暟鎹� [Route("Web/Xt_UserFastMenu_Init")] [HttpGet] - public object Xt_UserFastMenu_Init(string HMakeName) + public object Xt_UserFastMenu_Init(string HMakeName, string HType) { try { SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); - string sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID where a.HUserID = '" + HMakeName + "' Order by a.HItemID"; + string sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl 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"; + ds = oCn.RunProcReturn(sql, "Xt_UserFastMenu"); //鑾峰彇Xt_UserFastMenu涓鐢ㄦ埛璁剧疆鐨勮嚜瀹氫箟鑿滃崟淇℃伅锛岀敤浜庡湪鍓嶇鍔犺浇 + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鏌ヨ鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ヨ澶辫触锛�"; + objJsonResult.data = e.ToString(); + return objJsonResult; + } + } + #endregion + + #region 淇濆瓨蹇嵎鏂瑰紡鐨勫浘鏍� + [Route("Web/Xt_UserFastMenu_IconSave")] + [HttpGet] + public object Xt_UserFastMenu_IconSave(string Icon, string HItemID, string HMakeName) + { + try + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + string sql = "update Xt_UserFastMenu set HPicNum = '" + Icon + "' where HSubFuncID='" + HItemID + "' and HUserID = '" + HMakeName + "'"; + oCN.RunProc(sql); //鑾峰彇Xt_UserFastMenu涓鐢ㄦ埛璁剧疆鐨勮嚜瀹氫箟鑿滃崟淇℃伅锛岀敤浜庡湪鍓嶇鍔犺浇 + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鏌ヨ鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ヨ澶辫触锛�"; + objJsonResult.data = e.ToString(); + return objJsonResult; + } + } + #endregion + + #region 鑾峰彇蹇嵎鏂瑰紡鐨勫浘鏍� + [Route("Web/Xt_UserFastMenu_IconGet")] + [HttpGet] + public object Xt_UserFastMenu_IconGet(string HItemID, string HMakeName) + { + try + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + string sql = "select HPicNum from Xt_UserFastMenu where HSubFuncID='" + HItemID + "' and HUserID = '" + HMakeName + "'"; ds = oCn.RunProcReturn(sql, "Xt_UserFastMenu"); //鑾峰彇Xt_UserFastMenu涓鐢ㄦ埛璁剧疆鐨勮嚜瀹氫箟鑿滃崟淇℃伅锛岀敤浜庡湪鍓嶇鍔犺浇 objJsonResult.code = "1"; -- Gitblit v1.9.1