fix 时间匹配

This commit is contained in:
2025-12-10 15:28:36 +08:00
parent 7a50b21592
commit 4dc3bff28a
2 changed files with 5 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ public class VoucherBalancePageResponse
public string No { get; set; }
/// <summary>
/// 档案号/QRCode
/// 档案号
/// </summary>
public string UserNo { get; set; }

View File

@@ -9,7 +9,7 @@ namespace Dlhis.ScheduledTask.Jobs;
/// <summary>
/// 每天10点提醒访客预约到期
/// </summary>
[RecurringJob(nameof(TipAppointmentExpireJob), "0 0 10 * * ?", Name = "提醒到访人访客将要到期")]
[RecurringJob(nameof(TipAppointmentExpireJob), "0 0 10 * * ?", Name = "提醒到访人访客将要到期", RunOnDevelopment = true)]
public class TipAppointmentExpireJob : BaseJob
{
private readonly IDingTalkApi _dingTalkApi;
@@ -54,17 +54,16 @@ public class TipAppointmentExpireJob : BaseJob
private static bool IsWarningData(VisitorAppointmentDetailEntity detail)
{
var now = DateTime.Now.Date.AddDays(-3);
if (detail.IsEnterDoorArea
&& detail.DoorStatus == VisitorAppointmentDetailStatusEnumType.Arrived
&& detail.DoorEnd.Value.Date == now)
&& detail.DoorStatus == VisitorAppointmentDetailStatusEnumType.Arrived
&& detail.DoorEnd.Value.Date.AddDays(-3) == DateTime.Today)
{
return true;
}
if (detail.IsEnterWorkplace
&& detail.WorkplaceStatus == VisitorAppointmentDetailStatusEnumType.Arrived
&& detail.WorkplaceEnd.Value.Date <= now)
&& detail.WorkplaceEnd.Value.Date.AddDays(-3) == DateTime.Today)
{
return true;
}