From a0a0df2e824b6fe7e5a3c0afce78127fecf84fc9 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 03 十一月 2025 08:23:05 +0800
Subject: [PATCH] ERP接口代码更新,WCS代码优化,出入库分配优化
---
项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs | 118 +++++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 82 insertions(+), 36 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
index 0439ef8..9a43bd8 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
@@ -7,10 +7,16 @@
using WIDESEA_ITaskInfoService;
using WIDESEA_TaskInfoService;
using WIDESEA_DTO.ERP;
-using WIDESEA_DTO.MES;
using WIDESEA_Core.Helper;
using Autofac.Core;
using WIDESEA_DTO.Stock;
+using WIDESEA_BasicService;
+using WIDESEA_DTO.Basic;
+using WIDESEA_DTO.MES;
+using WIDESEA_IOutboundService;
+using WIDESEA_IInboundService;
+using WIDESEA_External.MESService;
+using WIDESEA_External.Model;
namespace WIDESEA_WMSServer.Controllers.MES
{
@@ -22,85 +28,125 @@
public class MesController : ControllerBase
{
private readonly ITaskService _taskService;
+ private readonly IOutMESOrderService _outMESOrderService;
+ private readonly IMESProInOrderInfoService _proInOrderInfoService;
+ private readonly IInvokeMESService _invokeMESService;
- public MesController(ITaskService taskService)
+ public MesController(ITaskService taskService,IOutMESOrderService outMESOrderService,IMESProInOrderInfoService proInOrderInfoService, IInvokeMESService invokeMESService)
{
_taskService = taskService;
+ _outMESOrderService = outMESOrderService;
+ _proInOrderInfoService=proInOrderInfoService;
+ _invokeMESService = invokeMESService;
+ }
+ /// <summary>
+ /// 鎺ユ敹MES棰嗘枡璁″垝
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("ReceiveOutBound"), AllowAnonymous]
+
+ public WebResponseContent ReceiveOutBound([FromBody] List<OutMESOrderDTO> outMESOrderDTOs)
+ {
+ return _taskService.ReceiveOutBound(outMESOrderDTOs);
+ }
+ /// <summary>
+ /// MES鑷姩鍙枡鎺ュ彛
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("ReceiveAutoIssue"), AllowAnonymous]
+ public WebResponseContent ReceiveAutoIssue([FromBody] MESAutoIssueDTO autoIssueDTO)
+ {
+ return _taskService.ReceiveAutoIssue(autoIssueDTO);
}
/// <summary>
- /// 鎺ユ敹MES娴嬭瘯鏋跺嚭搴�
+ /// MES鎵嬪姩鍙枡鎺ュ彛
/// </summary>
- /// <param name="model"></param>
/// <returns></returns>
- [HttpPost, Route("TestToolOut"), AllowAnonymous, MethodParamsValidate]
- public MesResponseContent TestToolOut([FromBody] Root<TestToolOutModel> model)
+ [HttpPost, HttpGet, Route("ReceiveManualIssue"), AllowAnonymous]
+ public WebResponseContent ReceiveManualIssue([FromBody] MESManualIssueDTO manualIssueDTO)
{
- return _taskService.TestToolOut(model.Content);
+ return _taskService.ReceiveManualIssue(manualIssueDTO);
}
/// <summary>
- /// 鎺ユ敹MES娴嬭瘯鏋堕��搴�
+ /// MES绌烘墭/浣欐枡鍛煎彨鎺ュ彛
/// </summary>
- /// <param name="model"></param>
/// <returns></returns>
- [HttpPost, Route("TestToolBack"), AllowAnonymous, MethodParamsValidate]
- public MesResponseContent TestToolBack([FromBody] Root<TestToolBackModel> model)
+ [HttpPost, HttpGet, Route("ReceiveReturnIssue"), AllowAnonymous]
+ public WebResponseContent ReceiveReturnIssue([FromBody] List<MESReturnIssueDTO> returnIssueDTOs)
{
- return _taskService.TestToolBack(model.Content);
+ return _taskService.ReceiveReturnIssue(returnIssueDTOs);
}
/// <summary>
- /// 娴嬭瘯鏋舵姤搴�
+ /// 鎴愬搧/鍗婃垚鍝佷俊鎭悓姝ユ帴鍙�
/// </summary>
- /// <param name="model"></param>
/// <returns></returns>
- [HttpPost, Route("TestToolScrap"), AllowAnonymous, MethodParamsValidate]
- public MesResponseContent TestScrap([FromBody] Root<TestToolScrap> model)
+ [HttpPost, HttpGet, Route("ReceiveProCodeInfo"), AllowAnonymous]
+ public WebResponseContent ReceiveProCodeInfo([FromBody] List<MESProInDTO> proInDTOs)
{
- return _taskService.TestScrap(model.Content);
+ return _taskService.ReceiveProCodeInfo(proInDTOs);
}
/// <summary>
- ///
+ /// MES宸ュ崟鍋滄鎺ュ彛
/// </summary>
- /// <param name="toolSynInfo"></param>
/// <returns></returns>
- [HttpPost, Route("TestSynStock"), AllowAnonymous]
- public WebResponseContent TestSynStock([FromBody] TestToolSynInfo toolSynInfo)
+ [HttpPost, HttpGet, Route("ReceiveProOrderStop"), AllowAnonymous]
+ public WebResponseContent ReceiveProOrderStop([FromBody] MESOrderStopDTO orderStopDTO)
{
- return _taskService.TestSynStock(toolSynInfo);
+ return _proInOrderInfoService.ReceiveProOrderStop(orderStopDTO);
}
/// <summary>
- /// 鍩烘澘浣欐枡閫�搴�
+ /// MES閰嶉�佸嚭鍙戦�氱煡
/// </summary>
- /// <param name="model"></param>
/// <returns></returns>
- [HttpPost, Route("SubstrateBack"), AllowAnonymous]
- public MesResponseContent SubstrateBack([FromBody] Root<SubstrateBackModel> model)
+ [HttpPost, Route("MESDispatchUp"), AllowAnonymous]
+ public string MESDispatchUp([FromBody] MESDispatchModel mESDispatchModel)
{
- return _taskService.SubstrateBack(model.Content);
+ return _invokeMESService.MESDispatchUp(mESDispatchModel);
}
/// <summary>
- /// 鐗╂枡鍑哄簱锛學MS鍚屾鍑哄簱鐗╂枡鎵规鑷矼ES
+ /// MES閰嶉�佸埌杈鹃�氱煡
/// </summary>
- /// <param name="model"></param>
/// <returns></returns>
- [HttpPost, Route("UploadMesMaterialLotaAcept"), AllowAnonymous]
- public WebResponseContent UploadMesMaterialLotaAcept([FromBody] MesMaterialLotaAceptModel model)
+ [HttpPost, Route("MESDelivery"), AllowAnonymous]
+ public string MESDelivery([FromBody] MESDeliveryModel mESDeliveryModel)
{
- return _taskService.UploadMesMaterialLotaAcept(model);
+ return _invokeMESService.MESDelivery(mESDeliveryModel);
}
/// <summary>
- /// MES鎴愬搧鍑哄簱鎺ュ彛璋冪敤
+ /// MES閫�鏂欑┖鎵樻帴鏀堕�氱煡
/// </summary>
/// <returns></returns>
- [HttpPost, Route("ShipmentOrderSync"), AllowAnonymous]
- public WebResponseContent ShipmentOrderSync([FromBody] MesShipmentOrderSync model)
+ [HttpPost, Route("MESRecepNotice"), AllowAnonymous]
+ public string MESRecepNotice([FromBody] MESRecepNoticeModel mESRecepNoticeModel)
{
- return _taskService.ShipmentOrderSync(model);
+ return _invokeMESService.MESRecepNotice(mESRecepNoticeModel);
+ }
+
+ /// <summary>
+ /// MES灏忚溅鍒拌揪閫氱煡
+ /// </summary>
+ /// <param name="mESAvgArriveNoticeModel"></param>
+ /// <returns></returns>
+ [HttpPost, Route("MESAvgArriveNotice"), AllowAnonymous]
+ public string MESAvgArriveNotice([FromBody] MESAvgArriveNoticeModel mESAvgArriveNoticeModel)
+ {
+ return _invokeMESService.MESAvgArriveNotice(mESAvgArriveNoticeModel);
+ }
+ /// <summary>
+ /// MES浜ч噺鍥炰紶
+ /// </summary>
+ /// <param name="boxCode"></param>
+ /// <returns></returns>
+ [HttpPost,HttpGet, Route("MESBoxCodeNotice"), AllowAnonymous]
+ public string MESBoxCodeNotice(string boxCode)
+ {
+ return _invokeMESService.MESBoxCodeNotice(boxCode);
}
}
}
--
Gitblit v1.9.3