|
|
|
@ -260,12 +260,6 @@ public class ClientInfoService : ServiceBase, IClientInfoService
|
|
|
|
|
{
|
|
|
|
|
//序列化查询条件
|
|
|
|
|
var whereList = request.GetConditionalModels(Db);
|
|
|
|
|
foreach (var item in whereList)
|
|
|
|
|
{
|
|
|
|
|
var condition = (ConditionalModel)item;
|
|
|
|
|
condition.FieldName = "c." + condition.FieldName.ToUpperCamelCase();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var query = TenantDb.Queryable<InfoClient>()
|
|
|
|
|
.LeftJoin<InfoClientContact>((c, c1) => c.Id == c1.ClientId)
|
|
|
|
|
.LeftJoin<InfoClientContract>((c, c1, c2) => c.Id == c2.ClientId)
|
|
|
|
@ -297,7 +291,14 @@ public class ClientInfoService : ServiceBase, IClientInfoService
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var result = await query.Where(whereList).Select<ClientInfoRes>().ToQueryPageAsync(request.PageCondition);
|
|
|
|
|
var result = await query.Select((c, c1, c2, ct) => new ClientInfoRes
|
|
|
|
|
{
|
|
|
|
|
CodeName = c.CodeName,
|
|
|
|
|
Name = c.Name,
|
|
|
|
|
ShortName = c.ShortName,
|
|
|
|
|
EnShortName = c.EnShortName,
|
|
|
|
|
EnFullName = c.EnFullName
|
|
|
|
|
}, true).MergeTable().Where(whereList).ToQueryPageAsync(request.PageCondition);
|
|
|
|
|
|
|
|
|
|
if (result.Data?.Count > 0)
|
|
|
|
|
{
|
|
|
|
|