wxw
3 天以前 9335b068994ded46e7844d81967a12eb652f77ef
Wms/Wms/Controllers/BllAsnController.cs
@@ -1047,8 +1047,66 @@
                return Ok(new { code = 1, count = 0, msg = e.Message });
            }
        }
        /// <summary>
        /// 拆分箱码标签
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult ChaiLableBox(LabelOperVm 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.ChaiLableBox(model.BoxNo, model.ChaiQty, int.Parse(userId));
                return Ok(new { code = 0, msg = "操作成功", data = "" });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, count = 0, msg = e.Message });
            }
        }
        /// <summary>
        /// 合并箱码标签
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult MergeLableBox(LabelOperVm 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.MergeLableBox(model.BoxNo, model.BoxNo2, int.Parse(userId));
                return Ok(new { code = 0, msg = "操作成功", data = "" });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, count = 0, msg = e.Message });
            }
        }
        #endregion
        #region 数据归档