From a557aa6f2366a8c81ea3e66b1fb5ea6c632e7cd1 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期三, 09 四月 2025 14:00:56 +0800
Subject: [PATCH] 增加获取模具剩余寿命查询

---
 WebAPI/Controllers/Sc_MouldRepairInBillListController.cs |   89 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 89 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index f0da787..437210c 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -932,6 +932,95 @@
         #endregion
 
 
+        #region 鍣ㄥ叿瀵垮懡鑰楃敤鍒嗘瀽鎶ヨ〃
+
+        /// <summary>
+        /// 鍣ㄥ叿瀵垮懡鑰楃敤鍒嗘瀽鎶ヨ〃
+        /// </summary>
+        /// <returns></returns>
+        [Route("Sc_MouldRepairInBillList/Get_Sc_MouldLifeUsePicReport_list")]
+        [HttpGet]
+        public object Get_Sc_MouldLifeUsePicReport_list(string sWhere)
+        {
+            try
+            {
+
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HBeginDate = dic["HBeginDate"].ToString();//寮�濮嬫棩鏈�
+                string HEndDate = dic["HEndDate"].ToString();//缁撴潫鏃ユ湡
+                string HMouldNo = dic["HMouldNo"].ToString();//妯″叿缂栫爜
+                string HName = dic["HName"].ToString();//妯″叿鍚嶇О
+
+                ds = oCN.RunProcReturn("exec h_P_Sc_MouldLifeUsePicReport '" + HBeginDate + "'," + HEndDate + ",'" + HMouldNo + "','" + HName + "'", "h_P_Sc_MouldLifeUsePicReport");
+                List<object> columnNameList = new List<object>();
+                //娣诲姞鍒楀悕
+                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 = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎴愬姛锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+                //}
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "杩斿洖鎶ヨ〃淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 鑾峰彇妯″叿瀵垮懡 
+        [Route("Sc_MouldRepairInBillList/Get_HMouldLifeUsePic")]
+        [HttpGet]
+        public object Get_HMouldLifeUsePic(string HItemID)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFile_Life where HInterID="+ HItemID, "h_v_Gy_MouldFile_Life");
+
+
+                //娣诲姞鍒楀悕
+                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;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+
+
         /// <summary>
         /// 妯″叿缁翠慨楠屾敹鍗曞垪琛�
         /// </summary>

--
Gitblit v1.9.1