From 28110912ca4803e5793f181517d7bf2d7a5ea2ad Mon Sep 17 00:00:00 2001
From: HuBingJie <3146306518@qq.com>
Date: 星期五, 05 十二月 2025 00:32:49 +0800
Subject: [PATCH] 1

---
 代码管理/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskExecuteDetailService.cs |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskExecuteDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskExecuteDetailService.cs"
index 2cf46b5..5506de1 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskExecuteDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskExecuteDetailService.cs"
@@ -203,10 +203,20 @@
                     active = steps.IndexOf(TaskState) + 1;
 
                 }
-                string curradd = task.CurrentAddress;
-                string nextadd = task.NextAddress;
-                string rgvtasktype = task.RGVTaskType.ToString();
-                content = WebResponseContent.Instance.OK(data: new { active, list,curradd, nextadd, rgvtasktype });
+                if (task == null)
+                {
+                    string curradd = task_h.CurrentAddress;
+                    string nextadd = task_h.NextAddress;
+                    string rgvtasktype = task_h.RGVTaskType.ToString();
+                    content = WebResponseContent.Instance.OK(data: new { active, list, curradd, nextadd, rgvtasktype });
+                }
+                else
+                {
+                    string curradd = task.CurrentAddress;
+                    string nextadd = task.NextAddress;
+                    string rgvtasktype = task.RGVTaskType.ToString();
+                    content = WebResponseContent.Instance.OK(data: new { active, list, curradd, nextadd, rgvtasktype });
+                }
             }
             catch (Exception ex)
             {

--
Gitblit v1.9.3