| | |
| | | if (vueDictionaryDTO != null) |
| | | { |
| | | vueDictionaryDTOs.Add(vueDictionaryDTO); |
| | | if (!_cacheService.Exists(item)) |
| | | if (!_cacheService.Exists(item) && vueDictionaryDTO.SaveCache) |
| | | { |
| | | _cacheService.Add(item, vueDictionaryDTO.Serialize()); |
| | | } |
| | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "locationTypeEnum": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | |
| | | { |
| | | Type type = typeof(LocationTypeEnum); |
| | | List<int> enums = Enum.GetValues(typeof(LocationTypeEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(LocationTypeEnum).GetField(((LocationTypeEnum)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>(); |