From 2f14ad3cc01d575bfde0850bae05fded8acb7af6 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期日, 12 一月 2025 00:20:26 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs | 102 +++-----------------------------------------------
1 files changed, 7 insertions(+), 95 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs"
index 4af342e..e47a9bd 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs"
@@ -175,80 +175,14 @@
{
List<object> data = new List<object>();
- #region TaskInboundTypeEnum
+ #region TaskTypeEnum
{
- Type type = typeof(TaskInboundTypeEnum);
- List<int> enums = Enum.GetValues(typeof(TaskInboundTypeEnum)).Cast<int>().ToList();
+ Type type = typeof(TaskTypeEnum);
+ List<int> enums = Enum.GetValues(typeof(TaskTypeEnum)).Cast<int>().ToList();
int index = 0;
foreach (var item in enums)
{
- FieldInfo? fieldInfo = typeof(TaskInboundTypeEnum).GetField(((TaskInboundTypeEnum)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
-
- #region TaskOutboundTypeEnum
- {
- Type type = typeof(TaskOutboundTypeEnum);
- List<int> enums = Enum.GetValues(typeof(TaskOutboundTypeEnum)).Cast<int>().ToList();
- int index = 0;
- foreach (var item in enums)
- {
- FieldInfo? fieldInfo = typeof(TaskOutboundTypeEnum).GetField(((TaskOutboundTypeEnum)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
-
- #region TaskRelocationTypeEnum
- {
- Type type = typeof(TaskRelocationTypeEnum);
- List<int> enums = Enum.GetValues(typeof(TaskRelocationTypeEnum)).Cast<int>().ToList();
- int index = 0;
- foreach (var item in enums)
- {
- FieldInfo? fieldInfo = typeof(TaskRelocationTypeEnum).GetField(((TaskRelocationTypeEnum)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
-
- #region TaskOtherTypeEnum
- {
- Type type = typeof(TaskOtherTypeEnum);
- List<int> enums = Enum.GetValues(typeof(TaskOtherTypeEnum)).Cast<int>().ToList();
- int index = 0;
- foreach (var item in enums)
- {
- FieldInfo? fieldInfo = typeof(TaskOtherTypeEnum).GetField(((TaskOtherTypeEnum)item).ToString());
+ FieldInfo? fieldInfo = typeof(TaskTypeEnum).GetField(((TaskTypeEnum)item).ToString());
DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
if (description != null)
{
@@ -272,34 +206,12 @@
#region TaskInStatusEnum
{
- Type type = typeof(TaskInStatusEnum);
- List<int> enums = Enum.GetValues(typeof(TaskInStatusEnum)).Cast<int>().ToList();
+ Type type = typeof(TaskStatusEnum);
+ List<int> enums = Enum.GetValues(typeof(TaskStatusEnum)).Cast<int>().ToList();
int index = 0;
foreach (var item in enums)
{
- FieldInfo? fieldInfo = typeof(TaskInStatusEnum).GetField(((TaskInStatusEnum)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
-
- #region TaskOutStatusEnum
- {
- Type type = typeof(TaskOutStatusEnum);
- List<int> enums = Enum.GetValues(typeof(TaskOutStatusEnum)).Cast<int>().ToList();
- int index = 0;
- foreach (var item in enums)
- {
- FieldInfo? fieldInfo = typeof(TaskOutStatusEnum).GetField(((TaskOutStatusEnum)item).ToString());
+ FieldInfo? fieldInfo = typeof(TaskStatusEnum).GetField(((TaskStatusEnum)item).ToString());
DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
if (description != null)
{
--
Gitblit v1.9.3