fix 同步离职异常问题
This commit is contained in:
@@ -497,7 +497,9 @@ public class BalanceService : IBalanceService
|
||||
|
||||
public async Task HainingImportAsync(BalanceHainingImportRequest request)
|
||||
{
|
||||
var gainfo = await _dbContext.Queryable<GainfoEntity>().Where(x => x.Code == request.UserCode).SingleAsync();
|
||||
var gainfo = await _dbContext.Queryable<GainfoEntity>().Where(x => x.Code == request.UserCode).SingleAsync()
|
||||
?? await _dbContext.Queryable<GainfoLeaveEntity>().Where(x => x.Code == request.UserCode).SingleAsync();
|
||||
|
||||
gainfo.ThrowIfNull($"工号{request.UserCode}不存在");
|
||||
var gainfoMeal = await _dbContext.Queryable<GainfoMealEntity>().Where(x => x.UserCode == request.UserCode).SingleAsync();
|
||||
if (gainfoMeal == null)
|
||||
@@ -558,7 +560,6 @@ public class BalanceService : IBalanceService
|
||||
DeviceUniqueNo = request.DeviceUniqueNo,
|
||||
|
||||
IsDeleted = false,
|
||||
|
||||
});
|
||||
|
||||
var newBalance = gainfoMeal.Balance += request.Amount;
|
||||
|
||||
Reference in New Issue
Block a user