From 06f139a2d46f9a58c7d64c51bcab037606b61491 Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期三, 09 六月 2021 18:56:02 +0800
Subject: [PATCH] 增加 模治具退库单、 检验项目 编辑模块(新增,修改,删除功能), 及列表。

---
 WebAPI/Controllers/LMESController.cs |   89 +++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 86 insertions(+), 3 deletions(-)

diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index 698ffe6..0321edb 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -73,7 +73,11 @@
             }
             catch (Exception e)
             {
-                ds = null;
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
             }
             return GetObjectJson(ds);
         }
@@ -97,7 +101,11 @@
             }
             catch (Exception e)
             {
-                ds = null;
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
             }
             return GetObjectJson(ds);
         }
@@ -1022,6 +1030,81 @@
             return GetObjectJson(ds);
         }
 
-    //
+        /// <summary>
+        /// 杩斿洖澧欏挃宸ヨ祫缁熻鎶ヨ〃
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("LEMS/MES_Qk_OutProcessList_Json")]
+        [HttpGet]
+        public object MES_Qk_OutProcessList_Json(string sWhere)
+        {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                ds = oCN.RunProcReturn("select * from (select min(a.HDate) 璧峰鏃堕棿, max(a.HDate) 鎴嚦鏃堕棿, b.HName 宸ュ簭鍚嶇О, c.HName 鐝粍鍚嶇О, d.HName 姹囨姤浜�, sum(a.HQty) 鍚堣姹囨姤鏁伴噺, sum(b.HFixPrice * a.HQty) 鍚堣宸ヨ祫 from Sc_StationOutBillMain a left join Gy_Process b on a.HProcID = b.HItemID Left join Gy_Group c on a.HGroupID = c.HItemID left join Gy_Employee d on a.HEmpID = d.HItemID where 1=1 group by b.HName,c.HName,d.HName) t where 1=1 " + sWhere, "Sc_StationOutBillMain");
+            }
+            catch (Exception e)
+            {
+                ds = null;
+            }
+            return GetObjectJson(ds);
+        }
+
+        //鍗曡鍒犻櫎杩涚珯鎺ユ敹鍗曞垪琛�
+        [Route("LEMS/StationInBillListDelete_Json")]
+        [HttpGet]
+        public object StationInBillListDelete_Json(long sHInterID)
+        {
+            try
+            {
+                SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+                oCn.RunProc("Delete from Sc_StationInBillMain where HInterID=" + sHInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+                objJsonResult.code = "200";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "000";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍒犻櫎澶辫触锛�";
+                objJsonResult.data = e.ToString();
+                return objJsonResult;
+            }
+
+        }
+
+        //鍗曡鍒犻櫎鍑虹珯姹囨姤鍗曞垪琛�
+        [Route("LEMS/StationOutBillListDelete_Json")]
+        [HttpGet]
+        public object StationOutBillListDelete_Json(long sHInterID)
+        {
+            try
+            {
+                SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+                oCn.RunProc("Delete from Sc_StationOutBillMain where HInterID=" + sHInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+                objJsonResult.code = "200";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "000";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍒犻櫎澶辫触锛�";
+                objJsonResult.data = e.ToString();
+                return objJsonResult;
+            }
+
+        }
+
+
+        
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1