From 966b05b4be4e746696592128ab8ed5889b274181 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 16 六月 2023 15:50:19 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/MateOutController.cs | 50 +++++++++++++++++++++++++-------------------------
1 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/WebAPI/Controllers/MateOutController.cs b/WebAPI/Controllers/MateOutController.cs
index f5095f7..881202f 100644
--- a/WebAPI/Controllers/MateOutController.cs
+++ b/WebAPI/Controllers/MateOutController.cs
@@ -1361,20 +1361,20 @@
//娣诲姞鍒楀悕
foreach (DataColumn col in ds.Tables[0].Columns)
{
- int headLen = col.ColumnName.ToString().Length; //鍒楀悕鐨勯暱搴�
- int colLen = 0;
- if (ds.Tables[1].Rows[0][col.ColumnName] != null)
- {
- string colLenStr=ds.Tables[1].Rows[0][col.ColumnName].ToString();
- if(colLenStr != "")
- {
- colLen = int.Parse(colLenStr); //鍒椾腑鏈�闀挎暟鎹殑闀垮害
- }
+ //int headLen = col.ColumnName.ToString().Length; //鍒楀悕鐨勯暱搴�
+ //int colLen = 0;
+ //if (ds.Tables[1].Rows[0][col.ColumnName] != null)
+ //{
+ // string colLenStr=ds.Tables[1].Rows[0][col.ColumnName].ToString();
+ // if(colLenStr != "")
+ // {
+ // colLen = int.Parse(colLenStr); //鍒椾腑鏈�闀挎暟鎹殑闀垮害
+ // }
- }
- colLen = (headLen >= colLen) ? headLen : colLen;
+ //}
+ //colLen = (headLen >= colLen) ? headLen : colLen;
Type dataType = col.DataType;
- string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\",\"width\":\"" + colLen + "\"}";
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
}
@@ -1422,20 +1422,20 @@
//娣诲姞鍒楀悕
foreach (DataColumn col in ds.Tables[0].Columns)
{
- int headLen = col.ColumnName.ToString().Length; //鍒楀悕鐨勯暱搴�
- int colLen = 0;
- if (ds.Tables[1].Rows[0][col.ColumnName] != null)
- {
- string colLenStr = ds.Tables[1].Rows[0][col.ColumnName].ToString();
- if (colLenStr != "")
- {
- colLen = int.Parse(colLenStr); //鍒椾腑鏈�闀挎暟鎹殑闀垮害
- }
+ //int headLen = col.ColumnName.ToString().Length; //鍒楀悕鐨勯暱搴�
+ //int colLen = 0;
+ //if (ds.Tables[1].Rows[0][col.ColumnName] != null)
+ //{
+ // string colLenStr = ds.Tables[1].Rows[0][col.ColumnName].ToString();
+ // if (colLenStr != "")
+ // {
+ // colLen = int.Parse(colLenStr); //鍒椾腑鏈�闀挎暟鎹殑闀垮害
+ // }
- }
- colLen = (headLen >= colLen) ? headLen : colLen;
+ //}
+ //colLen = (headLen >= colLen) ? headLen : colLen;
Type dataType = col.DataType;
- string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name +"\",\"width\":\"" + colLen + "\"}";
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
}
@@ -1520,7 +1520,7 @@
MaterOutSumReport com = JsonConvert.DeserializeObject<MaterOutSumReport>(sWhere.ToString());
string sql = "" +
- "( (鏌撳巶鍑虹珯鏃ユ湡 between ''" + com.HBeginDate + "'' and ''" + com.HEndDate + "'') or (''" + com.HBeginDate + "'' = '''' and ''" + com.HEndDate + "''='''') ) " +
+ "( (鐢熶骇璁㈠崟鏃ユ湡 between ''" + com.HBeginDate + "'' and ''" + com.HEndDate + "'') or (''" + com.HBeginDate + "'' = '''' and ''" + com.HEndDate + "''='''') ) " +
"and (浜у搧浠g爜=''" + com.HMaterNumber + "'' or ''" + com.HMaterNumber + "''='''') " +
"and (鐢熶骇璁㈠崟鍙�=''" + com.HBillNo + "'' or ''" + com.HBillNo + "''='''') " +
"and (浜у搧鍚嶇О=''" + com.HProductName + "'' or ''" + com.HProductName + "''='''') " +
--
Gitblit v1.9.1