| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using NewPdaSqlServer.Dto.service; |
| | | using NewPdaSqlServer.entity; |
| | | using NewPdaSqlServer.service.@base; |
| | | using NewPdaSqlServer.service.Warehouse; |
| | | using NewPdaSqlServer.util; |
| | | |
| | |
| | | public class MesCgthSqController : ControllerBase |
| | | { |
| | | private readonly MesCgthSqManager m = new(); |
| | | private readonly MesPrintMangeer _mCf = new(); |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.ScanCode(query); |
| | | if (resultInfos.tbBillList.result == "2") |
| | | { |
| | | return new ResponseResult |
| | | { |
| | | status = Convert.ToInt32(resultInfos.tbBillList.result), |
| | | message = resultInfos.tbBillList.strMsg, |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | [HttpPost("ScanCodeCF")] |
| | | public ResponseResult ScanCodeCF(WarehouseQuery query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = new ExpandoObject(); |
| | | resultInfos.tbBillList.printInfo = _mCf.getPrintInfo(query); |
| | | var scanResult = m.ScanCodeCF(query); |
| | | resultInfos.tbBillList.cfBarInfo = _mCf.getCfInfo(scanResult); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |