| using Microsoft.AspNetCore.Authorization; | 
| using Microsoft.AspNetCore.Http; | 
| using Microsoft.AspNetCore.Mvc; | 
| using Newtonsoft.Json; | 
| using System; | 
| using System.Collections.Generic; | 
| using System.Linq; | 
| using System.Threading.Tasks; | 
| using WIDESEA_Core.Utilities; | 
| using WIDESEA_Entity.DomainModels; | 
| using WIDESEA_Entity.ToAGV; | 
| using WIDESEA_WCS; | 
| using WIDESEA_WCS.Common; | 
|   | 
| namespace ToAGV.Controllers | 
| { | 
|     /// <summary> | 
|     /// AGV接口 | 
|     /// </summary> | 
|     [Route("api/ToAGV")] | 
|     [ApiController] | 
|     public class ToAGVController : ControllerBase | 
|     { | 
|         /// <summary> | 
|         /// AGV申请进入区域 | 
|         /// </summary> | 
|         /// <param name="saveModel">请求参数</param> | 
|         /// <returns></returns> | 
|         [HttpPost, Route("AGVRequestin"), Authorize, AllowAnonymous] | 
|         public AGVRespone AGVRequestin([FromBody] object saveModel) | 
|         { | 
|             return ToAGVServer.AGVRequestin(JsonConvert.SerializeObject(saveModel)); | 
|         } | 
|         /// <summary> | 
|         /// AGV正在(进入/离开) | 
|         /// </summary> | 
|         /// <param name="saveModel"></param> | 
|         /// <returns></returns> | 
|         [HttpPost, Route("EnteriorLeav"), Authorize, AllowAnonymous] | 
|         public AGVRespone EnteriorLeav([FromBody] object saveModel) | 
|         { | 
|             return ToAGVServer.EnteriorLeav(JsonConvert.SerializeObject(saveModel)); | 
|         } | 
|         /// <summary> | 
|         /// AGV更新区域状态 | 
|         /// </summary> | 
|         /// <param name="saveModel"></param> | 
|         /// <returns></returns> | 
|         [HttpPost, Route("AGVOutofArea"), Authorize, AllowAnonymous] | 
|         public AGVRespone AGVOutofArea([FromBody] object saveModel) | 
|         { | 
|             return ToAGVServer.AGVOutofArea(JsonConvert.SerializeObject(saveModel)); | 
|         } | 
|         /// <summary> | 
|         /// AGV获取桁架区域状态 | 
|         /// </summary> | 
|         /// <param name="saveModel"></param> | 
|         /// <returns></returns> | 
|         [HttpPost, Route("GantryOutofArea"), Authorize, AllowAnonymous] | 
|         public AGVRespone GantryOutofArea([FromBody] object saveModel) | 
|         { | 
|             return ToAGVServer.GantryOutofArea(JsonConvert.SerializeObject(saveModel)); | 
|         } | 
|   | 
|         /// <summary> | 
|         /// AGV获取货位号光电状态 | 
|         /// </summary> | 
|         /// <param name="saveModel"></param> | 
|         /// <returns></returns> | 
|         [HttpPost, Route("GetSignal"), Authorize, AllowAnonymous] | 
|         public Signal GetSignal([FromBody] object saveModel) | 
|         { | 
|             return AGVandPipeline.GetSignal(JsonConvert.SerializeObject(saveModel)); | 
|         } | 
|     } | 
| } |