fix 退款重算,访客数据过滤

This commit is contained in:
2024-11-22 10:53:44 +08:00
parent 76f1103e5b
commit bfa38c9c3b
2 changed files with 8 additions and 1 deletions

View File

@@ -210,7 +210,10 @@ public class AppointmentService : IAppointmentService
{ {
return await _dbContext.Queryable<VisitorAppointmentDetailEntity>() return await _dbContext.Queryable<VisitorAppointmentDetailEntity>()
.LeftJoin<GainfoEntity>((x, ga) => ga.IdNo == x.IdNo) .LeftJoin<GainfoEntity>((x, ga) => ga.IdNo == x.IdNo)
.Where(x => SqlFunc.Subqueryable<VisitorAppointmentEntity>().Where(p => p.Factory == factory).Any()) .Where(x => SqlFunc.Subqueryable<VisitorAppointmentEntity>()
.Where(p => p.No == x.No)
.Where(p => p.Factory == factory).Any()
)
.Where(x => x.IsEnterDoorArea) .Where(x => x.IsEnterDoorArea)
.WhereIF(status.HasValue, x => x.DoorStatus == status) .WhereIF(status.HasValue, x => x.DoorStatus == status)
.Where(x => x.DoorStart >= start && x.DoorEnd <= end) .Where(x => x.DoorStart >= start && x.DoorEnd <= end)

View File

@@ -145,6 +145,10 @@ public class BalanceService : IBalanceService
.ExecuteCommandThrowVersionAsync(); .ExecuteCommandThrowVersionAsync();
}, 5); }, 5);
} }
else
{
await _balanceRepository.CalculateBalanceAsync(balanceRecord.UserCode);
}
} }
} }
} }