| using Autofac.Core; | 
| using System; | 
| using System.Collections.Generic; | 
| using System.Linq; | 
| using System.Text; | 
| using System.Threading.Tasks; | 
| using WIDESEA_Common.APIEnum; | 
| using WIDESEA_Core; | 
| using WIDESEA_Core.Helper; | 
| using WIDESEA_DTO.AGV; | 
| using WIDESEA_External.Model; | 
|   | 
| namespace WIDESEA_External.AGVService | 
| { | 
|     #region 弃用 | 
|     public class InvokeAGVService : IInvokeAGVService | 
|     { | 
|         public static IInvokeAGVService Intance | 
|         { | 
|             get { return App.GetService<IInvokeAGVService>(); } | 
|         } | 
|         /// <summary> | 
|         /// 发送AGV任务  | 
|         /// </summary> | 
|         /// <param name="taskModel"></param> | 
|         /// <returns></returns> | 
|         public WebResponseContent AgvSendTask(AgvTaskModel taskModel) | 
|         { | 
|             WebResponseContent content = new WebResponseContent(); | 
|             try | 
|             { | 
|                 string apiAddress = AppSettings.Get(APIEnum.AgvSendTask.ToString()); | 
|                 string response = HttpHelper.Post(apiAddress, taskModel.Serialize()); | 
|                 AgvResponseContent agvContent= response.DeserializeObject<AgvResponseContent>(); | 
|                 if (agvContent.Code=="200") | 
|                 { | 
|                     content.OK(agvContent.Message); | 
|                 } | 
|                 else | 
|                 { | 
|                     content.Error(agvContent.Message); | 
|                 } | 
|             } | 
|             catch (Exception ex) | 
|             { | 
|                 content.Error(ex.Message); | 
|             } | 
|             return content; | 
|         } | 
|         /// <summary> | 
|         /// 安全信号申请 AGV-WMS-WCS | 
|         /// </summary> | 
|         public AgvResponseContent AgvSecureApply(AgvSecureApplyModel secureApplyModel) | 
|         { | 
|   | 
|             return new AgvResponseContent(); | 
|         } | 
|         /// <summary> | 
|         /// 安全信号回复 WMS-AGV | 
|         /// </summary> | 
|         /// <param name="secureModel"></param> | 
|         /// <returns></returns> | 
|         public WebResponseContent AgvSecureReply(AgvSecureReplyModel secureReplyModel) | 
|         { | 
|             WebResponseContent content = new WebResponseContent(); | 
|             try | 
|             { | 
|                 string apiAddress = AppSettings.Get(APIEnum.AgvSecureReply.ToString()); | 
|                 string response = HttpHelper.Post(apiAddress, secureReplyModel.Serialize()); | 
|                 AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>(); | 
|                 if (agvContent.Code == "200") | 
|                 { | 
|                     content.OK(agvContent.Message); | 
|                 } | 
|                 else | 
|                 { | 
|                     content.Error(agvContent.Message); | 
|                 } | 
|             } | 
|             catch (Exception ex) | 
|             { | 
|                 content.Error(ex.Message); | 
|             } | 
|             return content; | 
|         } | 
|         /// <summary> | 
|         /// AGV任务状态刷新 | 
|         /// </summary> | 
|         /// <param name="agvUpdateModel"></param> | 
|         /// <returns></returns> | 
|         public AgvResponseContent AgvUpdateTask(AgvUpdateModel agvUpdateModel) | 
|         { | 
|   | 
|             return new AgvResponseContent(); | 
|         } | 
|     } | 
|     #endregion | 
| } |