From f7d286cec2a2c6f8eb00a24f2238c86978358d8e Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期五, 17 十月 2025 11:19:41 +0800
Subject: [PATCH] 更新
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs | 81 ++++++++++++++++++++++++++++++++++++----
1 files changed, 73 insertions(+), 8 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 8ccb89d..f6e80fc 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,9 @@
using WIDESEA_Core.Helper;
using Autofac.Core;
using WIDESEA_DTO.Stock;
+using WIDESEA_External.Model;
+using WIDESEA_External.ERPService;
+using WIDESEA_ICheckService;
namespace WIDESEA_WMSServer.Controllers.MES
{
@@ -26,11 +29,14 @@
{
private readonly IOutboundService _outboundService;
private readonly ITaskService _taskService;
-
- public MesController(IOutboundService outboundService, ITaskService taskService)
+ private readonly 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>
@@ -43,7 +49,26 @@
{
return _taskService.TestToolOut(model.Content);
}
-
+ /// <summary>
+ /// 鎺ユ敹MES闃茬剨娲惧伐
+ /// </summary>
+ /// <param name="model"></param>
+ /// <returns></returns>
+ [HttpPost, Route("SolderMaskOutNotice"), AllowAnonymous, MethodParamsValidate]
+ public MesResponseContent SolderMaskOutNotice([FromBody] Root<SolderMaskOutNotice> model)
+ {
+ return _taskService.SolderMaskOutNotice(model.Content);
+ }
+ /// <summary>
+ /// 鎺ユ敹MES闃茬剨鍒扮嚎杈�
+ /// </summary>
+ /// <param name="model"></param>
+ /// <returns></returns>
+ [HttpPost, Route("SolderMaskOut"), AllowAnonymous, MethodParamsValidate]
+ public MesResponseContent SolderMaskOut([FromBody] Root<SolderMaskOut> model)
+ {
+ return _taskService.SolderMaskOut(model.Content);
+ }
/// <summary>
/// 鎺ユ敹MES娴嬭瘯鏋堕��搴�
/// </summary>
@@ -159,7 +184,7 @@
[HttpPost, Route("BagInfoSync"), AllowAnonymous]
public MesResponseContent BagInfoSync([FromBody] Root<MesBagInfoModel> model)
{
- return _taskService.BagInfoSync(model.Content);
+ return _taskService.BagInfoSync(model.Content, model.From!="PK" ? "" : model.From);
}
/// <summary>
/// MES鎴愬搧澶栧寘淇℃伅鎺ユ敹
@@ -172,7 +197,7 @@
return _taskService.BoxStockin(model.Content);
}
/// <summary>
- /// MES鎴愬搧鍑哄簱鎺ュ彛璋冪敤
+ /// MWMS鍚屾鎴愬搧鍑哄簱淇℃伅鑷矼ES
/// </summary>
/// <returns></returns>
[HttpPost, Route("ShipmentOrderSync"), AllowAnonymous]
@@ -181,14 +206,33 @@
return _taskService.ShipmentOrderSync(model);
}
/// <summary>
+ /// WMS鍚屾鎴愬搧鍑哄簱淇℃伅鑷矼ES澶栧寘瑁呮満
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost, Route("ShipmentOrderMESSync"), AllowAnonymous]
+ public WebResponseContent ShipmentOrderMESSync([FromBody] MesShipmentOrderSync model)
+ {
+ return _taskService.ShipmentOrderMESSync(model);
+ }
+ /// <summary>
/// 鎴愬搧杩斿伐鎻愬簱
/// </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浠撳ぇ鍗峰嚭搴撲换鍔�
@@ -235,6 +279,27 @@
{
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)
+ {
+ 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)
+ {
+ return MesResponseContent.Instance.Error(requestContent.Data);
+ }
+ return MesResponseContent.Instance.OK("鎴愬姛");
+ }
}
}
--
Gitblit v1.9.3