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.0 KiB
66 lines
2.0 KiB
namespace Win_in.Sfs.Wms.Pda.Controllers.Inventories;
|
|
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Volo.Abp.AspNetCore.Mvc;
|
|
using Win_in.Sfs.Label.Application.Contracts;
|
|
|
|
/// <summary>
|
|
/// 采购标签控制器
|
|
/// </summary>
|
|
[ApiController]
|
|
[Route($"{PdaHostConst.ROOT_ROUTE}label/inventorylabel")]
|
|
public class InventoryLabelController : AbpController
|
|
{
|
|
private readonly IInventoryLabelAppService _labelAppService;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="labelAppService"></param>
|
|
public InventoryLabelController(
|
|
IInventoryLabelAppService labelAppService)
|
|
{
|
|
this._labelAppService = labelAppService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 按标签号获取采购标签
|
|
/// </summary>
|
|
/// <param name="code">标签号</param>
|
|
/// <returns></returns>
|
|
[HttpGet("by-code")]
|
|
public virtual async Task<InventoryLabelDto> GetByCode(string code)
|
|
{
|
|
return await _labelAppService.GetByCodeAsync(code).ConfigureAwait(false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 生成箱码
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <param name="count"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("generate-and-create/many/{count}")]
|
|
public virtual async Task<List<InventoryLabelDto>> GenerateAndCreateManyAsync(InventoryLabelWithoutCodeCreateInput input, int count)
|
|
{
|
|
return await _labelAppService.GenerateAndCreateManyAsync(input, count).ConfigureAwait(false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// EOF系统接口
|
|
/// 插入箱码记录表、插入拆箱记录表
|
|
/// 是客户箱码,不需要LabelDefine
|
|
/// </summary>
|
|
/// <param name="inputs"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("create-many-no-code-new")]
|
|
public virtual async Task<List<InventoryLabelDto>> CreateManyByNoCode_NewAsync(List<InventoryLabelEditInput> inputs)
|
|
{
|
|
return await _labelAppService.CreateManyByNoCode_NewAsync(inputs).ConfigureAwait(false);
|
|
}
|
|
|
|
|
|
}
|
|
|