From a45d2cef5657df1a8a107024dba656789a4baf5f Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期四, 15 八月 2024 22:03:12 +0800
Subject: [PATCH] 作业指导书删除功能,增加自动审核入库申请单系统参数,排产添加操作工字段;屏蔽扫码同步入库申请单

---
 WebAPI/Controllers/基础资料/基础资料/Gy_SOPBillListController.cs |   66 ++++++++++++++++++++++++++++++++
 1 files changed, 65 insertions(+), 1 deletions(-)

diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillListController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillListController.cs"
index c328f82..2e1f6db 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillListController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillListController.cs"
@@ -82,6 +82,71 @@
             }
         }
         #endregion
+
+        /// <summary>
+        /// 浣滀笟鎸囧涔﹀垹闄�
+        /// </summary>
+        /// <returns></returns>
+        [Route("Gy_SOPBill/Del")]
+        [HttpGet]
+        public object Del(string hmainid, string hsubid, string user)
+        {
+            DataSet ds;
+            try
+            {
+                //鍒犻櫎鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Gy_SOPBill_Drop", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                if (string.IsNullOrWhiteSpace(hmainid))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "璧勬枡鍐呯爜涓虹┖锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                oCN.BeginTran();//寮�濮嬩簨鍔�
+                ds = oCN.RunProcReturn("select * from Gy_SOPBillSub where HInterID=" + hmainid + " and HEntryID=" + hsubid, "Gy_SOPBillSub");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    oCN.RollBack();
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult; ;
+                }
+
+                oCN.RunProc("delete Gy_SOPBillSub where HInterID=" + hmainid + " and HEntryID=" + hsubid);
+                oCN.RunProc("delete Gy_SOPBillSub2 where HInterID=" + hmainid + " and HEntryID=" + hsubid);
+                oCN.Commit();//鎻愪氦浜嬪姟
+
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "浣滀笟鎸囧涔﹀垹闄ゆ垚鍔燂紒";
+                objJsonResult.data = null;
+                return objJsonResult; ;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
         #region 寮曞嚭
         [Route("Gy_SOPBill/SetExcel")]
         [HttpGet]
@@ -207,7 +272,6 @@
             return response;
         }
         #endregion
-
 
         //
         private Int32 Fun_GetCol(string sCol)

--
Gitblit v1.9.1