44 lines
1.4 KiB
C#
Executable File
44 lines
1.4 KiB
C#
Executable File
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
|
|
{
|
|
/// <summary>
|
|
/// 调拨管理
|
|
/// </summary>
|
|
[Authorize]
|
|
public class STKTransferController : BaseApiController<STKTransferController>
|
|
{
|
|
private readonly ISTKTransferService service;
|
|
public STKTransferController(IMapper mapper, ILogger<STKTransferController> logger, ISTKTransferService Service)
|
|
: base(mapper, logger)
|
|
{
|
|
service = Service;
|
|
}
|
|
|
|
[HttpPost]
|
|
public async Task<BaseResponse<object>> STKTransferSubmit([FromBody] InputBarCode<BD_BARCODERS2> 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);
|
|
}
|
|
|
|
}
|
|
}
|