往来单位银行列表返回发票抬头

usertest
嵇文龙 3 months ago
parent 59989f370b
commit ca79511919

@ -30,10 +30,21 @@ public class ClientBankService : ServiceBase, IClientBankService
{ {
//序列化查询条件 //序列化查询条件
var whereList = request.GetConditionalModels(Db); var whereList = request.GetConditionalModels(Db);
var data = TenantDb.Queryable<InfoClientBank>() var result = TenantDb.Queryable<InfoClientBank>()
.Where(whereList) .Where(whereList)
.Select<ClientBankRes>().ToQueryPage(request.PageCondition); .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> /// <summary>

Loading…
Cancel
Save