From 7da6f394864ba0412c1ac58ba7752862de7d3f3d Mon Sep 17 00:00:00 2001
From: z8018 <1282578289@qq.com>
Date: 星期二, 06 五月 2025 10:41:48 +0800
Subject: [PATCH] 1
---
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs"
index cdb20b7..a7df80f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs"
@@ -22,6 +22,7 @@
using WIDESEAWCS_Core.Caches;
using WIDESEAWCS_QuartzJob.DeviceEnum;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Information;
+using WIDESEAWCS_Common;
namespace WIDESEAWCS_WCSServer.Controllers.System
{
@@ -201,6 +202,29 @@
result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
}
break;
+ case "taskState":
+ {
+ Type type = typeof(TaskStatusEnum);
+ List<int> enums = Enum.GetValues(typeof(TaskStatusEnum)).Cast<int>().ToList();
+ int index = 0;
+ List<object> data = new List<object>();
+ foreach (var item in enums)
+ {
+ FieldInfo? fieldInfo = typeof(TaskStatusEnum).GetField(((TaskStatusEnum)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++;
+ }
+ result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
+ }
+ break;
}
return result;
}
--
Gitblit v1.9.3