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.
88 lines
2.8 KiB
88 lines
2.8 KiB
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Volo.Abp;
|
|
using Volo.Abp.AspNetCore.Mvc;
|
|
using Volo.Abp.Uow;
|
|
using Win_in.Sfs.Auth.Application.Contracts;
|
|
using Win_in.Sfs.Shared.Domain.Shared;
|
|
using Win_in.Sfs.Wms.Store.Application.Contracts;
|
|
|
|
namespace Win_in.Sfs.Wms.Pda.Controllers.Jobs;
|
|
|
|
/// <summary>
|
|
/// 上架请求
|
|
/// </summary>
|
|
[ApiController]
|
|
[Route($"{PdaHostConst.ROOT_ROUTE}note/put-away")]
|
|
|
|
public class PutawayNoteController : AbpController
|
|
{
|
|
private readonly IPutawayNoteAppService _PutawayNoteAppService;
|
|
|
|
private readonly IUserWorkGroupAppService _userWorkGroupAppService;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="userWorkGroupAppService"></param>
|
|
/// <param name="PutawayNoteAppService"></param>
|
|
public PutawayNoteController(
|
|
IUserWorkGroupAppService userWorkGroupAppService, IPutawayNoteAppService PutawayNoteAppService)
|
|
{
|
|
_userWorkGroupAppService = userWorkGroupAppService;
|
|
_PutawayNoteAppService = PutawayNoteAppService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 【创建】采购收货 上架记录 直接上架
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
[UnitOfWork]
|
|
[HttpPost("by-purchase")]
|
|
public virtual async Task<PutawayNoteDTO> CreateByPurchaseAsync([FromBody] PutawayNoteEditInput input)
|
|
{
|
|
input.Type = EnumPutawayType.PurchasePutaway;
|
|
return await _PutawayNoteAppService.CreateAsync(input).ConfigureAwait(false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 【创建】半成品 上架记录 直接上架
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
[UnitOfWork]
|
|
[HttpPost("by-semi")]
|
|
public virtual async Task<PutawayNoteDTO> CreateBySemiAsync([FromBody] PutawayNoteEditInput input)
|
|
{
|
|
input.Type = EnumPutawayType.SemiPutaway;
|
|
return await _PutawayNoteAppService.CreateAsync(input).ConfigureAwait(false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 【检查】【采购收货上架】
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
/// <exception cref="UserFriendlyException"></exception>
|
|
[UnitOfWork]
|
|
[HttpPost("check-by-purchase")]
|
|
public virtual async Task CheckByPurchaseAsync([FromBody] PutawayNoteEditInput input)
|
|
{
|
|
await _PutawayNoteAppService.CheckByPurchaseAsync(input).ConfigureAwait(false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 【检查】【半成品上架】
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
/// <exception cref="UserFriendlyException"></exception>
|
|
[UnitOfWork]
|
|
[HttpPost("check-by-semi")]
|
|
public virtual async Task CheckBySemiAsync([FromBody] PutawayNoteEditInput input)
|
|
{
|
|
await _PutawayNoteAppService.CheckByPurchaseAsync(input).ConfigureAwait(false);
|
|
}
|
|
|
|
}
|
|
|