zhaowc
2024-06-25 e34f379c22862982c20376c952ab56f9c4ccb163
Wms/Wms/Controllers/StatisticalController.cs
@@ -434,5 +434,39 @@
        }
        #endregion
        #region 二楼业务
        /// <summary>
        /// 添加托盘库存明细
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult InsertStockDetail(StockDetailDto 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("未获取到用户信息");
                }
                _stockDetail.InsertStockDetail(model.PalletNo,model.WareHouseNo,model.AreaNo,model.LocatNo,model.PalletStatus,int.Parse(userId));
                return Ok(new { code = 0, count = 0, msg = "添加成功", data = "" });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        #endregion
    }
}