This commit is contained in:
2020-07-15 19:53:48 +00:00
parent 5318fa261d
commit 6e217ad012
10 changed files with 76 additions and 66 deletions

2
.vscode/launch.json vendored
View File

@@ -50,7 +50,7 @@
"AYANOVA_USE_URLS": "http://*:7575;",
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
"AYANOVA_SERVER_TEST_MODE":"false",
"AYANOVA_SERVER_TEST_MODE":"true",
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL":"small",
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET":"-7",
"AYANOVA_BACKUP_PG_DUMP_PATH":"C:\\data\\code\\PostgreSQLPortable_12.0\\App\\PgSQL\\bin\\"

View File

@@ -190,7 +190,7 @@ methods they have two entries here, no other table indicates events to be tracke
so for example a CreatedWithTag notification or UpdatedWithTag notification will work on any object with that tag if global or a specific type i.e. customer with that tag
Then they can control by tag as well, intags are used to filter and include (or any if no intags), outtags filter out and trump intags
These are also used for tag type conditions
(aID, userId, ayatype, aEventType, advancenoticetimespan, idvalue, decvalue, aDeliveryMethod, deliveryaddress, attachreportid, intags, outtags, HASH)
(aID, userId, ayatype, aEventType, advancenoticetimespan, agevalue, idvalue, decvalue, aDeliveryMethod, deliveryaddress, attachreportid, intags, outtags, HASH)
/Notifyevent table - contains all events, created by updating objects or directly in some cases and used by generator for processing as deliveries
created (timestamp used to clean out old stuck events), ayatype, objectid, eventtype, appliestouserid (single subscriber event), aEventDate, ASAVEDMESSAGE, HASH?
@@ -253,6 +253,7 @@ WorkorderItemPartRequestCreated case 3652 [GENERAL]
ContractExpiring - Customer version in addition to User version [CUSTOMER]
WorkorderTotalExceedsThreshold - Custom notification case 1745 "the andy" [GENERAL] [CONDITION: DOLLARTOTAL money value]
WorkOrderStatusAge "deadman" delivery if *SPECIFIC* status not changed to different status before XX time period [GENERAL] https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/1137
NOTE: this will need a timespan with a different title
QuoteStatusAge [PERSONAL (prepared by), GENERAL]
UnitWarranyExpiry case 1361 [GENERAL]

View File

@@ -239,7 +239,7 @@ namespace AyaNova.Api.Controllers
TranslationKeysToFetch.Add("NotifyEventCSRRejected");
TranslationKeysToFetch.Add("NotifyEventWorkorderClosed");
TranslationKeysToFetch.Add("NotifyEventQuoteStatusChange");
//TranslationKeysToFetch.Add("NotifyEventWorkorderFollowUp");
TranslationKeysToFetch.Add("NotifyEventObjectAge");
TranslationKeysToFetch.Add("NotifyEventServiceBankDepleted");
TranslationKeysToFetch.Add("NotifyEventReminderImminent");
TranslationKeysToFetch.Add("NotifyEventScheduledOnWorkorder");
@@ -269,7 +269,7 @@ namespace AyaNova.Api.Controllers
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventCSRRejected"], Id = (long)NotifyEventType.CSRRejected });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventWorkorderClosed"], Id = (long)NotifyEventType.WorkorderClosed });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventQuoteStatusChange"], Id = (long)NotifyEventType.QuoteStatusChange });
// ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventWorkorderFollowUp"], Id = (long)NotifyEventType.WorkorderFollowUp });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventObjectAge"], Id = (long)NotifyEventType.ObjectAge });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventServiceBankDepleted"], Id = (long)NotifyEventType.ServiceBankDepleted });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventReminderImminent"], Id = (long)NotifyEventType.ReminderImminent });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventScheduledOnWorkorder"], Id = (long)NotifyEventType.ScheduledOnWorkorder });
@@ -286,7 +286,7 @@ namespace AyaNova.Api.Controllers
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventWorkorderStatusAge"], Id = (long)NotifyEventType.WorkorderStatusAge });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventUnitWarrantyExpiry"], Id = (long)NotifyEventType.UnitWarrantyExpiry });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventUnitMeterReadingMultipleExceeded"], Id = (long)NotifyEventType.UnitMeterReadingMultipleExceeded });
//ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventDefaultNotification"], Id = (long)NotifyEventType.DefaultNotification });
// ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventDefaultNotification"], Id = (long)NotifyEventType.DefaultNotification });
}
else if (keyNameInLowerCase == StringUtil.TrimTypeName(typeof(NotifyDeliveryMethod).ToString()).ToLowerInvariant())

View File

@@ -13,30 +13,30 @@ namespace AyaNova.Biz
ObjectDeleted = 1,
ObjectCreated = 2,
ObjectModified = 3,
WorkorderStatusChange=4,
ContractExpiring=5,
CSRAccepted=6,
CSRRejected=7,
WorkorderClosed=8,
QuoteStatusChange=9,
// WorkorderFollowUp=10,
ServiceBankDepleted=11,
ReminderImminent=12,
ScheduledOnWorkorder=13,
ScheduledOnWorkorderImminent=14,
WorkorderCloseByPassed=15,
OutsideServiceOverdue=16,
OutsideServiceReceived=17,
PartRequestReceived=18,
NotifyHealthCheck=19,//with timespan to set frequency
BackupStatus=20,
CustomerServiceImminent=21,
PartRequested=22,
WorkorderTotalExceedsThreshold=23,//"the Andy"
WorkorderStatusAge=24,//sitting too long in same status
UnitWarrantyExpiry=25,
UnitMeterReadingMultipleExceeded=26,
DefaultNotification=27//old quick notification, refers now to any direct text notification internal or user to user used for system notifications
WorkorderStatusChange = 4,
ContractExpiring = 5,
CSRAccepted = 6,
CSRRejected = 7,
WorkorderClosed = 8,
QuoteStatusChange = 9,
ObjectAge = 10,
ServiceBankDepleted = 11,
ReminderImminent = 12,
ScheduledOnWorkorder = 13,
ScheduledOnWorkorderImminent = 14,
WorkorderCloseByPassed = 15,
OutsideServiceOverdue = 16,
OutsideServiceReceived = 17,
PartRequestReceived = 18,
NotifyHealthCheck = 19,//with timespan to set frequency
BackupStatus = 20,
CustomerServiceImminent = 21,
PartRequested = 22,
WorkorderTotalExceedsThreshold = 23,//"the Andy"
WorkorderStatusAge = 24,//sitting too long in same status
UnitWarrantyExpiry = 25,
UnitMeterReadingMultipleExceeded = 26,
DefaultNotification = 27//old quick notification, refers now to any direct text notification internal or user to user used for system notifications
//NEW ITEMS REQUIRE translation KEYS

View File

@@ -22,6 +22,7 @@ namespace AyaNova.Models
public TimeSpan? AdvanceNotice { get; set; } //Note: I've been doing nullable wrong sort of: https://stackoverflow.com/a/29149207/8939
public long? IdValue { get; set; }
public decimal? DecValue { get; set; }
public TimeSpan? AgeValue {get;set;}//for events that depend on an age of something (e.g. WorkorderStatusAge)
[Required]
public NotifyDeliveryMethod DeliveryMethod { get; set; }
public string DeliveryAddress { get; set; }

View File

@@ -1548,7 +1548,7 @@
"PageOfPageText": "{0}-{1} von {2}",
"Loading": "Wird geladen...",
"Tags": "Kategorien",
"Tag":"Tag",
"Tag": "Tag",
"UserTypeServiceContractor": "Subunternehmer",
"AuthorizationRoles": "Autorisierungsrollen",
"AuthorizationRoleNoRole": "Keine Rolle",
@@ -1850,14 +1850,14 @@
"MoveSelected": "Verschieben Sie ausgewählte Elemente",
"DeleteSelected": "Ausgewählte Elemente löschen",
"Event": "Veranstaltung",
"Extensions":"Erweiterungen",
"SelectedItems":"Ausgewählte Elemente",
"Remove":"Entfernen",
"NotifyDeliveryMethod":"Benachrichtigungsversandmethode",
"NotifyEventType":"Benachrichtigungsereignis",
"NotifyDeliveryAddress":"An Adresse liefern",
"InTags":"Filtern Sie in diesen Tags",
"OutTags":"Filtern Sie diese Tags heraus",
"Extensions": "Erweiterungen",
"SelectedItems": "Ausgewählte Elemente",
"Remove": "Entfernen",
"NotifyDeliveryMethod": "Benachrichtigungsversandmethode",
"NotifyEventType": "Benachrichtigungsereignis",
"NotifyDeliveryAddress": "An Adresse liefern",
"InTags": "Filtern Sie in diesen Tags",
"OutTags": "Filtern Sie diese Tags heraus",
"NotifyEventObjectDeleted": "Objekt gelöscht",
"NotifyEventObjectCreated": "Objekt erstellt",
"NotifyEventObjectModified": "Objekt geändert",
@@ -1866,7 +1866,7 @@
"NotifyEventCSRAccepted": "Kundendienstanfrage angenommen",
"NotifyEventCSRRejected": "Kundendienstanfrage abgelehnt",
"NotifyEventWorkorderClosed": "Arbeitsauftrag geschlossen",
"NotifyEventQuoteStatusChange": "Angebotsstatus geändert",
"NotifyEventQuoteStatusChange": "Angebotsstatus geändert",
"NotifyEventServiceBankDepleted": "Service Bank erschöpft",
"NotifyEventReminderImminent": "Erinnerung unmittelbar bevorsteht",
"NotifyEventScheduledOnWorkorder": "Geplant auf Arbeitsauftrag",
@@ -1885,5 +1885,7 @@
"NotifyEventUnitMeterReadingMultipleExceeded": "Zählerstand überschritten (Vielfaches)",
"NotifyEventDefaultNotification": "Standardbenachrichtigung",
"NotifyDeliveryMethodApp": "In Anwendung liefern",
"NotifyDeliveryMethodSMTP": "An E-Mail-Adresse liefern"
"NotifyDeliveryMethodSMTP": "An E-Mail-Adresse liefern",
"NotifyEventObjectAge":"Objektalter seit der Erstellung",
"Duration": "Dauer"
}

View File

@@ -1853,11 +1853,11 @@
"Extensions": "Extensions",
"SelectedItems": "Selected items",
"Remove": "Remove",
"NotifyDeliveryMethod":"Notification delivery method",
"NotifyEventType":"Notification event",
"NotifyDeliveryAddress":"Deliver to address",
"InTags":"Filter include tags",
"OutTags":"Filter exclude tags",
"NotifyDeliveryMethod": "Notification delivery method",
"NotifyEventType": "Notification event",
"NotifyDeliveryAddress": "Deliver to address",
"InTags": "Filter include tags",
"OutTags": "Filter exclude tags",
"NotifyEventObjectDeleted": "Object deleted",
"NotifyEventObjectCreated": "Object created",
"NotifyEventObjectModified": "Object changed",
@@ -1866,7 +1866,7 @@
"NotifyEventCSRAccepted": "Customer service request accepted",
"NotifyEventCSRRejected": "Customer service request rejected",
"NotifyEventWorkorderClosed": "Work order closed",
"NotifyEventQuoteStatusChange": "Quote status changed",
"NotifyEventQuoteStatusChange": "Quote status changed",
"NotifyEventServiceBankDepleted": "Service bank empty",
"NotifyEventReminderImminent": "Reminder imminent",
"NotifyEventScheduledOnWorkorder": "Scheduled on work order",
@@ -1885,5 +1885,7 @@
"NotifyEventUnitMeterReadingMultipleExceeded": "Unit meter reading multiple exceeded",
"NotifyEventDefaultNotification": "Default notification",
"NotifyDeliveryMethodApp": "Deliver in application",
"NotifyDeliveryMethodSMTP": "Deliver to email address"
"NotifyDeliveryMethodSMTP": "Deliver to email address",
"NotifyEventObjectAge":"Object age since created",
"Duration": "Duration"
}

View File

@@ -1548,7 +1548,7 @@
"PageOfPageText": "{0}-{1} de {2}",
"Loading": "Cargando...",
"Tags": "Etiquetas",
"Tag":"Etiqueta",
"Tag": "Etiqueta",
"UserTypeServiceContractor": "Subcontratista",
"AuthorizationRoles": "Roles de autorización",
"AuthorizationRoleNoRole": "Sin rol",
@@ -1850,14 +1850,14 @@
"MoveSelected": "Mover elementos seleccionados",
"DeleteSelected": "Eliminar elementos seleccionados",
"Event": "Evento",
"Extensions":"Extensiones",
"SelectedItems":"Elementos seleccionados",
"Remove":"Eliminar",
"NotifyDeliveryMethod":"Método de entrega de notificaciones",
"NotifyEventType":"Evento de notificación",
"NotifyDeliveryAddress":"Entregar a la dirección de correo electrónico",
"InTags":"Filtrar incluir etiquetas",
"OutTags":"Filtrar etiquetas excluidas",
"Extensions": "Extensiones",
"SelectedItems": "Elementos seleccionados",
"Remove": "Eliminar",
"NotifyDeliveryMethod": "Método de entrega de notificaciones",
"NotifyEventType": "Evento de notificación",
"NotifyDeliveryAddress": "Entregar a la dirección de correo electrónico",
"InTags": "Filtrar incluir etiquetas",
"OutTags": "Filtrar etiquetas excluidas",
"NotifyEventObjectDeleted": "Objeto eliminado",
"NotifyEventObjectCreated": "Objeto creado",
"NotifyEventObjectModified": "Objeto cambiado",
@@ -1885,5 +1885,7 @@
"NotifyEventUnitMeterReadingMultipleExceeded": "Lectura de medidor de unidad excedida (múltiple)",
"NotifyEventDefaultNotification": "Notificación predeterminada",
"NotifyDeliveryMethodApp": "Entregar en programa",
"NotifyDeliveryMethodSMTP": "Entregar a la dirección de correo electrónico"
"NotifyDeliveryMethodSMTP": "Entregar a la dirección de correo electrónico",
"NotifyEventObjectAge":"Edad del objeto desde su creación",
"Duration": "Duración"
}

View File

@@ -1548,7 +1548,7 @@
"PageOfPageText": "{0}-{1} sur {2}",
"Loading": "Chargement...",
"Tags": "Balises",
"Tag":"Balise",
"Tag": "Balise",
"UserTypeServiceContractor": "Sous-traitant",
"AuthorizationRoles": "Rôles d'autorisation",
"AuthorizationRoleNoRole": "Pas de rôle",
@@ -1853,11 +1853,11 @@
"Extensions": "Extensions",
"SelectedItems": "Éléments sélectionnés",
"Remove": "Retirer",
"NotifyDeliveryMethod":"Méthode de remise des notifications",
"NotifyEventType":"Événement de notification",
"NotifyDeliveryAddress":"Livrer à l'adresse",
"InTags":"Filtrer les balises inclusives",
"OutTags":"Filtrer les tags exclusifs",
"NotifyDeliveryMethod": "Méthode de remise des notifications",
"NotifyEventType": "Événement de notification",
"NotifyDeliveryAddress": "Livrer à l'adresse",
"InTags": "Filtrer les balises inclusives",
"OutTags": "Filtrer les tags exclusifs",
"NotifyEventObjectDeleted": "Objet supprimé",
"NotifyEventObjectCreated": "Objet créé",
"NotifyEventObjectModified": "Objet changé",
@@ -1885,5 +1885,7 @@
"NotifyEventUnitMeterReadingMultipleExceeded": "Lecture du compteur unitaire dépassée (multiple)",
"NotifyEventDefaultNotification": "Notification par défaut",
"NotifyDeliveryMethodApp": "Livrer dans le programme",
"NotifyDeliveryMethodSMTP": "Livrer à l'adresse e-mail"
"NotifyDeliveryMethodSMTP": "Livrer à l'adresse e-mail",
"NotifyEventObjectAge":"Âge de l'objet depuis sa création",
"Duration": "Durée"
}

View File

@@ -22,7 +22,7 @@ namespace AyaNova.Util
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
private const int DESIRED_SCHEMA_LEVEL = 12;
internal const long EXPECTED_COLUMN_COUNT = 380;
internal const long EXPECTED_COLUMN_COUNT = 381;
internal const long EXPECTED_INDEX_COUNT = 139;
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
@@ -685,7 +685,7 @@ $BODY$;
await ExecQueryAsync("CREATE TABLE anotifysubscription (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, " +
"userid bigint not null, ayatype integer, eventtype integer not null, advancenotice interval, " +
"idvalue bigint, decvalue decimal(19,4), deliverymethod integer not null, deliveryaddress text, attachreportid bigint, intags varchar(255) ARRAY, outtags varchar(255) ARRAY)");
"idvalue bigint, decvalue decimal(19,4), agevalue interval, deliverymethod integer not null, deliveryaddress text, attachreportid bigint, intags varchar(255) ARRAY, outtags varchar(255) ARRAY)");
await ExecQueryAsync("CREATE TABLE anotifyevent (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, created timestamp not null, " +
"ayatype integer, objectid bigint, eventtype integer not null, subscriptionid bigint not null, idvalue bigint, decvalue decimal(19,4), eventdate timestamp, message text)");