You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.1 KiB
71 lines
2.1 KiB
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;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[ApiController]
|
|
[Route($"{PdaHostConst.ROOT_ROUTE}stock/pallet")]
|
|
|
|
public class PalletBindNoteController : AbpController
|
|
{
|
|
private readonly IContainerBindNoteAppService _containerBindNoteAppService;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="containerBindNoteAppService"></param>
|
|
public PalletBindNoteController(IContainerBindNoteAppService containerBindNoteAppService)
|
|
{
|
|
_containerBindNoteAppService = containerBindNoteAppService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据code获取器具绑定信息
|
|
/// </summary>
|
|
/// <param name="code"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("")]
|
|
public virtual async Task<ContainerBindNoteDTO> GetAsync(string code)
|
|
{
|
|
return await _containerBindNoteAppService.GetByCodeAsync(code).ConfigureAwait(false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 绑定
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("bind")]
|
|
public virtual async Task<ContainerBindNoteDTO> BindAsync(ContainerBindingInput input)
|
|
{
|
|
return await _containerBindNoteAppService.BindAsync(input.InstrumentCode, input.PackingCodes).ConfigureAwait(false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 解绑
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("unbind")]
|
|
public virtual async Task<ContainerBindNoteDTO> UnbindAsync(ContainerBindingInput input)
|
|
{
|
|
return await _containerBindNoteAppService.UnbindAsync(input.InstrumentCode, input.PackingCodes).ConfigureAwait(false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 清空绑定
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("empty")]
|
|
public virtual async Task<ContainerBindNoteDTO> EmptyAsync(ContainerBindingInput input)
|
|
{
|
|
return await _containerBindNoteAppService.EmptyAsync(input.InstrumentCode).ConfigureAwait(false);
|
|
}
|
|
}
|
|
|