From 3b91a02964f52ee4bbaf55c4e8963466345d1bad Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期五, 21 六月 2024 16:09:30 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs | 63 +++++++++++++++++++++++++++++++ 1 files changed, 63 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs index 4a5c1dc..66abec4 100644 --- a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs +++ b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs @@ -16,6 +16,15 @@ public class Sc_ProcessExchangeBillController : ApiController { public DBUtility.ClsPub.Enum_BillStatus BillStatus; + public const string ModName = "3772"; //鍗曟嵁绫诲瀷 + public const string ModCaption = "宸ュ簭娴佽浆鍗�"; //鍗曟嵁鍚嶇О + public const string ModRightName = "Sc_ProcessExchangeBill"; + public const string ModRightNameList = ModRightName + "List"; //鍒楄〃 + public const string ModRightNameEdit = ModRightName + "_Edit"; //缂栬緫 + public const string ModRightNameCheck = ModRightName + "_Check"; //瀹℃牳 + public const string ModRightNameClose = ModRightName + "_Close"; //鍏抽棴 + public const string ModRightNameDelete = ModRightName + "_Delete"; //浣滃簾 + public const string ModRightNameDrop = ModRightName + "_Drop"; //鍒犻櫎 private json objJsonResult = new json(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; @@ -1902,5 +1911,59 @@ } #endregion + + #region 宸ュ簭娴佽浆鍗″垪琛� + /// <summary> + /// 鑾峰彇宸ュ簭娴佽浆鍗″垪琛ㄤ俊鎭� + /// </summary> + /// <returns></returns> + [Route("Sc_ProcessExchangeBillController/GetSc_ProcessExchangeBillList_Json")] + [HttpGet] + public object GetSc_ProcessExchangeBillList_Json(string sWhere, string HMaker, string OperationType, string ViewName) + { + try + { + //鍒ゆ柇鏉冮檺 + if (OperationType == "1") + { + //鍒ゆ柇鏉冮檺 + if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 3, false, HMaker)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒"; + objJsonResult.data = null; + return objJsonResult; + } + } + + //杩斿洖鍒楄〃淇℃伅 + ds = oCN.RunProcReturn("select * from " + ViewName + " where 1=1 " + sWhere + " order by hmainid desc", ViewName); + List<object> columnNameList = new List<object>(); + //娣诲姞鍒楀悕 + 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鍒楀璞$殑鍒楀悕 + } + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ヨ鍒楄〃淇℃伅澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + } } \ No newline at end of file -- Gitblit v1.9.1