chengsc
2 天以前 aec8fb5f857231f10dc4a58fc86ecdac2b5d6250
Wms/Wms/Controllers/PdaCrController.cs
@@ -368,5 +368,90 @@
        #endregion
        #region 物料拆托
        /// <summary>
        /// 查询箱信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetBoxInfo(PdaUpPalletVm model)
        {
            try
            {
                _pdaCrSvc.GetBoxInfo(model.BoxNo, model.PalletNo);
                return Ok(new { data = "", code = 0, msg = "成功" });
            }
            catch (Exception e)
            {
                return Ok(new { data = "", code = 1, msg = $"异常:{e.Message}" });
            }
        }
        /// <summary>
        /// 物料拆托
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult UpPalletByBox(PdaUpPalletVm model)
        {
            try
            {
                _pdaCrSvc.UpPalletByBox(model.BoxNo, model.PalletNo,model.PalletNoNew,_userManager.UserId);
                return Ok(new { data = "", code = 0, msg = "成功" });
            }
            catch (Exception e)
            {
                return Ok(new { data = "", code = 1, msg = $"异常:{e.Message}" });
            }
        }
        /// <summary>
        /// 根据托盘获取托盘上的物料批次信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetSelectSkuLotNo(PdaUpPalletVm model)
        {
            try
            {
                var list = _pdaCrSvc.GetSelectSkuLotNo(model.PalletNo);
                return Ok(new { data = list, code = 0, msg = "成功" });
            }
            catch (Exception e)
            {
                return Ok(new { data = "", code = 1, msg = $"异常:{e.Message}" });
            }
        }
        /// <summary>
        /// 物料拆托 - 数量页签
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult UpPalletByQty(PdaUpPalletVm model)
        {
            try
            {
                _pdaCrSvc.UpPalletByQty(model.PalletNo, model.PalletNoNew, model.DetailId,model.Qty, _userManager.UserId);
                return Ok(new { data = "", code = 0, msg = "成功" });
            }
            catch (Exception e)
            {
                return Ok(new { data = "", code = 1, msg = $"异常:{e.Message}" });
            }
        }
        #endregion
    }
}