From 940d473ece4a67f5aa555a8cf031eba11cd63d56 Mon Sep 17 00:00:00 2001
From: pzy <2829717936@qq.com>
Date: 星期二, 20 八月 2024 16:46:03 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/CGGL/Cg_PayableBillController.cs | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/CGGL/Cg_PayableBillController.cs b/WebAPI/Controllers/CGGL/Cg_PayableBillController.cs
index da93c5a..5aa6438 100644
--- a/WebAPI/Controllers/CGGL/Cg_PayableBillController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_PayableBillController.cs
@@ -1474,5 +1474,56 @@
}
#endregion
+ #region 搴斾粯鍗曞垪琛� 鏌ヨ渚涘簲鍟嗕粯娆捐鍒掕〃
+ /// <summary>
+ /// 杩斿洖搴旀敹鍗曞垪琛�
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Cg_PayableBill/SupplierPayPlanList")]
+ [HttpGet]
+ public object SupplierPayPlanList(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Gy_SupplierPayPlanList order by 鍗曟嵁鍙� desc", "h_v_Gy_SupplierPayPlanList");
+ }
+ else
+ {
+ string sql1 = "select * from h_v_Gy_SupplierPayPlanList where 1 = 1 ";
+ string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
+ ds = oCN.RunProcReturn(sql, "h_v_Gy_SupplierPayPlanList");
+ }
+
+ //娣诲姞鍒楀悕
+ 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 = 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 = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
}
}
\ No newline at end of file
--
Gitblit v1.9.1