| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using NewPdaSqlServer.Dto.service; |
| | | using NewPdaSqlServer.entity; |
| | | using NewPdaSqlServer.service.@base; |
| | | using NewPdaSqlServer.service.Wom; |
| | | using NewPdaSqlServer.util; |
| | | |
| | |
| | | public class WomdaaController : ControllerBase |
| | | { |
| | | private readonly WomdaaManager m = new(); |
| | | private readonly MesPrintMangeer _mCf = new(); |
| | | |
| | | #region 生产领料 |
| | | |
| | |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.ScanCodeCF(query); |
| | | 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, |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 核对送检 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("submitInspection")] |
| | | public ResponseResult submitInspection([FromBody] dynamic query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | // 先初始化tbBillList属性 |
| | | resultInfos.tbBillList = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.SubmitKbInspection(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | //GetItemsXcsl |
| | | /// <summary> |
| | | /// 根据工单号获取待收料物料明细 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("GetItemsXcsl")] |
| | | public ResponseResult GetItemsXcsl(WarehouseQuery query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetItemsXcsl(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | |
| | | //GetItemsXcsl |
| | | /// <summary> |
| | | /// 物料条码收料 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("ScanXcsl")] |
| | | public ResponseResult ScanXcsl(dynamic query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.ScanXcsl(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | //GetItemsXcsl |
| | | /// <summary> |
| | | /// 根据线体获取仪器重量 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("GetWeightByXt")] |
| | | public ResponseResult GetWeightByXt(dynamic query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetWeightByXt(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 现场收料获取可选工单信息 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <returns></returns> |
| | | [HttpPost("GetXcslDaa")] |
| | | public ResponseResult GetXcslDaa([FromBody] dynamic query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetXcslDaa(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | |
| | | //GetItemsXctl |
| | | /// <summary> |
| | | /// 根据工单号获取待投料物料明细 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("GetItemsXctl")] |
| | | public ResponseResult GetItemsXctl(WarehouseQuery query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetItemsXctl(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | //GetItemsXcsl |
| | | /// <summary> |
| | | /// 物料条码投料 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("ScanXctl")] |
| | | public ResponseResult ScanXctl(dynamic query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.ScanXctl(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | } |