fix 时间匹配
This commit is contained in:
@@ -15,7 +15,7 @@ public class VoucherBalancePageResponse
|
||||
public string No { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 档案号/QRCode
|
||||
/// 档案号
|
||||
/// </summary>
|
||||
public string UserNo { get; set; }
|
||||
|
||||
|
||||
@@ -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.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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user