| | |
| | | get { return DictionaryManager.Dictionaries; } |
| | | } |
| | | |
| | | public object GetVueDictionary(string[] dicNos) |
| | | public async Task<object> GetVueDictionary(string[] dicNos) |
| | | { |
| | | if (dicNos == null || dicNos.Count() == 0) return new string[] { }; |
| | | var dicConfig = DictionaryManager.GetDictionaries(dicNos, false).Select(s => new |
| | | var dicConfig = await Task.FromResult( |
| | | DictionaryManager.GetDictionaries(dicNos, false).Select(s => new |
| | | { |
| | | dicNo = s.DicNo, |
| | | config = s.Config, |
| | | dbSql = s.DbSql, |
| | | list = s.Sys_DictionaryList.OrderByDescending(o => o.OrderNo) |
| | | .Select(list => new { key = list.DicValue, value = list.DicName }) |
| | | }).ToList(); |
| | | }).ToList()); |
| | | |
| | | object GetSourceData(string dicNo, string dbSql, object data) |
| | | { |
| | |
| | | }).ToList(); |
| | | } |
| | | |
| | | //public object GetVueDictionary(string[] dicNos) |
| | | //{ |
| | | // if (dicNos == null || dicNos.Count() == 0) return new string[] { }; |
| | | // var dicConfig = DictionaryManager.GetDictionaries(dicNos, false).Select(s => new |
| | | // { |
| | | // dicNo = s.DicNo, |
| | | // config = s.Config, |
| | | // dbSql = s.DbSql, |
| | | // list = s.Sys_DictionaryList.OrderByDescending(o => o.OrderNo) |
| | | // .Select(list => new { key = list.DicValue, value = list.DicName }) |
| | | // }).ToList(); |
| | | |
| | | // object GetSourceData(string dicNo, string dbSql, object data) |
| | | // { |
| | | // // 2020.05.01澧炲姞鏍规嵁鐢ㄦ埛淇℃伅鍔犺浇瀛楀吀鏁版嵁婧恠ql |
| | | // dbSql = DictionaryHandler.GetCustomDBSql(dicNo, dbSql); |
| | | // if (string.IsNullOrEmpty(dbSql)) |
| | | // { |
| | | // return data as object; |
| | | // } |
| | | // return repository.DapperContext.QueryList<object>(dbSql, null); |
| | | // } |
| | | // return dicConfig.Select(item => new |
| | | // { |
| | | // item.dicNo, |
| | | // item.config, |
| | | // data = GetSourceData(item.dicNo, item.dbSql, item.list) |
| | | // }).ToList(); |
| | | //} |
| | | |
| | | |
| | | /// <summary> |
| | | /// 閫氳繃杩滅▼鎼滅储 |