baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
+116
@@ -0,0 +1,116 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
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;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.WebApi.Controllers.WMS
|
||||
{
|
||||
public class CallMaterialController : BaseApiController<CallMaterialController>
|
||||
{
|
||||
private ICallMaterialService _callMaterialService;
|
||||
public CallMaterialController(IMapper mapper, ILogger<CallMaterialController> logger, ICallMaterialService callMaterialService) : base(mapper, logger)
|
||||
{
|
||||
_callMaterialService = callMaterialService;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<BaseResponse> GetCallBillInfo([FromBody] GetCallMaterialBillInfoPara para)
|
||||
{
|
||||
return await TryProcess(async input =>
|
||||
{
|
||||
RetMessage retMsg =
|
||||
await _callMaterialService.GetCallBillInfo(para);
|
||||
|
||||
if (retMsg == null || retMsg.Status == 0)
|
||||
{
|
||||
throw new O3AppException(retMsg.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
return retMsg.Data["data"];
|
||||
}
|
||||
}, LoginInfo);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<BaseResponse> CallMaterialSubmit([FromBody] List<CallMaterialSubmitHead> callBills)
|
||||
{
|
||||
return await TryProcess(async input =>
|
||||
{
|
||||
RetMessage retMsg =
|
||||
await _callMaterialService.CallMaterialSubmit(callBills);
|
||||
|
||||
if (retMsg == null || retMsg.Status == 0)
|
||||
{
|
||||
throw new O3AppException(retMsg.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
return retMsg.Data["data"];
|
||||
}
|
||||
}, LoginInfo);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<BaseResponse> CallMaterialQueryBarcode([FromQuery] string barcode)
|
||||
{
|
||||
return await TryProcess(async input =>
|
||||
{
|
||||
RetMessage retMsg =
|
||||
await _callMaterialService.CallMaterialQueryBarcode(barcode);
|
||||
|
||||
if (retMsg == null || retMsg.Status == 0)
|
||||
{
|
||||
throw new O3AppException(retMsg.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
return retMsg.Data["data"];
|
||||
}
|
||||
}, LoginInfo);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<BaseResponse> StartSend([FromQuery] string billNo)
|
||||
{
|
||||
return await TryProcess(async input =>
|
||||
{
|
||||
RetMessage retMsg =
|
||||
await _callMaterialService.StartSend(billNo);
|
||||
|
||||
if (retMsg == null || retMsg.Status == 0)
|
||||
{
|
||||
throw new O3AppException(retMsg.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
return retMsg.Data["data"];
|
||||
}
|
||||
}, LoginInfo);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<BaseResponse> SendTo([FromBody] List<string> billNo)
|
||||
{
|
||||
return await TryProcess(async input =>
|
||||
{
|
||||
RetMessage retMsg =
|
||||
await _callMaterialService.SendTo(billNo);
|
||||
|
||||
if (retMsg == null || retMsg.Status == 0)
|
||||
{
|
||||
throw new O3AppException(retMsg.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
return retMsg.Data["data"];
|
||||
}
|
||||
}, LoginInfo);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user