fix 重算离职人员

This commit is contained in:
2024-08-22 15:45:32 +08:00
parent e70abaa48c
commit 359c7af1c6

View File

@@ -555,7 +555,9 @@ public class BalanceService : IBalanceService
{
await CommonHelper.RetryAsync(async () =>
{
var gainfo = await _dbContext.Queryable<GainfoEntity>().Where(x => x.Code == userCode).SingleAsync();
var gainfo = await _dbContext.Queryable<GainfoEntity>().Where(x => x.Code == userCode).SingleAsync()
?? await _dbContext.Queryable<GainfoLeaveEntity>().Where(x => x.Code == userCode).SingleAsync();
gainfo.ThrowIfNull("档案不存在");
var gainfoMeal = await _dbContext.Queryable<GainfoMealEntity>().Where(x => x.UserCode == gainfo.Code).FirstAsync();