using Microsoft.AspNetCore.Mvc; using WIDESEA_Core; using WIDESEA_Core.BaseController; using WIDESEA_DTO.Outbound; using WIDESEA_IOutboundService; using WIDESEA_Model.Models; namespace WIDESEA_WMSServer.Controllers.Outbound { [Route("api/OutboundPicking")] [ApiController] public class OutboundPickingController : ApiBaseController { private readonly ISplitPackageService _splitPackageService; private readonly IOutStockLockInfoService _outStockLockInfoService; public OutboundPickingController(IOutboundPickingService service, ISplitPackageService splitPackageService, IOutStockLockInfoService outStockLockInfoService) : base(service) { _splitPackageService = splitPackageService; _outStockLockInfoService = outStockLockInfoService; } /// /// 获取托盘的出库状态 /// [HttpGet("GetPalletOutboundStatus")] public async Task GetPalletOutboundStatus(string palletCode) { return await Service.GetPalletOutboundStatus(palletCode); } /// /// 获取托盘的锁定信息 /// [HttpGet("GetPalletLockInfos")] public async Task GetPalletLockInfos(string palletCode) { var lockInfos = await _outStockLockInfoService.GetPalletLockInfos(palletCode); return WebResponseContent.Instance.OK(null, lockInfos); } /// /// 拣选确认 /// [HttpPost("ConfirmPicking")] public async Task ConfirmPicking([FromBody] PickingConfirmRequest request) { return await Service.ConfirmPicking(request); } /// /// 拆包操作 /// [HttpPost("SplitPackage")] public async Task SplitPackage([FromBody] SplitPackageRequest request) { return await _splitPackageService.SplitPackage(request); } ///// ///// 直接出库 ///// //[HttpPost("DirectOutbound")] //public async Task DirectOutbound([FromBody] DirectOutboundRequest request) //{ // return await Service.DirectOutbound(request); //} /// /// 获取拣选历史 /// [HttpGet("GetPickingHistory")] public async Task GetPickingHistory(int orderId) { var history = await Service.GetPickingHistory(orderId); return WebResponseContent.Instance.OK(null, history); } /// /// 撤销拣选 /// [HttpPost("CancelPicking")] public async Task CancelPicking([FromBody] CancelPickingRequest request) { return await Service.CancelPicking(request); } } }