yusijie
2023-04-23 e674cf9067913a1b621b45ac3560eb4a4d8eed61
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -607,6 +607,8 @@
            string HInter = sArray[0].ToString();
            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))
@@ -620,6 +622,32 @@
            try
            {
                DataSet Ds;
                string[] NewBarCode;
                NewBarCode = HBarCode.Split(Convert.ToChar(","));
                //删除条码前进行判断
                Ds = oCN.RunProcReturn("exec h_p_Gy_BarCodeBill_MulDelete_Before '" + HInterID + "','" + HBarCode + "'", "h_p_Gy_BarCodeBill_MulDelete_Before", ref DBUtility.ClsPub.sExeReturnInfo);
                if (Ds == null || Ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "删除条码前判断发生错误!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0][0]) == "1")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                //Int64 lngBillKey = 0;
                //lngBillKey = DBUtility.ClsPub.isLong(HInterID);
                if (HInterID == "")
@@ -630,13 +658,19 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DataSet Ds;
                Ds = oCN.RunProcReturn("Select * from h_v_IF_BarCodeBillList Where HItemID in (" + HInterID + ")", "h_v_IF_BarCodeBillList");
                if (Ds.Tables[0].Rows.Count != 0)
                {
                    oCN.BeginTran();
                    oCN.RunProc("Delete from Gy_BarCodeBill Where HItemID in (" + HInterID + ")");
                    //写入系统日志
                    for (int i = 0; i <= NewBarCode.Length - 1; i++)
                    {
                        oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "网页版删除条码:" + NewBarCode[i] + "','WMS系统-条码档案列表模块','" + DBUtility.ClsPub.IPAddress + "','删除条码'", ref DBUtility.ClsPub.sExeReturnInfo);
                    }
                    oCN.Commit();
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;