From ab2a36e708ebe16fda9d60be451ec834d7e25e67 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Mon, 17 Mar 2025 13:53:10 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E9=80=BB=E8=BE=91=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Response/DeviceUploadLogResponse.cs | 15 +++++++-------- .../Services/Implements/DeviceUploadLogService.cs | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Src/Dlhis.ScheduledTask/DeviceUploadLog/Response/DeviceUploadLogResponse.cs b/Src/Dlhis.ScheduledTask/DeviceUploadLog/Response/DeviceUploadLogResponse.cs index 05efb01d..63fdb1f1 100644 --- a/Src/Dlhis.ScheduledTask/DeviceUploadLog/Response/DeviceUploadLogResponse.cs +++ b/Src/Dlhis.ScheduledTask/DeviceUploadLog/Response/DeviceUploadLogResponse.cs @@ -1,5 +1,4 @@ -using Dlhis.ScheduledTask.DeviceUploadLog.Services.Implements; -using Kurisu.AspNetCore.Utils.Extensions; +using Kurisu.AspNetCore.Utils.Extensions; using Newtonsoft.Json; namespace Dlhis.ScheduledTask.DeviceUploadLog.Response; @@ -77,8 +76,8 @@ public class DeviceUploadLogResponse /// 是否有效 /// public bool Status { get; set; } - - + + /// /// 是否是异常记录 /// @@ -86,7 +85,7 @@ public class DeviceUploadLogResponse { get { - if (WorkGridInfo.IsEmpty()) + if (NeedUpload || WorkGridInfo.IsEmpty()) { return false; } @@ -99,12 +98,12 @@ public class DeviceUploadLogResponse [JsonIgnore] public string WorkGridInfo { get; set; } } + public class WorkGridInfo2 { public bool IsError { get; set; } } - public class DeviceUploadLogUserResponse { public long Id { get; set; } @@ -168,7 +167,7 @@ public class DeviceUploadLogUserResponse /// 是否有效 /// public bool Status { get; set; } - + /// /// 是否是异常记录 /// @@ -176,7 +175,7 @@ public class DeviceUploadLogUserResponse { get { - if (WorkGridInfo.IsEmpty()) + if (NeedUpload || WorkGridInfo.IsEmpty()) { return false; } diff --git a/Src/Dlhis.ScheduledTask/DeviceUploadLog/Services/Implements/DeviceUploadLogService.cs b/Src/Dlhis.ScheduledTask/DeviceUploadLog/Services/Implements/DeviceUploadLogService.cs index 73e9a614..658102f2 100644 --- a/Src/Dlhis.ScheduledTask/DeviceUploadLog/Services/Implements/DeviceUploadLogService.cs +++ b/Src/Dlhis.ScheduledTask/DeviceUploadLog/Services/Implements/DeviceUploadLogService.cs @@ -487,7 +487,7 @@ public class DeviceUploadLogService : IDeviceUploadLogService public class WorkGridInfo { - public bool IsError => !PeriodType.HasValue; + public bool IsError => TimeSetting != null && PeriodType.HasValue == false; public WorkGridInfoDetail WorkGrid { get; set; } public WorkGridTimePeriodEnumType? PeriodType { get; set; } public object TimeSetting { get; set; }