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; }