From 9cc9b76b56557466fa51fe3f1ebfa87c011b0991 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Wed, 21 Feb 2024 18:57:04 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=BC=82=E6=AD=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Src/Dlhis.ScheduledTask/SyncSapInfo/Job/SyncPersonJob.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Src/Dlhis.ScheduledTask/SyncSapInfo/Job/SyncPersonJob.cs b/Src/Dlhis.ScheduledTask/SyncSapInfo/Job/SyncPersonJob.cs index 37ecd090..7cc93ed6 100644 --- a/Src/Dlhis.ScheduledTask/SyncSapInfo/Job/SyncPersonJob.cs +++ b/Src/Dlhis.ScheduledTask/SyncSapInfo/Job/SyncPersonJob.cs @@ -7,7 +7,6 @@ using Dlhis.ScheduledTask.SyncSapInfo.Dto; using Dlhis.ScheduledTask.SyncSapInfo.Comparers; using Dlhis.ScheduledTask.SyncSapInfo.Services; using Kurisu.AspNetCore.Scope; -using Microsoft.Extensions.Logging; namespace Dlhis.ScheduledTask.SyncSapInfo.Job; @@ -39,7 +38,7 @@ public class SyncPersonJob _logger.LogInformation("SAP人员差异数量为:{count}", modifiedPersons.Count); if (modifiedPersons.Count > 0) { - var failedRecords = SavePerson(modifiedPersons); + var failedRecords = await SavePerson(modifiedPersons); } }); } @@ -81,7 +80,7 @@ public class SyncPersonJob i++; try { - await SavePerson(dbContext, item); + await InsertPerson(dbContext, item); } catch (Exception ex) { @@ -111,7 +110,7 @@ public class SyncPersonJob return 0; } - private async Task SavePerson(IDbContext db, GainfoSapEntity item) + private async Task InsertPerson(IDbContext db, GainfoSapEntity item) { var info = new GainfoEntity {