fix 时间匹配
This commit is contained in:
@@ -15,7 +15,7 @@ public class VoucherBalancePageResponse
|
|||||||
public string No { get; set; }
|
public string No { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 档案号/QRCode
|
/// 档案号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string UserNo { get; set; }
|
public string UserNo { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace Dlhis.ScheduledTask.Jobs;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 每天10点提醒访客预约到期
|
/// 每天10点提醒访客预约到期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RecurringJob(nameof(TipAppointmentExpireJob), "0 0 10 * * ?", Name = "提醒到访人访客将要到期")]
|
[RecurringJob(nameof(TipAppointmentExpireJob), "0 0 10 * * ?", Name = "提醒到访人访客将要到期", RunOnDevelopment = true)]
|
||||||
public class TipAppointmentExpireJob : BaseJob
|
public class TipAppointmentExpireJob : BaseJob
|
||||||
{
|
{
|
||||||
private readonly IDingTalkApi _dingTalkApi;
|
private readonly IDingTalkApi _dingTalkApi;
|
||||||
@@ -54,17 +54,16 @@ public class TipAppointmentExpireJob : BaseJob
|
|||||||
|
|
||||||
private static bool IsWarningData(VisitorAppointmentDetailEntity detail)
|
private static bool IsWarningData(VisitorAppointmentDetailEntity detail)
|
||||||
{
|
{
|
||||||
var now = DateTime.Now.Date.AddDays(-3);
|
|
||||||
if (detail.IsEnterDoorArea
|
if (detail.IsEnterDoorArea
|
||||||
&& detail.DoorStatus == VisitorAppointmentDetailStatusEnumType.Arrived
|
&& detail.DoorStatus == VisitorAppointmentDetailStatusEnumType.Arrived
|
||||||
&& detail.DoorEnd.Value.Date == now)
|
&& detail.DoorEnd.Value.Date.AddDays(-3) == DateTime.Today)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (detail.IsEnterWorkplace
|
if (detail.IsEnterWorkplace
|
||||||
&& detail.WorkplaceStatus == VisitorAppointmentDetailStatusEnumType.Arrived
|
&& detail.WorkplaceStatus == VisitorAppointmentDetailStatusEnumType.Arrived
|
||||||
&& detail.WorkplaceEnd.Value.Date <= now)
|
&& detail.WorkplaceEnd.Value.Date.AddDays(-3) == DateTime.Today)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user