From 5a01014dc116813fd4ea05b61e1eb6eec669f95d Mon Sep 17 00:00:00 2001 From: wangbin <lan@DESKTOP-MG88OFJ> Date: 星期一, 08 七月 2024 09:25:48 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/生产管理/报工台工序/Sc_MESProductReportStepBillController.cs | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESProductReportStepBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESProductReportStepBillController.cs" index f40d8c5..36ef350 100644 --- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESProductReportStepBillController.cs" +++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESProductReportStepBillController.cs" @@ -1,4 +1,5 @@ -锘縰sing System; +锘縰sing Newtonsoft.Json; +using System; using System.Collections.Generic; using System.Data; using System.Linq; @@ -98,6 +99,7 @@ { try { + List<object> a = new List<object>(); //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� if (!DBUtility.ClsPub.Security_Log("MES_ProcExchReport_Query", 1, false, user)) { @@ -117,10 +119,17 @@ string sql = sql1 + sWhere + " order by HInterID desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_ICMOBillWorkQtyStatus_Tmp"); } + 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鍒楀璞$殑鍒楀悕 + } objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "鏌ヨ鏁版嵁鎴愬姛锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = a; return objJsonResult; } catch (Exception e) -- Gitblit v1.9.1