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; /// /// /// [ApiController] [Route($"{PdaHostConst.ROOT_ROUTE}stock/pack")] public class LabelController : AbpController { private readonly IInventoryLabelAppService _inventoryLabelService; private readonly IPalletCodeService _palletCodeService; private readonly ISerialCodeService _serialCodeService; /// /// /// /// /// /// public LabelController(IInventoryLabelAppService inventoryLabelService, IPalletCodeService palletCodeService, ISerialCodeService serialCodeService) { _inventoryLabelService = inventoryLabelService; _palletCodeService = palletCodeService; _serialCodeService = serialCodeService; } /// /// 根据code获取原料标签 /// /// /// [HttpGet("{code}")] public virtual async Task GetAsync(string code) { return await _inventoryLabelService.GetByCodeAsync(code).ConfigureAwait(false); } /// /// 获取新增箱标签 /// /// /// [HttpPost("add-serial-code-number")] public virtual async Task AddSerialCodeNumberAsync(int qty) { return await _serialCodeService.AddSerialCodeNumberAsync(qty).ConfigureAwait(false); } /// /// 获取新增托盘标签 /// /// /// [HttpPost("add-pallet-code-number")] public virtual async Task AddPalletCodeNumberAsync(int qty) { return await _palletCodeService.AddPalletCodeNumberAsync(qty).ConfigureAwait(false); } }