wanshenmean
10 天以前 4fc1be40676b5f9928da3a83bdb1c215d0584ae9
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs
@@ -318,6 +318,28 @@
                            }
                            #endregion
                            #region TaskRobotStatusEnum
                            {
                                Type type = typeof(TaskRobotStatusEnum);
                                List<int> enums = Enum.GetValues(typeof(TaskRobotStatusEnum)).Cast<int>().ToList();
                                int index = 0;
                                foreach (var item in enums)
                                {
                                    FieldInfo? fieldInfo = typeof(TaskRobotStatusEnum).GetField(((TaskRobotStatusEnum)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;
@@ -369,7 +391,7 @@
                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                        }
                        break;
                        case "dispatchId":
                    case "dispatchId":
                        {
                            Type type = typeof(IJob);
                            var basePath = AppContext.BaseDirectory;
@@ -403,4 +425,4 @@
            }
        }
    }
}
}