From b56eb514c93264c1a829fdc05426a7e364879271 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 27 五月 2024 09:10:21 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/MJGL/Sc_MouldLifeUseBillController.cs |   64 ++++++++++++++++++++++++++++++++
 1 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/MJGL/Sc_MouldLifeUseBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldLifeUseBillController.cs
index a94172a..1749b6c 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldLifeUseBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldLifeUseBillController.cs
@@ -524,5 +524,69 @@
             }
         }
         #endregion
+
+
+
+
+        #region 鍣ㄥ叿瀵垮懡瓒嬪娍鍒嗘瀽鎶ヨ〃 鏌ヨ
+        /// <summary>
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Sc_MouldLifeUseReport/GetSc_MouldLifeUseReport")]
+        [HttpGet]
+        public object GetSc_MouldLifeUseReport(string sWhere, string user, string userid)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                ////鏌ョ湅鏉冮檺
+                //if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeUseReport_Query", 1, false, user))
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
+
+
+                //鏌ヨ
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    string sql = "exec h_p_Sc_MouldLifeUseReport '','" + userid + "'";
+                    ds = oCN.RunProcReturn(sql, "h_p_Sc_MouldLifeUseReport");
+                }
+                else
+                {
+                    string sql = "exec h_p_Sc_MouldLifeUseReport  '" + sWhere + "','" + userid + "'";
+                    ds = oCN.RunProcReturn(sql, "h_p_Sc_MouldLifeUseReport");
+                }
+
+                //娣诲姞鍒楀悕
+                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
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1