This commit is contained in:
2024-08-03 21:50:46 +08:00
parent 9b671a1f8d
commit 932e53e4a2

View File

@@ -46,8 +46,9 @@ public class BalanceService : IBalanceService
public async Task<Pagination<BalanceRecordResponse>> GetPageAsync(BalanceRecordPageRequest request)
{
var page = await _dbContext.Queryable<BalanceRecordEntity>()
.LeftJoinIF<GainfoEntity>(request.GainfoStatus == GainfoStatusEnumType.Working, (record, ga) => record.UserNo == ga.No)
.LeftJoinIF<GainfoLeaveEntity>(request.GainfoStatus == GainfoStatusEnumType.Leave, (record, ga) => record.UserNo == ga.No)
.LeftJoin<GainfoEntity>((record, ga) => record.UserNo == ga.No)
//.LeftJoinIF<GainfoEntity>(request.GainfoStatus == GainfoStatusEnumType.Working, (record, ga) => record.UserNo == ga.No)
//.LeftJoinIF<GainfoLeaveEntity>(request.GainfoStatus == GainfoStatusEnumType.Leave, (record, ga) => record.UserNo == ga.No)
.LeftJoin<DepartmentEntity>((record, ga, department) => ga.DepartmentNo == department.No)
.LeftJoin<BusinessPlaceEntity>((record, ga, department, bPlace) => record.BusinessPlaceCode == bPlace.Code)
.LeftJoin<CanteenOrderEntity>((record, ga, department, bPlace, order) => record.No == order.No)