|
|
|
@ -30,10 +30,21 @@ public class ClientBankService : ServiceBase, IClientBankService
|
|
|
|
|
{
|
|
|
|
|
//序列化查询条件
|
|
|
|
|
var whereList = request.GetConditionalModels(Db);
|
|
|
|
|
var data = TenantDb.Queryable<InfoClientBank>()
|
|
|
|
|
var result = TenantDb.Queryable<InfoClientBank>()
|
|
|
|
|
.Where(whereList)
|
|
|
|
|
.Select<ClientBankRes>().ToQueryPage(request.PageCondition);
|
|
|
|
|
return data;
|
|
|
|
|
|
|
|
|
|
if (result.Data?.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
var ids = result.Data.Select(x => x.Id);
|
|
|
|
|
var list = TenantDb.Queryable<InvoiceHeader>().Where(x => ids.Contains(x.RelativeId)).ToList();
|
|
|
|
|
foreach (var item in result.Data)
|
|
|
|
|
{
|
|
|
|
|
item.InvoiceHeaders = list.FindAll(x => x.RelativeId == item.Id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|