using System.Dynamic;
|
using Microsoft.AspNetCore.Mvc;
|
using NewPdaSqlServer.Dto.service;
|
using NewPdaSqlServer.entity;
|
using NewPdaSqlServer.service.@base;
|
using NewPdaSqlServer.service.Wom;
|
using NewPdaSqlServer.util;
|
|
namespace NewPdaSqlServer.Controllers.@base;
|
|
/// <summary>
|
/// 生产报工相关接口
|
/// </summary>
|
[Route("api/[controller]")]
|
[ApiController]
|
public class MesPrintController : ControllerBase
|
{
|
private readonly MesPrintMangeer _manager = new();
|
|
/// <summary>
|
/// 扫描注塑码,获取工单和条码信息
|
/// </summary>
|
/// <returns></returns>
|
[HttpPost("getPrintInfo")]
|
public ResponseResult getPrintInfo([FromBody] dynamic query)
|
{
|
try
|
{
|
dynamic resultInfos = new ExpandoObject();
|
// 先初始化tbBillList属性
|
resultInfos.tbBillList = new ExpandoObject();
|
resultInfos.tbBillList = _manager.getPrintInfo(query);
|
return new ResponseResult
|
{
|
status = 0,
|
message = "OK",
|
data = resultInfos
|
};
|
}
|
catch (Exception ex)
|
{
|
return ResponseResult.ResponseError(ex);
|
}
|
}
|
|
/// <summary>
|
/// 扫描注塑码,获取工单和条码信息
|
/// </summary>
|
/// <returns></returns>
|
[HttpPost("getCfInfo")]
|
public ResponseResult getCfInfo([FromBody] dynamic query)
|
{
|
try
|
{
|
dynamic resultInfos = new ExpandoObject();
|
// 先初始化tbBillList属性
|
resultInfos.tbBillList = new ExpandoObject();
|
resultInfos.tbBillList = _manager.getCfInfo(query);
|
return new ResponseResult
|
{
|
status = 0,
|
message = "OK",
|
data = resultInfos
|
};
|
}
|
catch (Exception ex)
|
{
|
return ResponseResult.ResponseError(ex);
|
}
|
}
|
|
}
|