wangxinhui
2025-10-26 733c975cd8647f6d006736f1863bad731e32e6fb
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs
@@ -10,6 +10,13 @@
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
{
@@ -21,11 +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手动叫料接口
        /// </summary>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("ReceiveManualIssue"), AllowAnonymous]
        public WebResponseContent ReceiveManualIssue([FromBody] MESManualIssueDTO manualIssueDTO)
        {
            return _taskService.ReceiveManualIssue(manualIssueDTO);
        }
        /// <summary>
        /// MES空托/余料呼叫接口
        /// </summary>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("ReceiveReturnIssue"), AllowAnonymous]
        public WebResponseContent ReceiveReturnIssue([FromBody] List<MESReturnIssueDTO> returnIssueDTOs)
        {
            return _taskService.ReceiveReturnIssue(returnIssueDTOs);
        }
        /// <summary>
        /// æˆå“/半成品信息同步接口
        /// </summary>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("ReceiveProCodeInfo"), AllowAnonymous]
        public WebResponseContent ReceiveProCodeInfo([FromBody] List<MESProInDTO> proInDTOs)
        {
            return _taskService.ReceiveProCodeInfo(proInDTOs);
        }
        /// <summary>
        /// MES工单停止接口
        /// </summary>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("ReceiveProOrderStop"), AllowAnonymous]
        public WebResponseContent ReceiveProOrderStop([FromBody] MESOrderStopDTO orderStopDTO)
        {
            return _proInOrderInfoService.ReceiveProOrderStop(orderStopDTO);
        }
        /// <summary>
        /// MES配送出发通知
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("MESDispatchUp"), AllowAnonymous]
        public string MESDispatchUp([FromBody] MESDispatchModel mESDispatchModel)
        {
            return _invokeMESService.MESDispatchUp(mESDispatchModel);
        }
        /// <summary>
        /// MES配送到达通知
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("MESDelivery"), AllowAnonymous]
        public string MESDelivery([FromBody] MESDeliveryModel mESDeliveryModel)
        {
            return _invokeMESService.MESDelivery(mESDeliveryModel);
        }
        /// <summary>
        /// MES退料空托接收通知
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("MESRecepNotice"), AllowAnonymous]
        public string MESRecepNotice([FromBody] MESRecepNoticeModel mESRecepNoticeModel)
        {
            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, Route("MESBoxCodeNotice"), AllowAnonymous]
        public string MESBoxCodeNotice(string boxCode)
        {
            return _invokeMESService.MESBoxCodeNotice(boxCode);
        }
    }
}