From 2149b3fe500e41047ff66d2fdca2f1121de778cc Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 30 十月 2023 15:49:13 +0800
Subject: [PATCH] 生产订单变更单
---
WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs | 42 ++++++++++++++++++------------------------
1 files changed, 18 insertions(+), 24 deletions(-)
diff --git a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
index 501562b..1dd2ccb 100644
--- a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
@@ -783,32 +783,26 @@
{
try
{
- if (sWhere == null || sWhere.Equals(""))
+ List<object> columnNameList = new List<object>();
+
+ string sql1 = "select * from h_v_Sc_AssemblyBillList where 1 = 1 ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "h_v_Sc_AssemblyBillList");
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
{
- ds = oCN.RunProcReturn("select * from h_v_Sc_AssemblyBillList " + sWhere, "h_v_Sc_AssemblyBillList");
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
}
- else
- {
- string sql1 = "select * from h_v_Sc_AssemblyBillList where 1 = 1 ";
- string sql = sql1 + sWhere;
- ds = oCN.RunProcReturn(sql, "h_v_Sc_AssemblyBillList");
- }
- if (ds == null || ds.Tables[0].Rows.Count == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "false锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
- }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
}
catch (Exception e)
{
--
Gitblit v1.9.1