From 7d6e94ce50f70464ebd27ceb8c2e88b95c48b704 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期一, 20 十月 2025 14:07:05 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/BaseSet/Gy_SourceController.cs | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 55 insertions(+), 1 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_SourceController.cs b/WebAPI/Controllers/BaseSet/Gy_SourceController.cs
index 082f9eb..4dd63cb 100644
--- a/WebAPI/Controllers/BaseSet/Gy_SourceController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_SourceController.cs
@@ -364,7 +364,61 @@
return objJsonResult;
}
}
-
+ #region 鐢熶骇璧勬簮鍒楄〃-鍒嗛〉
+ [Route("Gy_Source/list_byPage")]
+ [HttpGet]
+ public object GetSourceList_byPage(string sWhere, string user, string Organization, int page, int size)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>(); //瀹氫箟澹版槑鍙橀噺 锛屾妸閫氳繃 new List<object>()鍒涘缓鐨� 瀹炰緥锛岃祴鍊肩粰鍙橀噺
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Gy_Source_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("exec h_p_Gy_SourceList " + page + "," + size + ",'" + Organization + "'," + "''", "h_p_Gy_SourceList");
+ }
+ else
+ {
+ sWhere = sWhere.Replace("'", "''");
+
+ ds = oCN.RunProcReturn("exec h_p_Gy_SourceList " + page + "," + size + ",'" + Organization + "','" + sWhere + "'", "h_p_Gy_SourceList");
+ }
+
+ //娣诲姞鍒楀悕
+ 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)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
/// <summary>
/// 鐢熶骇璧勬簮鑾峰彇淇℃伅
/// </summary>
--
Gitblit v1.9.1