From aa75f3cbdcfce80d7ebd3c4f2bcfeea850949209 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期二, 10 三月 2026 20:22:01 +0800
Subject: [PATCH] 1

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/KLSTaskExtend.cs |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/KLSTaskExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/KLSTaskExtend.cs"
index 3edca3b..510a784 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/KLSTaskExtend.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/KLSTaskExtend.cs"
@@ -1,9 +1,11 @@
 锘縰sing System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Reflection.Metadata;
 using System.Text;
 using System.Threading.Tasks;
 using WIDESEAWCS_Common.TaskEnum;
+using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.Helper;
 using WIDESEAWCS_DTO;
 using WIDESEAWCS_Model.Models;
@@ -16,6 +18,7 @@
         #region 涓嬪彂鍑箰澹獳GV浠诲姟
         public void SendGALAXISTask(List<Dt_Task> tasks)
         {
+            WebResponseContent content = new WebResponseContent(); // 鍒涘缓鍝嶅簲瀵硅薄
             GALAXISTaskInfo gALAXISTaskInfo = new();
             try
             {
@@ -38,6 +41,7 @@
                 Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(GALAXISTaskInfo)) ?? throw new Exception("鏈壘鍒板嚡涔愬+AGV浠诲姟涓嬪彂鎺ュ彛閰嶇疆淇℃伅锛佽妫�鏌ユ帴鍙i厤缃�");
                 string response = HttpHelper.Post(apiInfo.ApiAddress, gALAXISTaskInfo.Serialize());
                 GALAXISReturn agvContent = response.DeserializeObject<GALAXISReturn>();
+                content.Data = agvContent;
                 if (agvContent.success)
                 {
                     if (agvContent.data.returnStatus != 0) throw new Exception(agvContent.data.returnInfo);
@@ -45,12 +49,19 @@
                     {
                         task.TaskState = (int)TaskStatusEnum.Execut;
                     });
+                    content.OK();
                     _taskService.UpdateData(tasks);
                 }
             }
             catch (Exception ex)
             {
-                WriteError(nameof(TaskJob), ex.Message, ex);
+                content.Error(ex.Message);
+                //WriteError(nameof(TaskJob), ex.Message, ex);
+            }
+            finally
+            {
+                _trackloginfoService.AddTrackLog(gALAXISTaskInfo, content, "涓嬪彂鍑箰澹獳GV浠诲姟","","");
+                //dt_trackloginfoService.Instance.AddTrackLog(outTaskInfo, content, "鎺ユ敹瀹囪埅WMS鍑哄簱浠诲姟涓嬪彂", "", $"{msg},鍙樻洿缁撴灉:{content.Status}");
             }
         }
         #endregion

--
Gitblit v1.9.3