From c54e0666bdd34fbe133fe521bf9d46dd6c0fe53e Mon Sep 17 00:00:00 2001 From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com> Date: 星期四, 12 六月 2025 10:33:28 +0800 Subject: [PATCH] 代码提交 --- 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 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 e4b2121..c43af8d 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" @@ -262,6 +262,28 @@ } #endregion + #region AGVTaskTypeEnum + { + Type type = typeof(AGVTaskTypeEnum); + List<int> enums = Enum.GetValues(typeof(AGVTaskTypeEnum)).Cast<int>().ToList(); + int index = 0; + foreach (var item in enums) + { + FieldInfo? fieldInfo = typeof(AGVTaskTypeEnum).GetField(((AGVTaskTypeEnum)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; @@ -313,6 +335,27 @@ } #endregion + #region AGVTaskStatusEnum + { + Type type = typeof(AGVTaskStatusEnum); + List<int> enums = Enum.GetValues(typeof(AGVTaskStatusEnum)).Cast<int>().ToList(); + int index = 0; + foreach (var item in enums) + { + FieldInfo? fieldInfo = typeof(AGVTaskStatusEnum).GetField(((AGVTaskStatusEnum)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