From 541572199581a80979ec3b62245eb522542a7b15 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 12 一月 2026 10:34:17 +0800
Subject: [PATCH] 更新AGV任务取消
---
项目代码/WCSServices/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs"
index 47c5b5f..1493897 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs"
@@ -149,5 +149,30 @@
}
}
+ public WebResponseContent AgvCancelTask(AgvTaskCancelDTO taskModel, APIEnum SendTask = APIEnum.AgvTaskCancel)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ string? apiAddress = _apiInfoRepository.QueryFirst(x => x.ApiCode == SendTask.ToString())?.ApiAddress;
+ if (string.IsNullOrEmpty(apiAddress)) throw new Exception($"鏈壘鍒板彂閫丄GV浠诲姟鎺ュ彛,璇锋鏌ユ帴鍙i厤缃�");
+ string request = JsonConvert.SerializeObject(taskModel, settings);
+ string response = HttpHelper.Post(apiAddress, request);
+ AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>() ?? throw new Exception("AGV浠诲姟鍙戦�佹湭杩斿洖缁撴灉");
+ if (agvContent.Success)
+ {
+ content.OK();
+ }
+ else
+ {
+ content.Error(agvContent.Message);
+ }
+ }
+ catch (Exception ex)
+ {
+ content.Error(ex.Message);
+ }
+ return content;
+ }
}
}
--
Gitblit v1.9.3