zhanghonglin
5 天以前 96a94a59c08f55712ba04eb413e7f61739f11f66
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs
@@ -24,6 +24,7 @@
using WIDESEAWCS_Core.Enums;
using WIDESEAWCS_Common.LocationEnum;
using WIDESEAWCS_Common.StockEnum;
using WIDESEAWCS_Common.WeightThicknessEnum;
namespace WIDESEAWCS_WCSServer.Controllers.System
{
@@ -470,6 +471,33 @@
                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                        }
                        break;
                    case "WeightThicknessEnum":
                        {
                            List<object> data = new List<object>();
                            {
                                Type type = typeof(WeightThicknessEnum);
                                List<int> enums = Enum.GetValues(typeof(WeightThicknessEnum)).Cast<int>().ToList();
                                int index = 0;
                                foreach (var item in enums)
                                {
                                    FieldInfo? fieldInfo = typeof(WeightThicknessEnum).GetField(((WeightThicknessEnum)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;
                    case "locationTypeEnum":
                        {
                            List<object> data = new List<object>();