baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
+128
@@ -0,0 +1,128 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json.Linq;
|
||||
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.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.WebApi.Controllers.WMS
|
||||
{
|
||||
/// <summary>
|
||||
/// WMS基本资料信息
|
||||
/// </summary>
|
||||
[Authorize]
|
||||
public class SelBillController : BaseApiController<SelBillController>
|
||||
{
|
||||
private readonly ISelBillService service;
|
||||
public SelBillController(IMapper mapper, ILogger<SelBillController> logger, ISelBillService Service)
|
||||
:base(mapper, logger)
|
||||
{
|
||||
service = Service;
|
||||
}
|
||||
/// <summary>
|
||||
/// 查询出入库流程配置
|
||||
/// </summary>
|
||||
/// <param name="fNO"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<BaseResponse<List<BOS_SELBILL>>> QuerySelBill(string orgID,string fNO)
|
||||
{
|
||||
return await TryProcess(async input =>
|
||||
{
|
||||
return await service.QuerySelBill(orgID, fNO);
|
||||
}, LoginInfo);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 扫描源单编号,查询源单信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<BaseResponse<List<object>>> QuerySourceBillInfo([FromBody]JObject data)
|
||||
{
|
||||
return await TryProcess(async input =>
|
||||
{
|
||||
RetMessage retMess= await service.QuerySourceBillInfo(data);
|
||||
if (retMess == null || retMess.Status == 0)
|
||||
{
|
||||
throw new O3AppException(retMess.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new List<object> { retMess.Data["data1"], retMess.Data["data2"] };
|
||||
}
|
||||
}, LoginInfo);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 扫描条码信息,验证条码状态
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<BaseResponse<object>> QueryBarCode([FromBody]JObject data)
|
||||
{
|
||||
return await TryProcess(async input =>
|
||||
{
|
||||
RetMessage retMess = await service.QueryBarCode(data);
|
||||
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]
|
||||
public async Task<BaseResponse<object>> QueryStockData([FromBody] JObject data)
|
||||
{
|
||||
return await TryProcess(async input =>
|
||||
{
|
||||
RetMessage retMess = await service.QueryStockData(data);
|
||||
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]
|
||||
public async Task<BaseResponse<object>> QueryStockStatus([FromBody] JObject data)
|
||||
{
|
||||
return await TryProcess(async input =>
|
||||
{
|
||||
RetMessage retMess = await service.QueryStockStatus(data);
|
||||
if (retMess == null || retMess.Status == 0)
|
||||
{
|
||||
throw new O3AppException(retMess.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
return retMess.Data["data"];
|
||||
}
|
||||
}, LoginInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user