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.
 
 
 
 
 
 

66 lines
2.1 KiB

using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
using Win_in.Sfs.Label.Application.Contracts;
namespace Win_in.Sfs.Wms.Pda.Controllers.Lpns;
/// <summary>
///
/// </summary>
[ApiController]
[Route($"{PdaHostConst.ROOT_ROUTE}stock/pack")]
public class LabelController : AbpController
{
private readonly IInventoryLabelAppService _inventoryLabelService;
private readonly IPalletCodeService _palletCodeService;
private readonly ISerialCodeService _serialCodeService;
/// <summary>
///
/// </summary>
/// <param name="inventoryLabelService"></param>
/// <param name="palletCodeService"></param>
/// <param name="serialCodeService"></param>
public LabelController(IInventoryLabelAppService inventoryLabelService,
IPalletCodeService palletCodeService,
ISerialCodeService serialCodeService)
{
_inventoryLabelService = inventoryLabelService;
_palletCodeService = palletCodeService;
_serialCodeService = serialCodeService;
}
/// <summary>
/// 根据code获取原料标签
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
[HttpGet("{code}")]
public virtual async Task<InventoryLabelDto> GetAsync(string code)
{
return await _inventoryLabelService.GetByCodeAsync(code).ConfigureAwait(false);
}
/// <summary>
/// 获取新增箱标签
/// </summary>
/// <param name="qty"></param>
/// <returns></returns>
[HttpPost("add-serial-code-number")]
public virtual async Task<SerialCodeNumberDto> AddSerialCodeNumberAsync(int qty)
{
return await _serialCodeService.AddSerialCodeNumberAsync(qty).ConfigureAwait(false);
}
/// <summary>
/// 获取新增托盘标签
/// </summary>
/// <param name="qty"></param>
/// <returns></returns>
[HttpPost("add-pallet-code-number")]
public virtual async Task<PalletCodeNumberDto> AddPalletCodeNumberAsync(int qty)
{
return await _palletCodeService.AddPalletCodeNumberAsync(qty).ConfigureAwait(false);
}
}