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.
 
 
 
 
 
 

58 lines
1.5 KiB

using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Application.Contracts;
namespace Win_in.Sfs.Wms.Pda.Controllers.Stores;
/// <summary>
///
/// </summary>
[ApiController]
[Route($"{PdaHostConst.ROOT_ROUTE}store/issue")]
public class IssueNoteController : AbpController
{
private readonly IIssueNoteAppService _issueNoteAppService;
/// <summary>
///
/// </summary>
/// <param name="issueNoteAppService"></param>
public IssueNoteController(IIssueNoteAppService issueNoteAppService)
{
_issueNoteAppService = issueNoteAppService;
}
/// <summary>
/// 创建发料记录
/// </summary>
/// <returns></returns>
[HttpPost("")]
public virtual async Task CreateAsync([FromBody] IssueNoteEditInput input)
{
input.RequestType = EnumMaterialRequestType.Direct_Issue.ToString();
input.Details.ForEach(p =>
{
p.ToLot = string.Empty;
p.ToPackingCode = string.Empty;
});
await _issueNoteAppService.CreateAsync(input).ConfigureAwait(false);
}
/// <summary>
/// 确认发料记录
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost("confirm/{id}")]
public virtual async Task<IssueNoteDTO> ConfirmAsync(Guid id)
{
return await _issueNoteAppService.ConfirmAsync(id).ConfigureAwait(false);
}
}