using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
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.Api;
|
|
namespace Tiger.Api.Controllers.WMS
|
{
|
public partial class WMSController : ControllerBase
|
{
|
/// <summary>
|
/// 扫描拆分
|
/// </summary>
|
/// <param name="action"></param>
|
/// <returns></returns>
|
[HttpPost]
|
[Route("api/[controller]/RP/ScanItem")]
|
public async Task<IActionResult> RP_ScanItemAsync([FromBody] ApiAction<ReprintEntitys> action)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(DI.Resolve<IRePrintBarcode>().ScanItem(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]/RP/ReturnBarcodeRecord")]
|
public async Task<IActionResult> RP_ReturnBarcodeRecordAsync([FromBody] ApiAction<ReturnBarcodeInput> action)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(DI.Resolve<IRePrintBarcode>().ReturnBarcodeRecord(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]/RP/ScanReprintBarcode")]
|
public async Task<IActionResult> RP_ScanReprintBarcodeAsync([FromBody] ApiAction<IncomingInventoryInput> action)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(DI.Resolve<IRePrintBarcode>().ScanReprintBarcode(action.Data));
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
|
[HttpPost]
|
[Route("api/[controller]/RP/ScanReprintBarcodeNew")]
|
public async Task<IActionResult> RP_ScanReprintBarcodeNewAsync([FromBody] ApiAction<IncomingInventoryInput> action)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(DI.Resolve<IRePrintBarcode>().ScanReprintBarcodeNew(action.Data));
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
}
|
}
|