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; /// /// 生产报工相关接口 /// [Route("api/[controller]")] [ApiController] public class MesPrintController : ControllerBase { private readonly MesPrintMangeer _manager = new(); /// /// 扫描注塑码,获取工单和条码信息 /// /// [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); } } /// /// 扫描注塑码,获取工单和条码信息 /// /// [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); } } }