yusijie
2023-05-05 97eb1934697f8bd6d16ba1f5547752ab65330836
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++)