fix 是否作为考勤分页返回

This commit is contained in:
2024-05-23 14:49:00 +08:00
parent 75f9edb1fa
commit 3d3d17c799

View File

@@ -84,6 +84,12 @@ public class DevicePageResponse
/// </summary> /// </summary>
public bool Enable { get; set; } public bool Enable { get; set; }
/// <summary>
/// 是否作为考勤
/// </summary>
public bool AsAttendance { get; set; }
//*********************************************************附加信息**************************************************************/ //*********************************************************附加信息**************************************************************/
@@ -101,13 +107,11 @@ public class DevicePageResponse
{ {
if (!LastHeartbeatTime.HasValue) if (!LastHeartbeatTime.HasValue)
return false; return false;
else
{ if (HeartbeatInterval <= 0)
if (HeartbeatInterval <= 0) return true;
return true;
else return LastHeartbeatTime.Value.AddSeconds(HeartbeatInterval * 3) >= DateTime.Now;
return LastHeartbeatTime.Value.AddSeconds(HeartbeatInterval * 3) >= DateTime.Now;
}
} }
} }