From 68a2cc40b6d7f438267f9dc74bb2f6045cf4f01d Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期三, 15 一月 2025 10:18:17 +0800 Subject: [PATCH] 1 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs | 14 +++++++------- 1 files changed, 7 insertions(+), 7 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 f36a589..5fa9778 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" @@ -19,14 +19,14 @@ /// </summary> /// <param name="taskModel"></param> /// <returns></returns> - public WebResponseContent AgvSendTask(AgvTaskDTO taskModel) + public WebResponseContent AgvSendTask(AgvTaskDTO taskModel, APIEnum SendTask = APIEnum.Agv_CSJSendTask) { WebResponseContent content = new WebResponseContent(); try { - string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == APIEnum.AgvSendTask.ToString())?.ApiAddress; - if (string.IsNullOrEmpty(apiAddress)) - return WebResponseContent.Instance.Error($"鏈壘鍒板彂閫丄GV浠诲姟鎺ュ彛,璇锋鏌ユ帴鍙i厤缃�"); // AppSettings.Get(APIEnum.AgvSendTask.ToString()); + string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == SendTask.ToString())?.ApiAddress; + if (string.IsNullOrEmpty(apiAddress)) + return WebResponseContent.Instance.Error($"鏈壘鍒板彂閫丄GV浠诲姟鎺ュ彛,璇锋鏌ユ帴鍙i厤缃�"); string response = HttpHelper.Post(apiAddress, taskModel.Serialize()); AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>(); if (agvContent.Code == "0") @@ -56,14 +56,14 @@ /// </summary> /// <param name="secureModel"></param> /// <returns></returns> - public WebResponseContent AgvSecureReply(AgvSecureReplyDTO secureReplyModel) + public WebResponseContent AgvSecureReply(AgvSecureReplyDTO secureReplyModel, APIEnum SecureReply = APIEnum.Agv_CSJSecureReply) { WebResponseContent content = new WebResponseContent(); try { - string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == APIEnum.AgvSecureReply.ToString())?.ApiAddress; + string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == SecureReply.ToString())?.ApiAddress; if (string.IsNullOrEmpty(apiAddress)) - return WebResponseContent.Instance.Error($"鏈壘鍒板彂閫丄GV浠诲姟鎺ュ彛,璇锋鏌ユ帴鍙i厤缃�"); // AppSettings.Get(APIEnum.AgvSendTask.ToString());// AppSettings.Get(APIEnum.AgvSecureReply.ToString()); + return WebResponseContent.Instance.Error($"鏈壘鍒板彂閫丄GV浠诲姟鎺ュ彛,璇锋鏌ユ帴鍙i厤缃�"); string response = HttpHelper.Post(apiAddress, secureReplyModel.Serialize()); AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>(); if (agvContent.Code == "0") -- Gitblit v1.9.3