yusijie
2023-04-16 8ca386af2fd1e27d274b6ba656843c73e52ea6d4
条码批量删除
1个文件已修改
24 ■■■■■ 已修改文件
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -598,9 +598,16 @@
        /// </summary>
        /// <returns></returns>
        [Route("Gy_MaterialController/DeltetBarCodeBill")]
        [HttpGet]
        public object DeltetBarCodeBill(string HInterID, string user)
        [HttpPost]
        public object DeltetBarCodeBill([FromBody] JObject oData)
        {
            var _value = oData["oData"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string HInter = sArray[0].ToString();
            string HInterID = HInter.Replace("\"", "");
            string user = sArray[1].ToString();
            //编辑权限
            if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBillList_Edit", 1, false, user))
            {
@@ -613,9 +620,9 @@
            try
            {
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);
                if (lngBillKey == 0)
                //Int64 lngBillKey = 0;
                //lngBillKey = DBUtility.ClsPub.isLong(HInterID);
                if (HInterID == "")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -624,11 +631,11 @@
                    return objJsonResult;
                }
                DataSet Ds;
                Ds = oCN.RunProcReturn("Select * from h_v_IF_BarCodeBillList Where HItemID=" + lngBillKey.ToString(), "h_v_IF_BarCodeBillList");
                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=" + lngBillKey.ToString());
                    oCN.RunProc("Delete from Gy_BarCodeBill Where HItemID in (" + HInterID + ")");
                    oCN.Commit();
                    objJsonResult.code = "1";
@@ -636,8 +643,6 @@
                    objJsonResult.Message = "删除成功";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
@@ -657,7 +662,6 @@
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion