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
{
///
/// WMS基本资料信息
///
[Authorize]
public class SelBillController : BaseApiController
{
private readonly ISelBillService service;
public SelBillController(IMapper mapper, ILogger logger, ISelBillService Service)
:base(mapper, logger)
{
service = Service;
}
///
/// 查询出入库流程配置
///
///
///
[HttpGet]
public async Task>> QuerySelBill(string orgID,string fNO)
{
return await TryProcess(async input =>
{
return await service.QuerySelBill(orgID, fNO);
}, LoginInfo);
}
///
/// 扫描源单编号,查询源单信息
///
///
///
[HttpPost]
public async Task>> 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