| | |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_External.Model; |
| | | using WIDESEA_External.ERPService; |
| | | using WIDESEA_ICheckService; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.MES |
| | | { |
| | |
| | | private readonly IOutboundService _outboundService; |
| | | private readonly ITaskService _taskService; |
| | | private readonly IInvokeERPService _invokeERPService; |
| | | public MesController(IOutboundService outboundService, ITaskService taskService,IInvokeERPService invokeERPService) |
| | | private readonly ICheckOrderResultService _checkOrderResultService; |
| | | public MesController(IOutboundService outboundService, ITaskService taskService,IInvokeERPService invokeERPService, ICheckOrderResultService checkOrderResultService) |
| | | { |
| | | _outboundService = outboundService; |
| | | _taskService = taskService; |
| | | _invokeERPService = invokeERPService; |
| | | _checkOrderResultService=checkOrderResultService; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | return _taskService.ShipmentOrderSync(model); |
| | | } |
| | | /// <summary> |
| | | /// MES鎴愬搧鍑哄簱鎺ュ彛璋冪敤 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ShipmentOrderMESSync"), AllowAnonymous] |
| | | public WebResponseContent ShipmentOrderMESSync([FromBody] MesShipmentOrderSync model) |
| | | { |
| | | return _taskService.ShipmentOrderMESSync(model); |
| | | } |
| | | /// <summary> |
| | | /// 鎴愬搧杩斿伐鎻愬簱 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | |
| | | [HttpPost, Route("CheckResultReturn"), AllowAnonymous, MethodParamsValidate] |
| | | public MesResponseContent CheckResultReturn([FromBody] Root<ERPCheckModel> model) |
| | | { |
| | | WebResponseContent responseContent = _checkOrderResultService.CommitCheckResult(model.Content); |
| | | if (!responseContent.Status) |
| | | { |
| | | return MesResponseContent.Instance.Error(responseContent.Message); |
| | | } |
| | | model.Content.CreatorCode = "QMS"; |
| | | string content = _invokeERPService.InvokeCheckOrderApi(model.Content); |
| | | ErpRequestContent requestContent = content.DeserializeObject<ErpRequestContent>(); |
| | | if (requestContent.res != 1) |