From efaf0b8aeb26aca6536a4b384c912cc3cac4d070 Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期六, 15 三月 2025 16:07:45 +0800 Subject: [PATCH] 成品代码,其他仓优化,前端优化界面增加 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs" index 5fa9778..5990c06 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs" @@ -9,6 +9,7 @@ using WIDESEAWCS_Common.TaskEnum; using WIDESEAWCS_Core; using WIDESEAWCS_Core.Helper; +using WIDESEAWCS_DTO.Agv; namespace WIDESEAWCS_TaskInfoService { @@ -82,6 +83,34 @@ return content; } /// <summary> + /// AGV鎴愬搧鍙栨斁璐ч�氱煡 + /// </summary> + public WebResponseContent AgvBoxApplyPass(AGVBoxApplyPassDTO applyPassDTO, APIEnum SecureReply = APIEnum.AGV_CPBoxApplyPass) + { + WebResponseContent content = new WebResponseContent(); + try + { + string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == SecureReply.ToString())?.ApiAddress; + if (string.IsNullOrEmpty(apiAddress)) + return WebResponseContent.Instance.Error($"鏈壘鍒板彂閫丄GV浠诲姟鎺ュ彛,璇锋鏌ユ帴鍙i厤缃�"); + string response = HttpHelper.Post(apiAddress, applyPassDTO.Serialize()); + AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>(); + if (agvContent.Code == "0") + { + content.OK(agvContent.Message); + } + else + { + content.Error(agvContent.Message); + } + } + catch (Exception ex) + { + content.Error(ex.Message); + } + return content; + } + /// <summary> /// AGV浠诲姟鐘舵�佸埛鏂�/AGV浠诲姟瀹屾垚 /// </summary> /// <param name="agvUpdateModel"></param> @@ -90,5 +119,30 @@ { return new AgvResponseContent(); } + public WebResponseContent AgvPodBerthAndMat(AgvPodBerthAndMatDTO agvPodModel, APIEnum PodBerthAndMat = APIEnum.Agv_CSJPodBerthAndMat) + { + WebResponseContent content = new WebResponseContent(); + try + { + string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == PodBerthAndMat.ToString())?.ApiAddress; + if (string.IsNullOrEmpty(apiAddress)) + return WebResponseContent.Instance.Error($"鏈壘鍒板彂閫丄GV浠诲姟鎺ュ彛,璇锋鏌ユ帴鍙i厤缃�"); + string response = HttpHelper.Post(apiAddress, agvPodModel.Serialize()); + AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>(); + if (agvContent.Code == "1") + { + content.OK(agvContent.Message); + } + else + { + content.Error(agvContent.Message); + } + } + catch (Exception ex) + { + content.Error(ex.Message); + } + return content; + } } } -- Gitblit v1.9.3