This commit is contained in:
2020-07-16 19:36:08 +00:00
parent 2ddc4029fb
commit 19b6670cde

View File

@@ -63,7 +63,7 @@ namespace AyaNova.Biz
var subs = await ct.NotifySubscription.AsNoTracking().Where(z => z.EventType == ev.EventType && z.AyaType == ev.AyaType && z.IdValue == ev.IdValue).ToListAsync(); var subs = await ct.NotifySubscription.AsNoTracking().Where(z => z.EventType == ev.EventType && z.AyaType == ev.AyaType && z.IdValue == ev.IdValue).ToListAsync();
foreach (var sub in subs) foreach (var sub in subs)
{ {
//Final condition if tags are specified //Tags condition
if (sub.Tags.Count > 0) if (sub.Tags.Count > 0)
{ {
if (!HasTags) if (!HasTags)
@@ -75,6 +75,14 @@ namespace AyaNova.Biz
continue; continue;
} }
//Decimal value, so far only for "The Andy" so the only condition is that the event value be greater than or equal to subscription setting
if (ev.EventType == NotifyEventType.WorkorderTotalExceedsThreshold && ev.DecValue < sub.DecValue)
continue;
//AgeValue
//Here we know the sub matches so create the NotifyEvent here //Here we know the sub matches so create the NotifyEvent here
NotifyEvent ne = new NotifyEvent() { }; NotifyEvent ne = new NotifyEvent() { };