using System.Dynamic;
|
using Microsoft.AspNetCore.Mvc;
|
using NewPdaSqlServer.Dto.service;
|
using NewPdaSqlServer.service.@base;
|
using NewPdaSqlServer.service.Warehouse;
|
using NewPdaSqlServer.util;
|
|
namespace NewPdaSqlServer.Controllers.Warehouse;
|
|
/// <summary>
|
/// 托板码绑定相关接口
|
/// </summary>
|
[Route("api/[controller]")]
|
[ApiController]
|
public class tbbdController : BaseController
|
{
|
private readonly tbbdManager _manager = new();
|
|
private readonly MesPrintMangeer _mCf = new();
|
|
|
/// <summary>
|
/// 获取当前托板所有已经绑定的条码明细
|
/// </summary>
|
/// <returns>条码明细列表</returns>
|
[HttpPost("GetBracodeDetails")]
|
public ResponseResult GetBracodeDetails([FromBody] TbBarcodeQuery query)
|
{
|
try
|
{
|
dynamic resultInfos = new ExpandoObject();
|
resultInfos.tbBillList = _manager.GetBracodeDetails(query);
|
return new ResponseResult
|
{
|
status = 0,
|
message = "OK",
|
data = resultInfos
|
};
|
}
|
catch (Exception ex)
|
{
|
return ResponseResult.ResponseError(ex);
|
}
|
}
|
|
/// <summary>
|
/// 获取当前托板所有已经绑定的条码明细
|
/// </summary>
|
/// <returns>条码明细列表</returns>
|
[HttpPost("ScanTBBD")]
|
public ResponseResult ScanTBBD([FromBody] TbBarcodeQuery query)
|
{
|
try
|
{
|
dynamic resultInfos = new ExpandoObject();
|
resultInfos.tbBillList = _manager.ScanTBBD(query);
|
return new ResponseResult
|
{
|
status = 0,
|
message = "OK",
|
data = resultInfos
|
};
|
}
|
catch (Exception ex)
|
{
|
return ResponseResult.ResponseError(ex);
|
}
|
}
|
|
|
}
|