wxw
2024-12-28 6cd2a2d6991f13ac11796abd11d61c098cdd3ce1
Wms/Wms/Controllers/StatisticalController.cs
@@ -98,11 +98,11 @@
        /// <param name="inspectStatus">质量状态</param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetBindList(string skuNo, string skuName, string palletNo, string lotNo, string boxNo, string status, string inspectMark, string bitPalletMark, string bitBoxMark, string inspectStatus, string ownerNo, string ownerName,string startTime,string endTIme)
        public IActionResult GetBindList(string wareHouseName,string areaName,string locatNo,string palletNo, string lotNo)
        {
            try
            {
                List<StockDetailDto> boxInfoList = _stockDetail.GetBindList(skuNo, skuName, palletNo, lotNo, boxNo, status, inspectMark, bitPalletMark, bitBoxMark, inspectStatus, ownerNo, ownerName, startTime, endTIme);
                List<StockDetailDto> boxInfoList = _stockDetail.GetBindList(wareHouseName,areaName,locatNo,palletNo, lotNo);
                return Ok(new { data = boxInfoList, code = 0, msg = "获取托盘明细成功" });
            }
            catch (Exception e)
@@ -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, model.SkuNo, model.SkuName, model.LotNo, int.Parse(userId));
                return Ok(new { code = 0, count = 0, msg = "添加成功", data = "" });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        #endregion
    }
}