From f5e447f7bdcab43a2a05d8d1cc12d1cece39328b Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期日, 18 十二月 2022 23:58:20 +0800
Subject: [PATCH] 业务员
---
WebAPI/Controllers/LMESController.cs | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index d039b77..212335f 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
@@ -59,6 +60,7 @@
DataSet ds;
try
{
+ List<object> columnNameList = new List<object>();
//鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
//if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user))
//{
@@ -72,11 +74,19 @@
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_Sc_ProcessExchangeBillQuery");
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
//if (ds.Tables[0].Rows.Count != 0 || ds != null)
//{
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
+ objJsonResult.list = columnNameList;
objJsonResult.data = ds.Tables[0];
return objJsonResult;
//}
@@ -115,6 +125,7 @@
string sql = "select * from h_v_Sc_ProcessExchangeBillQuerySub where hmainid = ";
string sql1 = sql + sWhere;
ds = oCN.RunProcReturn(sql1 + " order by cast(宸ュ簭鍙� as int)", "h_v_Sc_ProcessExchangeBillQuerySub");
+ return GetObjectJson(ds);
}
catch (Exception e)
{
@@ -124,7 +135,6 @@
objJsonResult.data = null;
return objJsonResult;
}
- return GetObjectJson(ds);
}
#region 宸ュ簭娴佽浆鍗★紙涓嬭揪锛�
@@ -599,11 +609,21 @@
{
try
{
+ List<object> columnNameList = new List<object>();
//if (ds.Tables[0].Rows.Count != 0 || ds != null)
//{
+ //娣诲姞鍒楀悕
+ 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.list = columnNameList;
objJsonResult.data = ds.Tables[0];
return objJsonResult;
//}
--
Gitblit v1.9.1