baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
@@ -0,0 +1,77 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WIPBarCode.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WIPBarCode.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using Opsoft.NetCore.O3App.WebApi.Models;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.WebApi.Controllers.WIPBarCode
|
||||
{
|
||||
/// <summary>
|
||||
/// 在制品盘点
|
||||
/// </summary>
|
||||
[Authorize]
|
||||
public class WIPInventoryController : BaseApiController<WIPInventoryController>
|
||||
{
|
||||
private readonly IWIPInventoryService service;
|
||||
public WIPInventoryController(IMapper mapper, ILogger<WIPInventoryController> logger, IWIPInventoryService WIPInventoryService)
|
||||
: base(mapper, logger)
|
||||
{
|
||||
service = WIPInventoryService;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询在制品盘点方案
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<BaseResponse<GetWIPSchemeTo>> GetWIPScheme(GetWIPSchemeFrom SData)
|
||||
{
|
||||
return await TryProcess(async input =>
|
||||
{
|
||||
return await service.GetWIPScheme(SData);
|
||||
}, SData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询条码
|
||||
/// </summary>
|
||||
/// <param name="SData"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<BaseResponse<object>> GetWIPBarcode([FromBody] JObject data)
|
||||
{
|
||||
return await TryProcess(async input =>
|
||||
{
|
||||
RetMessage retMess = await service.GetWIPBarcode(data);
|
||||
if (retMess == null || retMess.Status == 0)
|
||||
{
|
||||
throw new O3AppException(retMess.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
return retMess.Data["data"];
|
||||
}
|
||||
}, data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交按钮
|
||||
/// </summary>
|
||||
/// <param name="SData"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<BaseResponse<object>> UpdateWIPBarcode([FromBody] GetWIPSchemeFrom SData)
|
||||
{
|
||||
return await TryProcess(async input =>
|
||||
{
|
||||
return await service.UpdateWIPBarcode(SData);
|
||||
}, SData);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user