From fcee0e365cf4f569a55954df5d36fec3d082c87b Mon Sep 17 00:00:00 2001 From: liguoyang Date: Wed, 28 Aug 2024 16:38:08 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=A4=84=E7=90=86=E6=97=A0=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/Services/Implements/SapBusinessTripService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Src/Dlhis.ScheduledTask/Common/Services/Implements/SapBusinessTripService.cs b/Src/Dlhis.ScheduledTask/Common/Services/Implements/SapBusinessTripService.cs index 6bdee989..d8d98633 100644 --- a/Src/Dlhis.ScheduledTask/Common/Services/Implements/SapBusinessTripService.cs +++ b/Src/Dlhis.ScheduledTask/Common/Services/Implements/SapBusinessTripService.cs @@ -37,6 +37,11 @@ public class SapBusinessTripService : ISapBusinessTripService try { var tripResponse = await _jinkoJipService.GetTravelInfosByFactoryAsync(today, today, factory); + if (!tripResponse.Items.Any()) + { + return; + } + foreach (var tripInfoItem in tripResponse.Items.Where(x => x.Destination.IsPresent())) { if (await _dbContext.Queryable().Where(x => x.Code == tripInfoItem.Code