using Microsoft.AspNetCore.Mvc;
|
using Rhea.Common;
|
using System.Collections.Generic;
|
using System.Threading.Tasks;
|
using Tiger.IBusiness;
|
using Tiger.Model;
|
|
namespace Tiger.Api.Controllers.WMS
|
{
|
public partial class WMSController : ControllerBase
|
{
|
/// <summary>
|
/// 退回删除
|
/// </summary>
|
/// <param name="action"></param>
|
/// <returns></returns>
|
[HttpPost]
|
[Route("api/[controller]/[action]")]
|
public async Task<IActionResult> ReturnSN([FromBody] ApiAction action)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(await DI.Resolve<IMqSNData>().ReturnSN(action.Data?.ToString()));
|
}
|
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> ReturnWhole([FromBody] ApiAction action)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(await DI.Resolve<IMqSNData>().ReturnWhole(action.Data?.ToString()));
|
}
|
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> GetSNDataHis([FromBody] ApiAction<PageAble<SNData_His>> action)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(await DI.Resolve<IMqSNData>().GetSNDataHis(action.Data));
|
}
|
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> GetAllSNData([FromBody] ApiAction<SNDataWhere> action)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(await DI.Resolve<IMqSNData>().GetAllSNData(action.Data));
|
}
|
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> GetAllSNDataHis([FromBody] ApiAction<SNDataWhere> action)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(await DI.Resolve<IMqSNData>().GetAllSNDataHis(action.Data));
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
}
|
}
|