From ba1997b016398195ddb0f10584e11c6a99af1793 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期四, 25 二月 2021 14:36:26 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-API

---
 WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs |   92 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 91 insertions(+), 1 deletions(-)

diff --git a/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs b/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs
index 1bbe9a5..b1b29c7 100644
--- a/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs
+++ b/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs
@@ -1744,6 +1744,7 @@
         }
         #endregion
 
+        #region 妯″叿淇濆吇璁″垝鍗�
 
 
         #region 妯″叿鏁呴殰鐧昏琛ㄤ繚瀛�/缂栬緫
@@ -2221,7 +2222,7 @@
         /// </summary>
         /// <returns></returns>
         [Route("Sc_MouldMaintainPlanBill/DeltetMouldMaintainPlanBill")]
-        [HttpPost]
+        [HttpGet]
         public object DeltetMouldMaintainPlanBill(string HInterID)
         {
             //缂栬緫鏉冮檺
@@ -2294,5 +2295,94 @@
             }
         }
         #endregion
+
+        #endregion
+
+
+        #region 妯″叿淇濆吇璁板綍琛�
+
+
+        #region [妯″叿淇濆吇璁″垝鍗曞垹闄ゅ姛鑳絔
+        /// <summary>
+        /// 妯″叿缁翠慨鍗曞垹闄ゅ姛鑳�
+        /// </summary>
+        /// <returns></returns>
+        [Route("Sc_MouldMaintainBill/DeltetSc_MouldMaintainBill")]
+        [HttpGet]
+        public object DeltetSc_MouldMaintainBill(string HInterID)
+        {
+            //缂栬緫鏉冮檺
+            //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
+            //{
+            //    objJsonResult.code = "0";
+            //    objJsonResult.count = 0;
+            //    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+            //    objJsonResult.data = null;
+            //    return objJsonResult;
+            //}
+
+
+            Int64 lngBillKey = 0;
+            lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+            if (lngBillKey == 0)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            DAL.ClsSc_MouldMaintainBill oBill = new DAL.ClsSc_MouldMaintainBill();
+            if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+            {
+                if (oBill.omodel.HBillStatus > 1)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐘舵��,涓嶈兘鍒犻櫎锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                if (oBill.omodel.HChecker != "")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁宸茬粡瀹℃牳,涓嶈兘鍒犻櫎锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+                if (IsDete)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            else
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+
+        #endregion
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1