|
|
@ -43,6 +43,7 @@ namespace VOL.System.Services
|
|
|
|
dbSql = s.DbSql,
|
|
|
|
dbSql = s.DbSql,
|
|
|
|
list = s.Sys_DictionaryList.OrderByDescending(o => o.OrderNo)
|
|
|
|
list = s.Sys_DictionaryList.OrderByDescending(o => o.OrderNo)
|
|
|
|
.Select(list => new { key = list.DicValue, value = list.DicName }),
|
|
|
|
.Select(list => new { key = list.DicValue, value = list.DicName }),
|
|
|
|
|
|
|
|
|
|
|
|
CompanyField = string.IsNullOrWhiteSpace(s.CompanyField)?"": s.CompanyField
|
|
|
|
CompanyField = string.IsNullOrWhiteSpace(s.CompanyField)?"": s.CompanyField
|
|
|
|
}).ToList());
|
|
|
|
}).ToList());
|
|
|
|
|
|
|
|
|
|
|
@ -66,6 +67,41 @@ namespace VOL.System.Services
|
|
|
|
}).ToList();
|
|
|
|
}).ToList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<object> GetVueDictionary_VT(string[] dicNos)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (dicNos == null || dicNos.Count() == 0) return new string[] { };
|
|
|
|
|
|
|
|
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 { value = list.DicValue, text = list.DicName }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CompanyField = string.IsNullOrWhiteSpace(s.CompanyField) ? "" : s.CompanyField
|
|
|
|
|
|
|
|
}).ToList());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
object GetSourceData(string dicNo, string dbSql, string CompanyField, object data)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// 2020.05.01增加根据用户信息加载字典数据源sql
|
|
|
|
|
|
|
|
dbSql = DictionaryHandler.GetCustomDBSql(dicNo, dbSql, CompanyField);
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(dbSql))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return data as object;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return repository.DapperContext.QueryList<object>(dbSql, null);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return dicConfig.Select(item => new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
item.dicNo,
|
|
|
|
|
|
|
|
item.config,
|
|
|
|
|
|
|
|
item.CompanyField,
|
|
|
|
|
|
|
|
data = GetSourceData(item.dicNo, item.dbSql, item.CompanyField, item.list)
|
|
|
|
|
|
|
|
}).ToList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 通过远程搜索
|
|
|
|
/// 通过远程搜索
|
|
|
|