分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-05-10 8529ae408d5e41d5982a8caab2a035e360cfc6c6
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
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.Utilities;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Entity.DomainModels.Mes;
using WIDESEA_WMS;
 
namespace WIDESEA_WCSServer.Controllers.ToWms
{
    [Route("api/ToWms")]
    [ApiController]
    public class ToWMSController : ControllerBase
    {
        private static readonly object OutsourceInboundobj = new object();
        private static readonly object Outsourceobj=new object();
        private static readonly object agvTransferListobj = new object();
        private static readonly object shiftingparkingobj = new object();
        private static readonly object GetStationobj = new object();
        /// <summary>
        /// 移库(手动,临时)
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost, Route("AddToFloat3")]
        public WebResponseContent AddToFloat3([FromBody] MesRequestTemp request)
        {
            return new ToMesServer().AddToFloat3(request);
        }
 
        /// <summary>
        /// 移库外协
        /// </summary>
        /// <param name="saveModel"></param>
        /// <returns></returns>
        [HttpPost, Route("agvTransferList")]
        public WebResponseContent agvTransferList([FromBody] SaveModel saveModel)
        {
            lock (agvTransferListobj)
            {
                return new ToMesServer().agvTransferList(saveModel);
            }
        }
 
        /// <summary>
        /// 外协货位扫码确认物料已被取走
        /// </summary>
        /// <param name="saveModel"></param>
        /// <returns></returns>
        [HttpPost, Route("Confirmedcut")]
        public WebResponseContent Confirmedcut([FromBody] SaveModel saveModel)
        {
            return new ToMesServer().Confirmedcut(saveModel);
        }
 
        /// <summary>
        /// 获取货位
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost, Route("GetStation")]
        public WebResponseContent GetStation([FromBody] SaveModel saveModel)
        {
            lock (GetStationobj)
            {
                return new ToMesServer().GetStation(saveModel);
            }
        }
 
        /// <summary>
        /// 库内移库
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost, Route("shiftingparking")]
        public WebResponseContent shiftingparking([FromBody] SaveModel saveModel)
        {
            lock (shiftingparkingobj)
            {
                return new ToMesServer().shiftingparking(saveModel);
            }
        }
 
        /// <summary>
        /// 人工出库
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost, Route("Outsource")]
        public WebResponseContent Outsource([FromBody] SaveModel saveModel)
        {
            lock (Outsourceobj)
            {
                return new ToMesServer().Outsource(saveModel);
            }
        }
 
        /// <summary>
        /// 外协出库(检测上料)
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost, Route("OutsourceInbound")]
        public WebResponseContent OutsourceInbound([FromBody] SaveModel saveModel)
        {
            lock (OutsourceInboundobj)
            {
                return new ToMesServer().OutsourceInbound(saveModel);
            }
        }
 
        /// <summary>
        /// 空盘
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost, Route("SendEpmtyTask")]
        public WebResponseContent SendEpmtyTask([FromBody] SaveModel saveModel)
        {
            return new ToMesServer().SendEpmtyTask(saveModel);
        }
 
        /// <summary>
        /// 绑定车轮
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost, Route("UpdateStation")]
        public WebResponseContent UpdateStation([FromBody] SaveModel saveModel)
        {
            return new ToMesServer().UpdateStation(saveModel);
        }
    }
}