| | |
| | | } |
| | | if (dicNos.Where(x => !cacheDicNos.Contains(x)).Count() > 0) |
| | | { |
| | | List<VueDictionaryDTO> selectDics = BaseDal.GetDictionaries(dicNos.Where(x => !cacheDicNos.Contains(x))).Select(s => new VueDictionaryDTO |
| | | List<string> list = dicNos.Where(x => !cacheDicNos.Contains(x)).ToList(); |
| | | List<Sys_Dictionary> dictionaries = BaseDal.GetDictionaries(list).ToList(); |
| | | |
| | | List<VueDictionaryDTO> selectDics = dictionaries.Select(s => new VueDictionaryDTO |
| | | { |
| | | DicNo = s.DicNo, |
| | | Config = s.Config, |
| | |
| | | Data = s.DicList.OrderByDescending(o => o.OrderNo).Select(list => new { key = list.DicValue, value = list.DicName }) |
| | | }).ToList(); |
| | | |
| | | foreach (var v in dictionaries) |
| | | { |
| | | if (!string.IsNullOrEmpty(v.DBSql)) |
| | | { |
| | | VueDictionaryDTO? temp = selectDics.FirstOrDefault(x => x.DicNo == v.DicNo); |
| | | if (temp != null) |
| | | selectDics.Remove(temp); |
| | | selectDics.Add(new VueDictionaryDTO |
| | | { |
| | | Config = v.Config, |
| | | DicNo = v.DicNo, |
| | | Data = BaseDal.QueryDynamicDataBySql(v.DBSql) |
| | | }); |
| | | } |
| | | } |
| | | |
| | | foreach (var item in selectDics) |
| | | { |
| | | if (!_cacheService.Exists(item.DicNo)) |