huangxiaoqiang
7 小时以前 960b33fa24c47a330e51a2c24859d681ae62caeb
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_DictionaryController.cs
@@ -619,7 +619,35 @@
                        result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                    }
                    break;
                case "stationType":
                    {
                        List<object> data = new List<object>();
                        #region stationType
                        {
                            Type type = typeof(stationType);
                            List<int> enums = Enum.GetValues(typeof(stationType )).Cast<int>().ToList();
                            int index = 0;
                            foreach (var item in enums)
                            {
                                FieldInfo? fieldInfo = typeof(stationType).GetField(((stationType)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;
            }
            return result;
        }