From 64c5349d0ac0d4888b3dd3da3ec3e7cb35a341fc Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期五, 19 十一月 2021 17:52:54 +0800
Subject: [PATCH] 设备保养点检记录选择设备带出规程记录

---
 WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs |  101 ++++++++++++++++++++++++++++++--------------------
 1 files changed, 61 insertions(+), 40 deletions(-)

diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
index 15d78f7..cac2f61 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
@@ -18,6 +18,7 @@
         public DataSet ds = new DataSet();
         public WebServer webserver = new WebServer();
         public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
 
         public DAL.ClsSc_MouldScrapInBill BillNew0 = new DAL.ClsSc_MouldScrapInBill();   //妯″叿鎶ュ簾鍏ュ簱瀵瑰簲鍗曟嵁绫�
         public DAL.ClsSc_MouldScrapInBill BillOld0 = new DAL.ClsSc_MouldScrapInBill();   //妯″叿鎶ュ簾鍏ュ簱瀵瑰簲鍗曟嵁绫�
@@ -791,44 +792,6 @@
             return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_MoveStockBillList order by 鏃ユ湡 desc", "h_v_IF_MoveStockBillList");
         }
         #endregion
-
-        /// <summary>
-        /// 鐢熶骇棰嗘枡鍗曞垪琛�
-        /// </summary>
-        /// <returns></returns>
-        [Route("Kf_MateOutBill/GetMateOutBillList")]
-        [HttpGet]
-        public object GetMateOutBillList(string sWhere)
-        {
-            try
-            {
-                ds = Sc_GetMateOutBillList(sWhere);
-                objJsonResult.code = "1";
-                objJsonResult.count = 1;
-                objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
-                objJsonResult.data = ds.Tables[0];
-                return objJsonResult;
-            }
-            catch (Exception ex)
-            {
-                objJsonResult.code = "0";
-                objJsonResult.count = 0;
-                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
-                objJsonResult.data = null;
-                return objJsonResult;
-            }
-        }
-
-        #region sql璇彞
-
-
-        public static DataSet Sc_GetMateOutBillList(string sWhere)
-        {
-            return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_MateOutBillList order by 鏃ユ湡 desc", "h_v_IF_MateOutBillList");
-        }
-        #endregion
-
-
         /// <summary>
         /// 閿�鍞嚭搴撳崟鍒楄〃
         /// </summary>
@@ -867,7 +830,36 @@
                 return objJsonResult;
             }
         }
-
+        /// <summary>
+        ///閿�鍞嚭搴撳崟鍒犻櫎鍔熻兘
+        /// </summary>
+        /// <returns></returns>
+        [Route("Kf_SellOutBill/DeltetSellOutBill")]
+        [HttpGet]
+        public object DeltetSeOutStockBackBill(string HInterID)
+        {
+            try
+            {
+                oCN.BeginTran();
+                oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
+                oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
+                oCN.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
         #region sql璇彞
 
 
@@ -1064,7 +1056,36 @@
                 return objJsonResult;
             }
         }
-
+        /// <summary>
+        ///浜у搧鍏ュ簱鍗曞垹闄ゅ姛鑳�
+        /// </summary>
+        /// <returns></returns>
+        [Route("Kf_ProductInBill/DeltetProductInBill")]
+        [HttpGet]
+        public object DeltetProductInBill(string HInterID)
+        {
+            try
+            {
+                oCN.BeginTran();
+                oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
+                oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
+                oCN.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
         #region sql璇彞
 
 

--
Gitblit v1.9.1