From 170dc25004f6d0a22add0d71fdec602545902999 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期二, 11 十一月 2025 10:38:18 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 119 insertions(+), 1 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs b/WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs
index be10d55..f85d23e 100644
--- a/WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs
@@ -84,6 +84,65 @@
}
}
+ #region 杩斿洖浠撳簱鍒楄〃 鍒嗛〉
+ /// <summary>
+ /// 杩斿洖浠撳簱鍒楄〃 鍒嗛〉
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_Warehouse/listPage")]
+ [HttpGet]
+ public object listPage(string sWhere, string user, string Organization, int page, int size)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_Warehouse", 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_WareHouse_ListPage {page}, {size}, ''", "h_p_Gy_WareHouse_ListPage");
+ }
+ else
+ {
+ sWhere = sWhere.Replace("'", "''");
+
+ ds = oCN.RunProcReturn($@"exec h_p_Gy_WareHouse_ListPage {page}, {size}, '{sWhere}'", "h_p_Gy_WareHouse_ListPage");
+ }
+
+
+ //娣诲姞鍒楀悕
+ 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.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
public class TreeModel
{
@@ -211,7 +270,66 @@
}
}
-
+ #region 杩斿洖浠撳簱鍒楄〃 鍒嗛〉
+ /// <summary>
+ /// 杩斿洖浠撳簱鍒楄〃 鍒嗛〉
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_StockPlace/list1Page")]
+ [HttpGet]
+ public object list1Page(string sWhere, string user, string Organization, int page, int size)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_Warehouse", 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_IF_StockPlaceListPage {page}, {size}, ''", "h_p_IF_StockPlaceListPage");
+ }
+ else
+ {
+ sWhere = sWhere.Replace("'", "''");
+
+ ds = oCN.RunProcReturn($@"exec h_p_IF_StockPlaceListPage {page}, {size}, '{sWhere}'", "h_p_IF_StockPlaceListPage");
+ }
+
+
+ //娣诲姞鍒楀悕
+ 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.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
+
/// <summary>
/// 杩斿洖浠撲綅鍒楄〃
--
Gitblit v1.9.1