baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
+96
@@ -0,0 +1,96 @@
|
||||
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 PickMtrlController : BaseApiController<SelBillController>
|
||||
{
|
||||
private readonly IPickMtrlService _pickMtrlService;
|
||||
public PickMtrlController(IMapper mapper, ILogger<SelBillController> logger,IPickMtrlService pickMtrlService)
|
||||
:base(mapper, logger)
|
||||
{
|
||||
_pickMtrlService = pickMtrlService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生产领料提交
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Idempotent]
|
||||
public async Task<BaseResponse<object>> PickMtrlSubmit([FromBody] InputBarCode<BD_BARCODERS2> request)
|
||||
{
|
||||
return await TryProcess(async input =>
|
||||
{
|
||||
RetMessage retMsg = await _pickMtrlService.PickMtrlSubmit(request);
|
||||
if (retMsg == null || retMsg.Status == 0)
|
||||
{
|
||||
throw new O3AppException(retMsg.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
return retMsg.Data["data"];
|
||||
}
|
||||
}, LoginInfo);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生产退料提交
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Idempotent]
|
||||
public async Task<BaseResponse<object>> ReturnMtrlSubmit([FromBody] InputBarCode<BD_BARCODERS2> request)
|
||||
{
|
||||
return await TryProcess(async input =>
|
||||
{
|
||||
RetMessage retMsg = await _pickMtrlService.ReturnMtrlSubmit(request);
|
||||
if (retMsg == null || retMsg.Status == 0)
|
||||
{
|
||||
throw new O3AppException(retMsg.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
return retMsg.Data["data"];
|
||||
}
|
||||
}, LoginInfo);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 生产补料提交
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Idempotent]
|
||||
public async Task<BaseResponse<object>> FeedMtrlSubmit([FromBody] InputBarCode<BD_BARCODERS2> request)
|
||||
{
|
||||
return await TryProcess(async input =>
|
||||
{
|
||||
RetMessage retMsg = await _pickMtrlService.FeedMtrlSubmit(request);
|
||||
if (retMsg == null || retMsg.Status == 0)
|
||||
{
|
||||
throw new O3AppException(retMsg.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
return retMsg.Data["data"];
|
||||
}
|
||||
}, LoginInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user