From d59ee61a5295c30dd28d7f9324628f54534b540e Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期四, 09 四月 2026 15:09:37 +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