From 0bb8fa57f20980f869cb1780a7594ef3ea7d576e Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期三, 11 六月 2025 21:08:27 +0800 Subject: [PATCH] 111 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs | 75 ++++++++++++++++++++++++++++++------- 1 files changed, 61 insertions(+), 14 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs" index 18d085b..6f7f214 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs" @@ -14,6 +14,8 @@ using WIDESEA_Core.Helper; using Autofac.Core; using WIDESEA_DTO.Stock; +using WIDESEA_External.Model; +using WIDESEA_External.ERPService; namespace WIDESEA_WMSServer.Controllers.MES { @@ -26,11 +28,12 @@ { 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> @@ -152,17 +155,7 @@ return _taskService.UploadMesMaterialLotaAcept(model); } /// <summary> - /// 鎴愬搧杩斿伐鎻愬簱 - /// </summary> - /// <param name="model"></param> - /// <returns></returns> - [HttpPost,Route("RworkTask"),AllowAnonymous] - public MesResponseContent RworkTask([FromBody] RworkTaskModel model) - { - return _taskService.RworkTask(model); - } - /// <summary> - /// MES鎴愬搧鍏ュ簱鍗曟帴鏀� + /// MES鎴愬搧鍐呭寘淇℃伅鎺ユ敹 /// </summary> /// <param name="model"></param> /// <returns></returns> @@ -170,6 +163,45 @@ public MesResponseContent BagInfoSync([FromBody] Root<MesBagInfoModel> model) { return _taskService.BagInfoSync(model.Content); + } + /// <summary> + /// MES鎴愬搧澶栧寘淇℃伅鎺ユ敹 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + [HttpPost, Route("BoxStockin"), AllowAnonymous] + public MesResponseContent BoxStockin([FromBody] Root<MesBoxInfoModel> model) + { + return _taskService.BoxStockin(model.Content); + } + /// <summary> + /// MES鎴愬搧鍑哄簱鎺ュ彛璋冪敤 + /// </summary> + /// <returns></returns> + [HttpPost, Route("ShipmentOrderSync"), AllowAnonymous] + public WebResponseContent ShipmentOrderSync([FromBody] MesShipmentOrderSync model) + { + return _taskService.ShipmentOrderSync(model); + } + /// <summary> + /// 鎴愬搧杩斿伐鎻愬簱 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + [HttpPost,Route("RworkTask"),AllowAnonymous] + public MesResponseContent RworkTask([FromBody] Root<RworkTaskModel> 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浠撳ぇ鍗峰嚭搴撲换鍔� @@ -216,6 +248,21 @@ { return _taskService.PPGeneratePKOutboundTask(orderDetailId, stockSelectViews); } - + /// <summary> + /// 妫�楠屽崟鍥炰紶鏇存柊 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + [HttpPost, Route("CheckResultReturn"), AllowAnonymous, MethodParamsValidate] + public MesResponseContent CheckResultReturn([FromBody] Root<ERPCheckModel> model) + { + string content = _invokeERPService.InvokeCheckOrderApi(model.Content); + ErpRequestContent requestContent = content.DeserializeObject<ErpRequestContent>(); + if (requestContent.res != 1) + { + return MesResponseContent.Instance.Error(requestContent.Data); + } + return MesResponseContent.Instance.OK("鎴愬姛"); + } } } -- Gitblit v1.9.3