| | |
| | | using WIDESEA_Core.Helper; |
| | | using Autofac.Core; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_External.Model; |
| | | using WIDESEA_External.ERPService; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.MES |
| | | { |
| | |
| | | { |
| | | private readonly IOutboundService _outboundService; |
| | | private readonly ITaskService _taskService; |
| | | |
| | | public MesController(IOutboundService outboundService, ITaskService taskService) |
| | | private readonly IInvokeERPService _invokeERPService; |
| | | public MesController(IOutboundService outboundService, ITaskService taskService,IInvokeERPService invokeERPService) |
| | | { |
| | | _outboundService = outboundService; |
| | | _taskService = taskService; |
| | | _invokeERPService = invokeERPService; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost,Route("RworkTask"),AllowAnonymous] |
| | | public MesResponseContent RworkTask([FromBody] RworkTaskModel model) |
| | | public MesResponseContent RworkTask([FromBody] Root<RworkTaskModel> model) |
| | | { |
| | | return _taskService.RworkTask(model); |
| | | return _taskService.RworkTask(model.Content); |
| | | } |
| | | /// <summary> |
| | | /// åºåæ¿åºåºåæ¥æ¥å£ |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ProductOutBoundSync"), AllowAnonymous] |
| | | public WebResponseContent ProductOutBoundSync([FromBody] MesProductOutBound model) |
| | | { |
| | | return _outboundService.RworkOutboundOrderService.ProductOutBoundSync(model); |
| | | } |
| | | /// <summary> |
| | | /// çæMESPPä»å¤§å·åºåºä»»å¡ |
| | |
| | | { |
| | | return _taskService.PPGeneratePKOutboundTask(orderDetailId, stockSelectViews); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ£éªååä¼ æ´æ° |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("CheckResultReturn"), AllowAnonymous, MethodParamsValidate] |
| | | public MesResponseContent CheckResultReturn([FromBody] ERPCheckModel model) |
| | | { |
| | | string content = _invokeERPService.InvokeCheckOrderApi(model); |
| | | ErpRequestContent requestContent = content.DeserializeObject<ErpRequestContent>(); |
| | | if (requestContent.res != 1) |
| | | { |
| | | return MesResponseContent.Instance.Error(requestContent.Data); |
| | | } |
| | | return MesResponseContent.Instance.OK("æå"); |
| | | } |
| | | } |
| | | } |