1
huanghongfeng
2025-02-28 3163fec4985ebc87ea859087cdedacad749096d9
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs
@@ -508,6 +508,54 @@
                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                        }
                        break;
                    case "InventoryMaterialType":
                        {
                            List<object> data = new List<object>();
                            Type type = typeof(InventoryMaterialType);
                            List<int> enums = Enum.GetValues(typeof(InventoryMaterialType)).Cast<int>().ToList();
                            int index = 0;
                            foreach (var item in enums)
                            {
                                FieldInfo? fieldInfo = typeof(InventoryMaterialType).GetField(((InventoryMaterialType)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 "InventoryMaterialStatus":
                        {
                            List<object> data = new List<object>();
                            Type type = typeof(InventoryMaterialStatus);
                            List<int> enums = Enum.GetValues(typeof(InventoryMaterialStatus)).Cast<int>().ToList();
                            int index = 0;
                            foreach (var item in enums)
                            {
                                FieldInfo? fieldInfo = typeof(InventoryMaterialStatus).GetField(((InventoryMaterialStatus)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 "stockStatusEmun":
                        {
                            List<object> data = new List<object>();
@@ -556,30 +604,7 @@
                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                        }
                        break;
                    case "inventoryMaterialType":
                        {
                            List<object> data = new List<object>();
                            Type type = typeof(InventoryMaterialType);
                            List<int> enums = Enum.GetValues(typeof(InventoryMaterialType)).Cast<int>().ToList();
                            int index = 0;
                            foreach (var item in enums)
                            {
                                FieldInfo? fieldInfo = typeof(InventoryMaterialType).GetField(((InventoryMaterialType)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 "outStockStatus":
                        {
                            List<object> data = new List<object>();