wangxinhui
3 天以前 a0a0df2e824b6fe7e5a3c0afce78127fecf84fc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.Attributes;
using WIDESEA_Core;
using WIDESEA_DTO;
using WIDESEA_IBasicService;
using WIDESEA_ITaskInfoService;
using WIDESEA_TaskInfoService;
using WIDESEA_DTO.ERP;
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
{
    /// <summary>
    /// MES接口
    /// </summary>
    [Route("api/Mes")]
    [ApiController]
    public class MesController : ControllerBase
    {
        private readonly ITaskService _taskService;
        private readonly IOutMESOrderService _outMESOrderService;
        private readonly IMESProInOrderInfoService _proInOrderInfoService;
        private readonly IInvokeMESService _invokeMESService;
 
        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,HttpGet, Route("MESBoxCodeNotice"), AllowAnonymous]
        public string MESBoxCodeNotice(string boxCode)
        {
            return _invokeMESService.MESBoxCodeNotice(boxCode);
        }
    }
}