hutongqing
2025-01-02 b51a65433d6102f2f8f00226404d9ca3808404af
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs
@@ -6,6 +6,7 @@
using System.Threading.Tasks;
using WIDESEA_DTO.Agv;
using WIDESEAWCS_Common.APIEnum;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Helper;
@@ -23,12 +24,14 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                string apiAddress = AppSettings.Get(APIEnum.AgvSendTask.ToString());
                string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == APIEnum.AgvSendTask.ToString())?.ApiAddress;
                if (string.IsNullOrEmpty(apiAddress))
                    return WebResponseContent.Instance.Error($"未找到发送AGV任务接口,请检查接口配置"); // AppSettings.Get(APIEnum.AgvSendTask.ToString());
                string response = HttpHelper.Post(apiAddress, taskModel.Serialize());
                AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>();
                if (agvContent.Code == "200")
                if (agvContent.Code == "0")
                {
                    content.OK(agvContent.Message);
                    content.OK(data: agvContent.Data);
                }
                else
                {
@@ -46,11 +49,10 @@
        /// </summary>
        public AgvResponseContent AgvSecureApply(AgvSecureApplyDTO secureApplyModel)
        {
            return new AgvResponseContent();
        }
        /// <summary>
        /// å®‰å…¨ä¿¡å·å›žå¤ WCS-AGV
        /// å®‰å…¨ä¿¡å·å›žå¤ WCS-AGV  //AGV任务继续执行
        /// </summary>
        /// <param name="secureModel"></param>
        /// <returns></returns>
@@ -59,10 +61,12 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                string apiAddress = AppSettings.Get(APIEnum.AgvSecureReply.ToString());
                string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == APIEnum.AgvSecureReply.ToString())?.ApiAddress;
                if (string.IsNullOrEmpty(apiAddress))
                    return WebResponseContent.Instance.Error($"未找到发送AGV任务接口,请检查接口配置"); // AppSettings.Get(APIEnum.AgvSendTask.ToString());// AppSettings.Get(APIEnum.AgvSecureReply.ToString());
                string response = HttpHelper.Post(apiAddress, secureReplyModel.Serialize());
                AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>();
                if (agvContent.Code == "200")
                if (agvContent.Code == "0")
                {
                    content.OK(agvContent.Message);
                }
@@ -78,13 +82,12 @@
            return content;
        }
        /// <summary>
        /// AGV任务状态刷新
        /// AGV任务状态刷新/AGV任务完成
        /// </summary>
        /// <param name="agvUpdateModel"></param>
        /// <returns></returns>
        public AgvResponseContent AgvUpdateTask(AgvUpdateDTO agvUpdateModel)
        {
            return new AgvResponseContent();
        }
    }