chengsc
2024-10-14 b31f32fbfb25c77567e3853e05ca114dd2a00fbe
Wms/Wms/Controllers/BllAsnController.cs
@@ -996,6 +996,32 @@
            }
        }
        
        //编辑标签数量
        [HttpPost]
        public IActionResult EditLabelQty(EditLabelQtyVm model)
        {
            try
            {
                //获取当前登录的用户ID
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                if (claimsIdentity == null)
                {
                    return Ok(new { code = 1, msg = "未获取到当前操作人信息" });
                }
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                if (string.IsNullOrWhiteSpace(userId))
                {
                    return Ok(new { code = 1, msg = "未获取到当前操作人信息" });
                }
                _BoxInfoSvc.EditLabelQty(model.Id, model.Qty, int.Parse(userId));
                return Ok(new { code = 0, msg = "编辑成功", data = "" });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, count = 0, msg = e.Message });
            }
        }
        #endregion
    }