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(); } } /// /// 发送AGV任务 /// /// /// 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(); if (agvContent.Code=="200") { content.OK(agvContent.Message); } else { content.Error(agvContent.Message); } } catch (Exception ex) { content.Error(ex.Message); } return content; } /// /// 安全信号申请 AGV-WMS-WCS /// public AgvResponseContent AgvSecureApply(AgvSecureApplyModel secureApplyModel) { return new AgvResponseContent(); } /// /// 安全信号回复 WMS-AGV /// /// /// 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(); if (agvContent.Code == "200") { content.OK(agvContent.Message); } else { content.Error(agvContent.Message); } } catch (Exception ex) { content.Error(ex.Message); } return content; } /// /// AGV任务状态刷新 /// /// /// public AgvResponseContent AgvUpdateTask(AgvUpdateModel agvUpdateModel) { return new AgvResponseContent(); } } #endregion }