From 81456046161696d3e1e31a8d9eb428f3b7a3442f Mon Sep 17 00:00:00 2001
From: jhz <jinghz@oceic.com>
Date: 星期四, 22 九月 2022 10:44:56 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs | 41 ++++++++++++++++++++++++++++++-----------
1 files changed, 30 insertions(+), 11 deletions(-)
diff --git a/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs b/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs
index 267002a..20e9a95 100644
--- a/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs
+++ b/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections.Generic;
@@ -35,6 +36,7 @@
{
try
{
+ List<object> columnNameList = new List<object>();
if (!DBUtility.ClsPub.Security_Log("Sb_EquipRepairWorkBillList", 1, false, user))
{
objJsonResult.code = "0";
@@ -45,15 +47,21 @@
}
ds = Sb_EquipRepairWorkBill_s(sWhere);
-
-
-
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
-
+
+ //娣诲姞鍒楀悕
+ 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 = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
}
catch (Exception ex)
{
@@ -106,12 +114,12 @@
}
ds = Sb_EquipRepairCheckWorkBill_s(sWhere);
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
return objJsonResult;
-
}
catch (Exception ex)
{
@@ -154,6 +162,7 @@
{
try
{
+ List<object> columnNameList = new List<object>();
if (!DBUtility.ClsPub.Security_Log("Sb_EquipConkBookBillList", 1, false, user))
{
objJsonResult.code = "0";
@@ -164,10 +173,20 @@
}
ds = Sb_EqpConkBookBillList_s(sWhere);
+
+ //娣诲姞鍒楀悕
+ 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 = "杩斿洖璁板綍鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
}
--
Gitblit v1.9.1