yuyou_x
2024-03-06 38d24bdd00d8dd9e416fc5988831ec4b62e696ca
Wms/Wms/Controllers/PdaSoController.cs
@@ -159,7 +159,27 @@
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        /// <summary>
        /// 获取箱码信息(获取库内无箱码的托盘分配信息)
        /// </summary>
        /// <param name="model">BoxNo:箱码号</param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetAllotPlnInfo(PdaSoVm model)
        {
            try
            {
                var models = _pdaSoSvc.GetAllotPlnInfo(model.SoDetailId, model.PalletNo);
                return Ok(new { code = 0, msg = "箱码信息", data = models });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        /// <summary>
        /// 出库pda拣货
@@ -193,6 +213,38 @@
            }
        }
        /// <summary>
        /// 出库pda拣货
        /// </summary>
        /// <param name="model">SoDetailId:出库单明细ID、PalletNo:托盘码</param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult SoSetQtyPick(PdaSoVm model)
        {
            try
            {
                //获取当前登录的用户ID
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                if (claimsIdentity == null)
                {
                    return Ok(new { code = 1, msg = "未获取到当前操作人信息" });
                }
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                if (string.IsNullOrWhiteSpace(userId))
                {
                    return Ok(new { code = 1, msg = "未获取到当前操作人信息" });
                }
                _pdaSoSvc.SoSetQtyPick(model.SoNo, model.SoDetailId, model.PalletNo, model.PickQty,  int.Parse(userId));
                return Ok(new { code = 0, msg = "拣货完成", data = "" });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        /// <summary>
        /// 空托出库