短信提醒 已超期的不提醒

This commit is contained in:
wyw 2025-05-21 08:52:24 +08:00
parent 180e3737bf
commit 191e1c7d6b

View File

@ -293,7 +293,7 @@ namespace APT.SC.WebApi.Controllers.Api.BI
List<T_FM_NOTIFICATION_TASK> sendSMSs = null; List<T_FM_NOTIFICATION_TASK> sendSMSs = null;
if (now.Hour >= 7 && now.Hour < 20) if (now.Hour >= 7 && now.Hour < 20)
{ {
sendSMSs = GetEntities<T_FM_NOTIFICATION_TASK>(t => t.NOTICE_STATUS == 0 && t.CREATE_TIME > now.AddDays(-12) && !t.SOURCE_FORMCODE.Contains("FO005") && t.SENDTIME == DateTime.MinValue, new BaseFilter(filter.GetOrgId())).ToList(); sendSMSs = GetEntities<T_FM_NOTIFICATION_TASK>(t => t.NOTICE_STATUS == 0 && t.TASK_ENDDT >= now && t.CREATE_TIME > now.AddDays(-12) && !t.SOURCE_FORMCODE.Contains("FO005") && t.SENDTIME == DateTime.MinValue, new BaseFilter(filter.GetOrgId())).ToList();//未超期的进行提醒
var sendSMSs2 = sendSMSs.Where(t => t.TASK_ENDDT < now.AddHours(1) && t.TASK_ENDDT > t.TASK_STARTDT); var sendSMSs2 = sendSMSs.Where(t => t.TASK_ENDDT < now.AddHours(1) && t.TASK_ENDDT > t.TASK_STARTDT);
foreach (var send in sendSMSs2)//1个小时以内 临超时提醒 foreach (var send in sendSMSs2)//1个小时以内 临超时提醒
{ {