From d8f05860407a2bac11ae480f84395c0fca5da830 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期一, 27 二月 2023 08:57:22 +0800 Subject: [PATCH] 工序返工申请单 直接打印测试 --- WebAPI/Controllers/LMESController.cs | 26 +++----------------------- 1 files changed, 3 insertions(+), 23 deletions(-) diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs index b30201c..6d3ed8f 100644 --- a/WebAPI/Controllers/LMESController.cs +++ b/WebAPI/Controllers/LMESController.cs @@ -81,23 +81,13 @@ 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; - //} - //else - //{ - //objJsonResult.code = "0"; - //objJsonResult.count = 0; - //objJsonResult.Message = "鏃犳暟鎹�"; - //objJsonResult.data = null; - //return objJsonResult; - //} } catch (Exception e) { @@ -125,6 +115,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) { @@ -134,7 +125,6 @@ objJsonResult.data = null; return objJsonResult; } - return GetObjectJson(ds); } #region 宸ュ簭娴佽浆鍗★紙涓嬭揪锛� @@ -610,8 +600,7 @@ try { List<object> columnNameList = new List<object>(); - //if (ds.Tables[0].Rows.Count != 0 || ds != null) - //{ + //娣诲姞鍒楀悕 foreach (DataColumn col in ds.Tables[0].Columns) { @@ -626,15 +615,6 @@ objJsonResult.list = columnNameList; objJsonResult.data = ds.Tables[0]; return objJsonResult; - //} - //else - //{ - //objJsonResult.code = "0"; - //objJsonResult.count = 0; - //objJsonResult.Message = "鏃犳暟鎹�"; - //objJsonResult.data = null; - //return objJsonResult; - //} } catch (Exception e) { -- Gitblit v1.9.1