This commit is contained in:
2020-08-18 19:26:40 +00:00
parent 611547a7bc
commit f548b01a5f
2 changed files with 20 additions and 12 deletions

View File

@@ -193,18 +193,21 @@ namespace AyaNova.Biz
//OutsideServiceOverdue
//OutsideServiceReceived https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/892
//PartRequestReceived https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/892
//CustomerServiceImminent
//CustomerServiceImminent ALSO CopyOfCustomerNotification
//WorkorderCreatedForCustomer (conditional ID sb customer id) ALSO CopyOfCustomerNotification
//PartRequested https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/892
//WorkorderTotalExceedsThreshold
//WorkorderStatusAge
}
break;
case AyaType.Quote:
//QuoteStatusChange
//QuoteStatusChange [USER, CUSTOMER] / ALSO CopyOfCustomerNotification
//QuoteStatusAge
break;
case AyaType.Contract:
//ContractExpiring
//ContractExpiring [CUSTOMER/USER]
//CopyOfCustomerNotification
break;
case AyaType.Reminder:
//ReminderImminent
@@ -250,6 +253,7 @@ namespace AyaNova.Biz
//------------------------------------------
//ObjectCreated
//
// [USER for any type, CUSTOMER for workorder only] / if customer then CopyOfCustomerNotification
{
var subs = await ct.NotifySubscription.Where(z => z.EventType == NotifyEventType.ObjectCreated && z.AyaType == newObject.AyaType).ToListAsync();
foreach (var sub in subs)
@@ -284,7 +288,8 @@ namespace AyaNova.Biz
//AyaTypes with their own special notification related events
case AyaType.WorkOrder:
{
//WorkorderStatusChange
//WorkorderStatusChange [USER, CUSTOMER BOTH] / CopyOfCustomerNotification
//
{
throw new System.NotImplementedException("Awaiting workorder object completion");
// if (((WorkOrder)newObject).WorkorderStatusId != ((WorkOrder)dbObject).WorkorderStatusId)
@@ -325,16 +330,17 @@ namespace AyaNova.Biz
//ScheduledOnWorkorderImminent (DELTE OLD)
//https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/892
//WorkorderFinishStatusOverdue (DELETE OLD)
//WorkorderFinished
//WorkorderFinished [USER, CUSTOMER] ALSO CopyOfCustomerNotification applies here
//OutsideServiceOverdue (ALSO DELETE OLD)
//OutsideServiceReceived
//PartRequestReceived
//CustomerServiceImminent (ALSO DELETE OLD)
//CustomerServiceImminent (ALSO DELETE OLD) / ALSO CopyOfCustomerNotification
//PartRequested
//https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/892
//WorkorderTotalExceedsThreshold
//WorkorderStatusAge (ALSO DELETE OLD)
//https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/1137
//WorkorderFinishedFollowUp (uses AGE after finished status) [USER, CUSTOMER] ALSO CopyOfCustomerNotification applies here
}
break;
@@ -358,8 +364,9 @@ namespace AyaNova.Biz
// In saving code it just checks to see if it has crossed the multiple threshold, i.e. calculate the old multiple, calculate the new multiple if over then send notification immediate.
break;
case AyaType.CustomerServiceRequest:
//CSRAccepted (DELETE OLD might have changed from one to the other)
//CSRRejected (DELETE OLD might have changed from one to the other)
//CSRAccepted (DELETE OLD might have changed from one to the other) [CUSTOMER]
//CSRRejected (DELETE OLD might have changed from one to the other) [CUSTOMER]
//CopyOfCustomerNotification
break;
case AyaType.ServiceBank:
//ServiceBankDepleted https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/472
@@ -434,7 +441,7 @@ namespace AyaNova.Biz
//------------------------------
// Delete any NotifyEvent records for this exact object
// It's gone and shouldn't have any events left for it
//
// NOTE: this is expected to cover all created / modified events above in terms of reversing them if they're still around for whatever reason
{
var deleteList = await ct.NotifyEvent.Where(z => z.ObjectId == newObject.Id && z.AyaType == newObject.AyaType).ToListAsync();
if (deleteList.Count > 0)