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; /// /// 上架请求 /// [ApiController] [Route($"{PdaHostConst.ROOT_ROUTE}note/put-away")] public class PutawayNoteController : AbpController { private readonly IPutawayNoteAppService _PutawayNoteAppService; private readonly IUserWorkGroupAppService _userWorkGroupAppService; /// /// /// /// /// public PutawayNoteController( IUserWorkGroupAppService userWorkGroupAppService, IPutawayNoteAppService PutawayNoteAppService) { _userWorkGroupAppService = userWorkGroupAppService; _PutawayNoteAppService = PutawayNoteAppService; } /// /// 【创建】采购收货 上架记录 直接上架 /// /// /// [UnitOfWork] [HttpPost("by-purchase")] public virtual async Task CreateByPurchaseAsync([FromBody] PutawayNoteEditInput input) { input.Type = EnumPutawayType.PurchasePutaway; return await _PutawayNoteAppService.CreateAsync(input).ConfigureAwait(false); } /// /// 【创建】半成品 上架记录 直接上架 /// /// /// [UnitOfWork] [HttpPost("by-semi")] public virtual async Task CreateBySemiAsync([FromBody] PutawayNoteEditInput input) { input.Type = EnumPutawayType.SemiPutaway; return await _PutawayNoteAppService.CreateAsync(input).ConfigureAwait(false); } /// /// 【检查】【采购收货上架】 /// /// /// /// [UnitOfWork] [HttpPost("check-by-purchase")] public virtual async Task CheckByPurchaseAsync([FromBody] PutawayNoteEditInput input) { await _PutawayNoteAppService.CheckByPurchaseAsync(input).ConfigureAwait(false); } /// /// 【检查】【半成品上架】 /// /// /// /// [UnitOfWork] [HttpPost("check-by-semi")] public virtual async Task CheckBySemiAsync([FromBody] PutawayNoteEditInput input) { await _PutawayNoteAppService.CheckByPurchaseAsync(input).ConfigureAwait(false); } }