From 639432234f534fb1aadc237e29b900f4bec56463 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Wed, 5 Mar 2025 14:42:54 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E8=80=83=E5=8B=A4=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0needUpload=E9=87=8D=E6=96=B0=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Implements/DeviceUploadLogService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Src/Dlhis.ScheduledTask/DeviceUploadLog/Services/Implements/DeviceUploadLogService.cs b/Src/Dlhis.ScheduledTask/DeviceUploadLog/Services/Implements/DeviceUploadLogService.cs index d98f124b..c9a09dcf 100644 --- a/Src/Dlhis.ScheduledTask/DeviceUploadLog/Services/Implements/DeviceUploadLogService.cs +++ b/Src/Dlhis.ScheduledTask/DeviceUploadLog/Services/Implements/DeviceUploadLogService.cs @@ -99,7 +99,7 @@ public class DeviceUploadLogService : IDeviceUploadLogService var workGridInfo = new WorkGridInfo(); var currentWorkGridTimePeriods = workGridTimePeriods.Where(x => x.TenantId == device.TenantId).ToList(); var workGridUser = workGridUsers.FirstOrDefault(x => x.UserCode == request.UserUniqueNo); - if (currentWorkGridTimePeriods.Any() && workGridUser != null) + if (needUpload && currentWorkGridTimePeriods.Any() && workGridUser != null) { workGridInfo.TimeSetting = currentWorkGridTimePeriods; workGridInfo.WorkGrid = new @@ -152,6 +152,8 @@ public class DeviceUploadLogService : IDeviceUploadLogService } } } + + needUpload = workGridInfo.PeriodType.HasValue; } inserts.Add(new DeviceUploadLogEntity @@ -406,6 +408,4 @@ public class WorkGridInfo public object WorkGrid { get; set; } public WorkGridTimePeriodEnumType? PeriodType { get; set; } public object TimeSetting { get; set; } - - public bool NeedUpload => WorkGrid != null && PeriodType.HasValue; } \ No newline at end of file