From 3697b0dda739b38c33406d6e164714167e9ad5b5 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期五, 22 十一月 2024 15:31:18 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs | 62 +++++++++++++++++++++++++++++++ 1 files changed, 62 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs b/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs index bd0f09e..b634a84 100644 --- a/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs +++ b/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs @@ -85,6 +85,67 @@ } #endregion + #region 鏀舵鍗曞垪琛� 鏌ヨ-鍒嗛〉 + /// <summary> + /// 杩斿洖椤圭洰闃舵鍒楄〃 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("YS_ReceiveBill/list_byPage")] + [HttpGet] + public object getYS_ReceiveBill_byPage(string sWhere, string user, string Organization, int page, int size) + { + try + { + List<object> columnNameList = new List<object>(); + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("YS_ReceiveBillQuery", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + sWhere = sWhere.Replace("'", "''"); + + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("exec h_p_YS_ReceiveBillList_Query " + page + "," + size + ",'" + Organization + "'," + "''", "h_p_YS_ReceiveBillList_Query"); + } + else + { + ds = oCN.RunProcReturn("exec h_p_YS_ReceiveBillList_Query " + page + "," + size + ",'" + Organization + "','" + sWhere + "'", "h_p_YS_ReceiveBillList_Query"); + } + + //娣诲姞鍒楀悕 + 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 = "1"; + objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); + objJsonResult.Message = "Sucess锛�"; + objJsonResult.list = columnNameList; + 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("YS_ReceiveBill/SaveYS_ReceiveBill")] [HttpPost] @@ -171,6 +232,7 @@ } } oItem.HMaker = msg4; + oItem.HUpDater = msg4; UserName = oItem.HMaker; //鍒跺崟浜� oItem.HBillType = "2003"; oItem.HBillSubType = "2003"; -- Gitblit v1.9.1