fix 任务生成优化

This commit is contained in:
2024-02-27 12:25:42 +08:00
parent 33beb39408
commit 87d7d62c20
7 changed files with 111 additions and 140 deletions

View File

@@ -12,13 +12,18 @@ public class AttendanceDeviceSummary
/// <summary>
/// 在线数
/// </summary>
public int OnlineCount { get; set; }
public int OnlineCount { get; set; }
/// <summary>
/// 启用数
/// </summary>
public int EnableCount { get; set; }
/// <summary>
/// 离线数
/// </summary>
public int OfflineCount => Total - OnlineCount;
/// <summary>
/// 新增设备趋势 30天内
/// </summary>

View File

@@ -53,7 +53,7 @@ public class SummaryService : ISummaryService
{
if (x.HeartbeatInterval <= 0)
{
return false;
return true;
}
return x.LastHeartbeatTime.AddSeconds(x.HeartbeatInterval * 3) >= now;