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<IOutboundPickingService, Dt_PickingRecord>
|
{
|
private readonly ISplitPackageService _splitPackageService;
|
private readonly IOutStockLockInfoService _outStockLockInfoService;
|
public OutboundPickingController(IOutboundPickingService service, ISplitPackageService splitPackageService, IOutStockLockInfoService outStockLockInfoService) : base(service)
|
{
|
_splitPackageService = splitPackageService;
|
_outStockLockInfoService = outStockLockInfoService;
|
}
|
/// <summary>
|
/// 获取托盘的出库状态
|
/// </summary>
|
[HttpGet("GetPalletOutboundStatus")]
|
public async Task<WebResponseContent> GetPalletOutboundStatus(string palletCode)
|
{
|
return await Service.GetPalletOutboundStatus(palletCode);
|
}
|
|
/// <summary>
|
/// 获取托盘的锁定信息
|
/// </summary>
|
[HttpGet("GetPalletLockInfos")]
|
public async Task<WebResponseContent> GetPalletLockInfos(string palletCode)
|
{
|
var lockInfos = await _outStockLockInfoService.GetPalletLockInfos(palletCode);
|
return WebResponseContent.Instance.OK(null, lockInfos);
|
}
|
|
/// <summary>
|
/// 拣选确认
|
/// </summary>
|
[HttpPost("ConfirmPicking")]
|
public async Task<WebResponseContent> ConfirmPicking([FromBody] PickingConfirmRequest request)
|
{
|
return await Service.ConfirmPicking(request);
|
}
|
|
/// <summary>
|
/// 拆包操作
|
/// </summary>
|
[HttpPost("SplitPackage")]
|
public async Task<WebResponseContent> SplitPackage([FromBody] SplitPackageRequest request)
|
{
|
return await _splitPackageService.SplitPackage(request);
|
}
|
|
///// <summary>
|
///// 直接出库
|
///// </summary>
|
//[HttpPost("DirectOutbound")]
|
//public async Task<WebResponseContent> DirectOutbound([FromBody] DirectOutboundRequest request)
|
//{
|
// return await Service.DirectOutbound(request);
|
//}
|
|
/// <summary>
|
/// 获取拣选历史
|
/// </summary>
|
[HttpGet("GetPickingHistory")]
|
public async Task<WebResponseContent> GetPickingHistory(int orderId)
|
{
|
var history = await Service.GetPickingHistory(orderId);
|
return WebResponseContent.Instance.OK(null, history);
|
}
|
|
/// <summary>
|
/// 撤销拣选
|
/// </summary>
|
[HttpPost("CancelPicking")]
|
public async Task<WebResponseContent> CancelPicking([FromBody] CancelPickingRequest request)
|
{
|
return await Service.CancelPicking(request);
|
}
|
}
|
}
|