fix 逻辑增加判断
This commit is contained in:
@@ -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
|
||||
/// 是否有效
|
||||
/// </summary>
|
||||
public bool Status { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否是异常记录
|
||||
/// </summary>
|
||||
@@ -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
|
||||
/// 是否有效
|
||||
/// </summary>
|
||||
public bool Status { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否是异常记录
|
||||
/// </summary>
|
||||
@@ -176,7 +175,7 @@ public class DeviceUploadLogUserResponse
|
||||
{
|
||||
get
|
||||
{
|
||||
if (WorkGridInfo.IsEmpty())
|
||||
if (NeedUpload || WorkGridInfo.IsEmpty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user