using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Opsoft.NetCore.O3App.Domain; using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices; using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model; using Opsoft.NetCore.O3App.Shared; using Opsoft.NetCore.O3App.WebApi.Models; using System.Threading.Tasks; namespace Opsoft.NetCore.O3App.WebApi.Controllers.WMS { /// /// 调拨管理 /// [Authorize] public class STKTransferController : BaseApiController { private readonly ISTKTransferService service; public STKTransferController(IMapper mapper, ILogger logger, ISTKTransferService Service) : base(mapper, logger) { service = Service; } [HttpPost] public async Task> STKTransferSubmit([FromBody] InputBarCode request) { return await TryProcess(async input => { RetMessage retMess = await service.STKTransferSubmit(request); if (retMess == null || retMess.Status == 0) { throw new O3AppException(retMess.Message); } else { return retMess.Data["data"]; } }, LoginInfo); } } }