| | |
| | | |
| | | foreach (var item in dics) |
| | | { |
| | | if (dicList.Contains(item)) |
| | | cusDics.Add(item); |
| | | dicList.Remove(item); |
| | | cusDics.Add(item); |
| | | } |
| | | |
| | | foreach (var item in cusDics) |
| | |
| | | VueDictionaryDTO vueDictionaryDTO = GetVueDictionary(item.Trim()); |
| | | if (vueDictionaryDTO != null) |
| | | { |
| | | vueDictionaryDTOs.Add(vueDictionaryDTO); |
| | | if (!_cacheService.Exists(item)) |
| | | { |
| | | vueDictionaryDTOs.Add(vueDictionaryDTO); |
| | | _cacheService.Add(item, vueDictionaryDTO.Serialize()); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | { |
| | | Type type = typeof(AGVTaskStatusEnum); |
| | | List<int> enums = Enum.GetValues(typeof(AGVTaskStatusEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(AGVTaskStatusEnum).GetField(((AGVTaskStatusEnum)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++; |
| | | } |
| | | } |
| | | //{ |
| | | // Type type = typeof(AGVTaskStatusEnum); |
| | | // List<int> enums = Enum.GetValues(typeof(AGVTaskStatusEnum)).Cast<int>().ToList(); |
| | | // int index = 0; |
| | | // foreach (var item in enums) |
| | | // { |
| | | // FieldInfo? fieldInfo = typeof(AGVTaskStatusEnum).GetField(((AGVTaskStatusEnum)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 }; |
| | | } |