fix 字段优化

This commit is contained in:
cheche
2024-03-12 09:24:53 +08:00
parent 5684078071
commit 15f89a82a2
5 changed files with 17 additions and 1 deletions

View File

@@ -298,6 +298,12 @@ public class BalanceService : IBalanceService
lst.Add(obj);
}
var departments = await _dbContext.Queryable<DepartmentEntity>().ToListAsync();
lst.ForEach(x =>
{
x.DepartmentName = departments.Where(d => d.No == x.DepartmentNo).Select(d => d.Name).First();
});
// 分页操作
var startIndex = (request.PageIndex - 1) * request.PageSize;
var pagedData = lst.Skip(startIndex).Take(request.PageSize).ToList();