Administrator
2024-02-21 87d55df7b7446d7c4c3532a2dd2e78f72574e34b
Wms/Wms/Controllers/PdaAsnController.cs
@@ -383,6 +383,26 @@
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        /// <summary>
        /// 验证储位(地码)是否可用
        /// </summary>
        /// <param name="model">LocatNo储位地址</param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult CheckLocatNo(PalletBindVm model)
        {
            try
            {
                var result = _PdaAsnSvc.CheckLocatNo(model.LocatNo);
                return Ok(new { code = 0, msg = "验证成功!", data = result });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        #endregion
        #region 零箱入库
@@ -462,7 +482,20 @@
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        [HttpPost]
        public IActionResult GetBindArrivalNoticeDetails(ArrivalNoticeVm model)
        {
            try
            {
                var models = _PdaAsnSvc.GetBindArrivalNoticeDetails(model);
                return Ok(new { code = 0, msg = "入库单明细信息", data = models });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        /// <summary>
        /// 绑定托盘
@@ -495,5 +528,38 @@
            }
        }
        #endregion
        #region 平库入库
        /// <summary>
        /// 平库确认入库
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult ConfirmInStock(PalletBindVm 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("未获取到用户信息");
                }
                model.CreateUser = int.Parse(UserId);
                _PdaAsnSvc.ConfirmInStock(model);
                return Ok(new { code = 0, msg = "入库成功!" });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        #endregion
    }
}