Demo
2024-02-02 6d4a530d8c9012973eb90a01486e22c3f09a6eb6
Wms/Wms/Controllers/PdaAsnController.cs
@@ -132,37 +132,6 @@
        }
        /// <summary>
        /// 绑定托盘
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult BindPallet(PdaPalletBindVm model)
        {
            try
            {
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                if (claimsIdentity == null)
                {
                    throw new Exception("未获取到用户信息");
                }
                string UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                if (string.IsNullOrWhiteSpace(UserId))
                {
                    throw new Exception("未获取到用户信息");
                }
                _PdaAsnSvc.BindPallet(model, int.Parse(UserId),model.Origin);
                return Ok(new { code = 0, msg = "绑定成功!" });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        /// <summary>
        /// 删除箱子信息
        /// </summary>
        /// <param name="model">Id:箱子主键</param>
@@ -411,7 +380,7 @@
        #endregion
        #region 原料组托
        #region 组托
        /// <summary>
        /// 根据箱码获取标签箱码信息
        /// </summary>
@@ -431,6 +400,38 @@
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        /// <summary>
        /// 绑定托盘
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult BindPallet(PdaPalletBindVm model)
        {
            try
            {
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                if (claimsIdentity == null)
                {
                    throw new Exception("未获取到用户信息");
                }
                string UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                if (string.IsNullOrWhiteSpace(UserId))
                {
                    throw new Exception("未获取到用户信息");
                }
                _PdaAsnSvc.BindPallet(model, int.Parse(UserId), model.Origin);
                return Ok(new { code = 0, msg = "绑定成功!" });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        #endregion
    }
}