wtt
2024-11-06 6a9fcf4bfaf1f4eb458d79eb54a0fa988730d6be
WebAPI/Controllers/Pay_ReportController.cs
@@ -594,5 +594,50 @@
            return objJsonResult;
        }
        #endregion
        #region [系统计件报表]
        [Route("Pay_PaymentEntryReport/list")]
        [HttpGet]
        public object Pay_PaymentEntryReport(string sWhere, string user)
        {
            List<object> columnNameList = new List<object>();
            try
            {
                //判断是否有查询权限
                if (!DBUtility.ClsPub.Security_Log("Pay_PaymentEntryReport", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限查看!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ds = oCN.RunProcReturn("exec h_p_Pay_PaymentEntryReport" + sWhere, "h_p_Pay_PaymentEntryReport");
                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));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = e.Message.ToString();
                objJsonResult.data = null;
                objJsonResult.list = columnNameList;
            }
            return objJsonResult;
        }
        #endregion
    }
}