From c478bd5e4fd87b7cf2afb1a98c29b29c43db78b5 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 08 十一月 2024 13:36:48 +0800
Subject: [PATCH] 工艺路线查询全部

---
 WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs |   61 +++++++++++++++++++++++++++++-
 1 files changed, 59 insertions(+), 2 deletions(-)

diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
index 8ce880c..43dbbd8 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
@@ -88,6 +88,64 @@
         }
         #endregion
 
+        #region 鍣ㄥ叿淇濆吇瑙勭▼鍗曞垪琛≒DA
+        [Route("Sc_MouldMaintainRuleBill/GetMouldMaintainRuleListPDA")]
+        [HttpGet]
+        public object GetMouldMaintainRuleListPDA(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鍙嶅簭鍒楀寲浼犻�掔殑鍊�
+                //HlpBill com = JsonConvert.DeserializeObject<HlpBill>(sWhere.ToString());
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainRuleBillList", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Sc_MouldMaintainRuleListByMould " + sWhere + " order by hmainid desc", "h_v_Sc_MouldMaintainRuleListByMould");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_Sc_MouldMaintainRuleListByMould where 1 = 1";
+                    string sql = sql1 + sWhere + " order by hmainid desc";
+                    ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainRuleListByMould");
+                }
+
+                //娣诲姞鍒楀悕
+                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 ex)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
         #region 鍣ㄥ叿淇濆吇瑙勭▼璁板綍鍒犻櫎鍔熻兘
         [Route("Sc_MouldMaintainRuleBill/DeltetMouldMaintainRuleBillList")]
         [HttpGet]
@@ -285,7 +343,6 @@
             string msg4 = sArray[2].ToString();
             string msg5 = sArray[3].ToString();
 
-            string UserName = "";
             ListModels oListModels = new ListModels();
             try
             {
@@ -307,7 +364,7 @@
                 lsmain = oListModels.getObjectByJson_Sc_MouldMaintainRuleBillMain(msg2);
                 foreach (Model.ClsSc_MouldMaintainRuleBillMain oItem in lsmain)
                 {
-                    UserName = oItem.HMaker;  //鍒跺崟浜�
+                    DBUtility.ClsPub.CurUserName = oItem.HMaker;  //鍒跺崟浜�
                     oItem.HBillType = "3833";
                     oItem.HBillSubType = "3833";
 

--
Gitblit v1.9.1