From 1e1425d8a7cfad573ff77f2cb3a84064bc056a81 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期日, 09 七月 2023 13:20:03 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/MateOutController.cs | 64 +++++++++++++++++--------------- 1 files changed, 34 insertions(+), 30 deletions(-) diff --git a/WebAPI/Controllers/MateOutController.cs b/WebAPI/Controllers/MateOutController.cs index b4dad46..6c03f4d 100644 --- a/WebAPI/Controllers/MateOutController.cs +++ b/WebAPI/Controllers/MateOutController.cs @@ -553,7 +553,8 @@ { objJsonResult.code = "0"; objJsonResult.count = 1; - objJsonResult.Message = "鐢熸垚棰嗘枡鍗曟垚鍔燂紒鍗曟嵁鍙蜂负锛�"; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛� + //objJsonResult.Message = "鐢熸垚棰嗘枡鍗曟垚鍔燂紒鍗曟嵁鍙蜂负锛�"; objJsonResult.data = null; return objJsonResult; } @@ -561,7 +562,8 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "涓婁紶澶辫触锛�" + DBUtility.ClsPub.sErrInfo; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛� + //objJsonResult.Message = "涓婁紶澶辫触锛�" + DBUtility.ClsPub.sErrInfo; objJsonResult.data = null; return objJsonResult; } @@ -618,7 +620,8 @@ { objJsonResult.code = "0"; objJsonResult.count = 1; - objJsonResult.Message = "鐢熸垚閫�鏂欏崟鎴愬姛锛佸崟鎹彿涓猴細"; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛� + //objJsonResult.Message = "鐢熸垚閫�鏂欏崟鎴愬姛锛佸崟鎹彿涓猴細"; objJsonResult.data = null; return objJsonResult; } @@ -626,7 +629,8 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "涓婁紶澶辫触锛�" + DBUtility.ClsPub.sErrInfo; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛� + //objJsonResult.Message = "涓婁紶澶辫触锛�" + DBUtility.ClsPub.sErrInfo; objJsonResult.data = null; return objJsonResult; } @@ -1361,20 +1365,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 +1426,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 +1524,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 + "''='''') " + @@ -1560,7 +1564,7 @@ - #region 绗笁涓姤琛� + #region 鏌撳巶浜ч噺鎶ヨ〃 [Route("ProdProcessSumReport/ProdProcessSumReport_DyeColor_third")] [HttpGet] public object ProdProcessSumReport_DyeColor_third(string sWhere) -- Gitblit v1.9.1