using System;
|
using System.Threading.Tasks;
|
using Rhea.Common;
|
using Tiger.Model;
|
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Mvc;
|
using Tiger.IBusiness;
|
using Tiger.Model.Entitys.WMS.DTOS;
|
|
namespace Tiger.Api.Controllers.WMS
|
{
|
public partial class WMSController : ControllerBase
|
{
|
/// <summary>
|
/// 盘点单单据生成
|
/// </summary>
|
/// <param name="action"></param>
|
/// <returns></returns>
|
[HttpGet]
|
[Route("api/[controller]/[action]")]
|
public async Task<IActionResult> CreateBillCode()
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(DI.Resolve<IBS>().CreateBillCode());
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
/// <summary>
|
/// 盘点单明细汇总
|
/// </summary>
|
/// <param name="action"></param>
|
/// <returns></returns>
|
[HttpPost]
|
[Route("api/[controller]/[action]")]
|
public async Task<IActionResult> SummaryCount(WMS_COUNT count)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(DI.Resolve<IBS>().SummaryCount(count));
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
/// <summary>
|
/// 盘点单明细生成
|
/// </summary>
|
/// <param name="action"></param>
|
/// <returns></returns>
|
[HttpPost]
|
[Route("api/[controller]/[action]")]
|
public async Task<IActionResult> GenerateCount(WMS_COUNT count)
|
{
|
ApiAction response = new();
|
try
|
{
|
var _data = new StockInputDTO()
|
{
|
site = count.AUTH_ORG,
|
};
|
var data = _stockBus.GetStockInfo(_data);
|
response = response.GetResponse(DI.Resolve<IBS>().GenerateCount(count,data));
|
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
}
|
}
|