| | |
| | | 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> |
| | |
| | | [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); |
| | | } |
| | | string content = _invokeERPService.InvokeCheckOrderApi(model.Content); |
| | | ErpRequestContent requestContent = content.DeserializeObject<ErpRequestContent>(); |
| | | if (requestContent.res != 1) |