79 lines
2.5 KiB
C#
Executable File
79 lines
2.5 KiB
C#
Executable File
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
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.Filters;
|
|
using Opsoft.NetCore.O3App.WebApi.Models;
|
|
|
|
namespace Opsoft.NetCore.O3App.WebApi.Controllers.WMS
|
|
{
|
|
/// <summary>
|
|
/// 委外领料/委外退料
|
|
/// </summary>
|
|
[Authorize]
|
|
public class SUBPICKMTRLController : BaseApiController<SelBillController>
|
|
{
|
|
private readonly ISUBPICKMTRLService service;
|
|
public SUBPICKMTRLController(IMapper mapper, ILogger<SelBillController> logger, ISUBPICKMTRLService SUBPICKMTRLService)
|
|
: base(mapper, logger)
|
|
{
|
|
service = SUBPICKMTRLService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 委外领料
|
|
/// </summary>
|
|
/// <param name="data"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Idempotent]
|
|
public async Task<BaseResponse<object>> SUBPICKMTRL([FromBody] InputBarCode<BD_BARCODERS2> request)
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
RetMessage retMess = await service.SUBPICKMTRL(request);
|
|
if (retMess == null || retMess.Status == 0)
|
|
{
|
|
throw new O3AppException(retMess.Message);
|
|
}
|
|
else
|
|
{
|
|
return retMess.Data["data"];
|
|
}
|
|
}, LoginInfo);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 委外退料
|
|
/// </summary>
|
|
/// <param name="data"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Idempotent]
|
|
public async Task<BaseResponse<object>> SUBRETURNMTRL([FromBody] InputBarCode<BD_BARCODERS2> request)
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
RetMessage retMess = await service.SUBRETURNMTRL(request);
|
|
if (retMess == null || retMess.Status == 0)
|
|
{
|
|
throw new O3AppException(retMess.Message);
|
|
}
|
|
else
|
|
{
|
|
return retMess.Data["data"];
|
|
}
|
|
}, LoginInfo);
|
|
}
|
|
|
|
|
|
}
|
|
}
|