using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
using Win_in.Sfs.Wms.Pda.Models;
using Win_in.Sfs.Wms.Store.Application.Contracts;
namespace Win_in.Sfs.Wms.Pda.Controllers.Lpns;
///
///
///
[ApiController]
[Route($"{PdaHostConst.ROOT_ROUTE}stock/pallet")]
public class PalletBindNoteController : AbpController
{
private readonly IContainerBindNoteAppService _containerBindNoteAppService;
///
///
///
///
public PalletBindNoteController(IContainerBindNoteAppService containerBindNoteAppService)
{
_containerBindNoteAppService = containerBindNoteAppService;
}
///
/// 根据code获取器具绑定信息
///
///
///
[HttpGet("")]
public virtual async Task GetAsync(string code)
{
return await _containerBindNoteAppService.GetByCodeAsync(code).ConfigureAwait(false);
}
///
/// 绑定
///
///
///
[HttpPost("bind")]
public virtual async Task BindAsync(ContainerBindingInput input)
{
return await _containerBindNoteAppService.BindAsync(input.InstrumentCode, input.PackingCodes).ConfigureAwait(false);
}
///
/// 解绑
///
///
///
[HttpPost("unbind")]
public virtual async Task UnbindAsync(ContainerBindingInput input)
{
return await _containerBindNoteAppService.UnbindAsync(input.InstrumentCode, input.PackingCodes).ConfigureAwait(false);
}
///
/// 清空绑定
///
///
///
[HttpPost("empty")]
public virtual async Task EmptyAsync(ContainerBindingInput input)
{
return await _containerBindNoteAppService.EmptyAsync(input.InstrumentCode).ConfigureAwait(false);
}
}