From a7d17c8ecf0076d00e1199cfc5ea8e7d44749ac6 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期六, 06 五月 2023 09:17:27 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/BaseSet/Gy_MaterialController.cs |   48 +++++++++++++++++++++++++-----------------------
 1 files changed, 25 insertions(+), 23 deletions(-)

diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 485d949..ebac8df 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -608,17 +608,7 @@
             string HInterID = HInter.Replace("\"", "");
             string user = sArray[1].ToString();
             string HBarCode = sArray[2].ToString().Replace("\"","");
-            string HComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О
-
-            //缂栬緫鏉冮檺
-            if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBillList_Edit", 1, false, user))
-            {
-                objJsonResult.code = "0";
-                objJsonResult.count = 0;
-                objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
-                objJsonResult.data = null;
-                return objJsonResult;
-            }
+            string HComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О           
 
             try
             {
@@ -626,6 +616,16 @@
 
                 string[] NewBarCode;
                 NewBarCode = HBarCode.Split(Convert.ToChar(","));
+
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBill_Del", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 //鍒犻櫎鏉$爜鍓嶈繘琛屽垽鏂�
                 Ds = oCN.RunProcReturn("exec h_p_Gy_BarCodeBill_MulDelete_Before '" + HInterID + "','" + HBarCode + "'", "h_p_Gy_BarCodeBill_MulDelete_Before", ref DBUtility.ClsPub.sExeReturnInfo);
@@ -664,18 +664,20 @@
                 {
                     oCN.BeginTran();
 
-                    ////鑾峰彇绯荤粺鍙傛暟
-                    //string Ret = "";
-                    //if (oSystemParameter.ShowBill(ref Ret))
-                    //{
-                    //    //鍒ゆ柇鏄惁鍙兘鍒犻櫎鑷繁鐢熸垚鐨勬潯鐮�
-                    //    if (oSystemParameter.omodel.BarCode_DeleterAndMakerllustSame != "榫欏北姹介厤") //绯荤粺鍙傛暟                      
-                    //    {
-                            
-                    //    }
-                    //}
-
-                    oCN.RunProc("Delete from Gy_BarCodeBill Where HItemID in (" + HInterID + ")");
+                    //鑾峰彇绯荤粺鍙傛暟
+                    string Ret = "";
+                    if (oSystemParameter.ShowBill(ref Ret))
+                    {
+                        //鍒ゆ柇鏄惁鍙兘鍒犻櫎鑷繁鐢熸垚鐨勬潯鐮�
+                        if (oSystemParameter.omodel.BarCode_DeleterAndMakerMustSame == "Y") //绯荤粺鍙傛暟                      
+                        {
+                            oCN.RunProc("Delete from Gy_BarCodeBill Where HItemID in (" + HInterID + ")" + " and HMaker = '" + user + "'");
+                        }
+                        else
+                        {
+                            oCN.RunProc("Delete from Gy_BarCodeBill Where HItemID in (" + HInterID + ")");
+                        }
+                    }                    
 
                     //鍐欏叆绯荤粺鏃ュ織
                     for (int i = 0; i <= NewBarCode.Length - 1; i++)

--
Gitblit v1.9.1