From cbfc5ac3c45eff75e912ba6aeaad83533a1a4296 Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期二, 07 四月 2026 16:16:22 +0800
Subject: [PATCH] fix: 修复机器人任务信息等bug

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs
index cb7c013..7296558 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs
@@ -267,6 +267,28 @@
                             }
                             #endregion
 
+                            #region RobotTaskTypeEnum
+                            {
+                                Type type = typeof(RobotTaskTypeEnum);
+                                List<int> enums = Enum.GetValues(typeof(RobotTaskTypeEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(RobotTaskTypeEnum).GetField(((RobotTaskTypeEnum)item).ToString());
+                                    DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
+                                    if (description != null)
+                                    {
+                                        data.Add(new { key = item.ToString(), value = description.Description });
+                                    }
+                                    else
+                                    {
+                                        data.Add(new { key = item.ToString(), value = item.ToString() });
+                                    }
+                                    index++;
+                                }
+                            }
+                            #endregion
+
                             result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                         }
                         break;

--
Gitblit v1.9.3