From b51a65433d6102f2f8f00226404d9ca3808404af Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期四, 02 一月 2025 22:23:17 +0800
Subject: [PATCH] 打印托盘号
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 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 5f367e3..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"
@@ -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($"鏈壘鍒板彂閫丄GV浠诲姟鎺ュ彛,璇锋鏌ユ帴鍙i厤缃�"); // 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($"鏈壘鍒板彂閫丄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 == "200")
+ if (agvContent.Code == "0")
{
content.OK(agvContent.Message);
}
@@ -84,7 +88,6 @@
/// <returns></returns>
public AgvResponseContent AgvUpdateTask(AgvUpdateDTO agvUpdateModel)
{
-
return new AgvResponseContent();
}
}
--
Gitblit v1.9.3