fix 数据问题处理

This commit is contained in:
2024-04-16 19:38:54 +08:00
parent 8fb18ef1c6
commit 581294237c

View File

@@ -368,7 +368,10 @@ public class GainfoUpdateService : IGainfoUpdateService
gainfo.Id = 0;
gainfo.ResignationDate = item.ZLZRQ;
await _dbContext.Client.Insertable(gainfo).AS("GainfoLeave").ExecuteCommandAsync();
if (!await _dbContext.Queryable<GainfoLeaveEntity>().AnyAsync(x => x.Code == item.ename))
{
await _dbContext.Client.Insertable(gainfo).AS("GainfoLeave").ExecuteCommandAsync();
}
await _dbContext.DeleteReallyAsync(gainfo);
}
else