| | |
| | | using System.Dynamic; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.AspNetCore.Mvc.Filters; |
| | | using NewPdaSqlServer.Dto.service; |
| | | using NewPdaSqlServer.entity; |
| | | using NewPdaSqlServer.service.@base; |
| | |
| | | |
| | | [ApiController] |
| | | [Route("api/[controller]")] |
| | | public class WomdaaController : ControllerBase |
| | | public class WomdaaController : BaseController |
| | | { |
| | | private readonly WomdaaManager m = new(); |
| | | private readonly MesPrintMangeer _mCf = new(); |
| | |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetProductionPickDaa001(query); |
| | | resultInfos.tbBillList = m.GetProductionPickDaa001(query, RequestInfo); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | |
| | | [HttpPost("GetItemsByDaa001")] |
| | | public ResponseResult GetItemsByDaa001(WarehouseQuery query) |
| | | { |
| | | // 从 HttpContext.Items 获取 orgId |
| | | var orgId = HttpContext.Request.Headers["OrgId"].ToString(); |
| | | |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetItemsByDaa001(query); |
| | | resultInfos.tbBillList = m.GetItemsByDaa001(query, RequestInfo); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | |
| | | resultInfos.tbBillList.printInfo = _mCf.getPrintInfo(query); |
| | | var scanResult = m.ScanCodeCF(query); |
| | | resultInfos.tbBillList.cfBarInfo = _mCf.getCfInfo(scanResult); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 生产领料点击物料明细获取相关条码信息 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("GetBarKwByItem")] |
| | | public ResponseResult GetBarKwByItem(dynamic unity) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetBarKwByItem(unity); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetXcslDaa(query); |
| | | resultInfos.tbBillList = m.GetXcslDaa(query, RequestInfo); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// AGV呼叫线体列表 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <returns></returns> |
| | | [HttpPost("GetAgvXt")] |
| | | public ResponseResult GetAgvXt([FromBody] dynamic query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetAgvXt(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region pda调用AGV相关 |
| | | /// <summary> |
| | | /// AGV送检 |
| | | /// </summary> |
| | | [HttpPost("handleAGVInspection")] |
| | | public ResponseResult HandleAGVInspection([FromBody] dynamic query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.HandleAGVInspection(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// AGV呼叫 |
| | | /// </summary> |
| | | [HttpPost("handleAGVCall")] |
| | | public ResponseResult HandleAGVCall([FromBody] dynamic query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.HandleAGVCall(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// AGV检验处理 |
| | | /// </summary> |
| | | [HttpPost("handleAgvJy")] |
| | | public ResponseResult HandleAgvJy([FromBody] dynamic query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.HandleAgvJy(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// AGV入立库 |
| | | /// </summary> |
| | | [HttpPost("handleAgvRk")] |
| | | public ResponseResult HandleAgvRk([FromBody] dynamic query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.HandleAgvRk(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | } |