From 89051aef8a2c1a85d457914cf6317fe70e0e321c Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期日, 29 十二月 2024 04:33:10 +0800
Subject: [PATCH] 1

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs |    8 ++++++--
 1 files changed, 6 insertions(+), 2 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 6f5ab5c..f36a589 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"
@@ -24,7 +24,9 @@
             WebResponseContent content = new WebResponseContent();
             try
             {
-                string apiAddress = "http://10.30.4.29:8182/rcms/services/rest/hikRpcService/genAgvSchedulingTask";// AppSettings.Get(APIEnum.AgvSendTask.ToString());
+                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 response = HttpHelper.Post(apiAddress, taskModel.Serialize());
                 AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>();
                 if (agvContent.Code == "0")
@@ -59,7 +61,9 @@
             WebResponseContent content = new WebResponseContent();
             try
             {
-                string apiAddress = "http://10.30.4.29:8182/rcms/services/rest/hikRpcService/continueTask";// AppSettings.Get(APIEnum.AgvSecureReply.ToString());
+                string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == APIEnum.AgvSecureReply.ToString())?.ApiAddress;
+                if (string.IsNullOrEmpty(apiAddress))
+                    return WebResponseContent.Instance.Error($"鏈壘鍒板彂閫丄GV浠诲姟鎺ュ彛,璇锋鏌ユ帴鍙i厤缃�"); // 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 == "0")

--
Gitblit v1.9.3