From 0b8efdbce56a9df6eb2ec48dbc75b433e8c14256 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期三, 15 四月 2026 17:04:11 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 58 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs b/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
index b8491fd..763ab39 100644
--- a/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
+++ b/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
@@ -1389,6 +1389,64 @@
}
#endregion
+ #region 璁惧杩愯鎶ヨ〃 鏃跺簭鍥�
+ [Route("SB_EquipRunningStatus/ReportByID")]
+ [HttpGet]
+ public object ReportByID(string HEquipID, string user, string sWhere)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+
+ string sql = $"select * from h_v_Gy_EquipmentCockpit_Gantt where HEquipID = {HEquipID} ";
+ if(!string.IsNullOrWhiteSpace(sWhere))
+ {
+ sql += sWhere;
+ }
+ sql += "order by StartTime desc";
+ ds = oCN.RunProcReturn(sql, "h_v_Gy_EquipmentCockpit_Gantt");
+
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+
+ //if (ds.Tables[0].Rows.Count != 0 && ds != null)
+ //{
+
+ //}
+ //else
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犳暟鎹�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#region 璁惧杩愯鐘舵�佹姤琛�
[Route("SB_EquipRunningStatus/Report")]
--
Gitblit v1.9.1