From ab973f62261817e581f48e63074d62d8f0e50c24 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期四, 22 八月 2024 09:30:23 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs b/WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs index 7d36d09..baed541 100644 --- a/WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs +++ b/WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs @@ -1,4 +1,5 @@ -锘縰sing Newtonsoft.Json.Linq; +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Linq; using Pub_Class; using System; using System.Collections; @@ -33,6 +34,7 @@ { try { + List<object> a = new List<object>(); //鏌ョ湅鏉冮檺 if (!DBUtility.ClsPub.Security_Log("QC_OutCompCheckBill_Query", 1, false, user)) { @@ -53,6 +55,12 @@ string sql = sql1 + sWhere+ " order by hmainid desc "; ds = oCN.RunProcReturn(sql, "h_v_QC_OutCompCheckBillList"); } + foreach (DataColumn col in ds.Tables[0].Columns)//閬嶅巻ds涓涓�涓〃锛圱ables[0]锛夌殑鎵�鏈夊垪锛圕olumns锛夋瘡娆″惊鐜腑锛宑ol鍙橀噺浼氭寔鏈夊綋鍓嶅垪鐨勫紩鐢� + { + Type dataType = col.DataType; //鑾峰彇褰撳墠鏁版嵁绫诲瀷浼犲叆 鑷畾涔夊彉閲廳atadataType + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; //瀛楃涓叉嫾鎺� // 灏嗗垪鍚嶅拰鏁版嵁绫诲瀷淇℃伅鎷兼帴鎴愪竴涓狫SON鏍煎紡鐨勫瓧绗︿覆 + a.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } //if (ds.Tables[0].Rows.Count != 0 || ds != null) //{ @@ -60,6 +68,7 @@ objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = a; return objJsonResult; //} //else -- Gitblit v1.9.1