| | |
| | | using System.Dynamic; |
| | | using Masuit.Tools.Win32.AntiVirus; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using NewPdaSqlServer.Dto.service; |
| | | using NewPdaSqlServer.entity; |
| | | using NewPdaSqlServer.service.@base; |
| | | using NewPdaSqlServer.service.Warehouse; |
| | | using NewPdaSqlServer.util; |
| | | using static Microsoft.EntityFrameworkCore.DbLoggerCategory; |
| | | |
| | | namespace NewPdaSqlServer.Controllers.Warehouse; |
| | | |
| | |
| | | public class MesBarCFController : ControllerBase |
| | | { |
| | | private readonly MesBarCFManager m = new(); |
| | | |
| | | private readonly MesPrintMangeer _mCf = new(); |
| | | |
| | | /// <summary> |
| | | /// 获取条码信息和物料信息 |
| | |
| | | /// 获取条码信息和物料信息 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("GetBarInfoBefore")] |
| | | public ResponseResult GetBarInfoBefore(WarehouseQuery unity) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetBarInfoBefore(unity); |
| | | resultInfos.tbMesItems = m.GetItemNo(resultInfos.tbBillList.ITEM_ID); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取条码信息和物料信息 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("BarCF")] |
| | | public ResponseResult BarCF(WarehouseQuery unity) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.BarCF(unity); |
| | | resultInfos.tbBillList = new ExpandoObject(); |
| | | resultInfos.tbBillList.printInfo = _mCf.getPrintInfo(unity); |
| | | var scanResult = m.BarCF(unity); |
| | | resultInfos.tbBillList.cfBarInfo = _mCf.getCfInfo(scanResult); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = resultInfos.tbBillList, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取条码信息和物料信息 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("BarCfBefore")] |
| | | public ResponseResult BarCfBefore(WarehouseQuery unity) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = new ExpandoObject(); |
| | | resultInfos.tbBillList.printInfo = _mCf.getPrintInfo(unity); |
| | | var scanResult = m.BarCfBefore(unity); |
| | | resultInfos.tbBillList.cfBarInfo = _mCf.getCfBeforeInfo(scanResult); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |