This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -53,7 +53,7 @@
|
||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
||||
"AYANOVA_SERVER_TEST_MODE": "true",
|
||||
"AYANOVA_SERVER_TEST_MODE": "false",
|
||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
||||
|
||||
@@ -584,10 +584,36 @@ namespace AyaNova.Biz
|
||||
|
||||
public async Task<Search.SearchIndexProcessObjectParameters> GetSearchResultSummary(long id, AyaType specificType)
|
||||
{
|
||||
var obj = await ct.PM.AsNoTracking().SingleOrDefaultAsync(z => z.Id == id);//# NOTE intentionally not calling quote get async here, don't need the whole graph
|
||||
var SearchParams = new Search.SearchIndexProcessObjectParameters();
|
||||
DigestSearchText(obj, SearchParams);
|
||||
return SearchParams;
|
||||
|
||||
|
||||
switch (specificType)
|
||||
{
|
||||
case AyaType.PM:
|
||||
var obj = await ct.PM.AsNoTracking().SingleOrDefaultAsync(z => z.Id == id);//# NOTE intentionally not calling quote get async here, don't need the whole graph
|
||||
var SearchParams = new Search.SearchIndexProcessObjectParameters();
|
||||
DigestSearchText(obj, SearchParams);
|
||||
return SearchParams;
|
||||
case AyaType.PMItem:
|
||||
return await ItemGetSearchResultSummary(id);
|
||||
case AyaType.PMItemExpense:
|
||||
return await ExpenseGetSearchResultSummary(id);
|
||||
case AyaType.PMItemLabor:
|
||||
return await LaborGetSearchResultSummary(id);
|
||||
case AyaType.PMItemLoan:
|
||||
return await LoanGetSearchResultSummary(id);
|
||||
case AyaType.PMItemPart:
|
||||
return await PartGetSearchResultSummary(id);
|
||||
case AyaType.PMItemTask:
|
||||
return await TaskGetSearchResultSummary(id);
|
||||
case AyaType.PMItemTravel:
|
||||
return await TravelGetSearchResultSummary(id);
|
||||
case AyaType.PMItemOutsideService:
|
||||
return await OutsideServiceGetSearchResultSummary(id);
|
||||
case AyaType.PMItemUnit:
|
||||
return await UnitGetSearchResultSummary(id);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void DigestSearchText(PM obj, Search.SearchIndexProcessObjectParameters searchParams)
|
||||
|
||||
@@ -561,10 +561,36 @@ namespace AyaNova.Biz
|
||||
|
||||
public async Task<Search.SearchIndexProcessObjectParameters> GetSearchResultSummary(long id, AyaType specificType)
|
||||
{
|
||||
var obj = await ct.Quote.AsNoTracking().SingleOrDefaultAsync(z => z.Id == id);//# NOTE intentionally not calling quote get async here, don't need the whole graph
|
||||
var SearchParams = new Search.SearchIndexProcessObjectParameters();
|
||||
DigestSearchText(obj, SearchParams);
|
||||
return SearchParams;
|
||||
|
||||
|
||||
switch (specificType)
|
||||
{
|
||||
case AyaType.Quote:
|
||||
var obj = await ct.Quote.AsNoTracking().SingleOrDefaultAsync(z => z.Id == id);//# NOTE intentionally not calling quote get async here, don't need the whole graph
|
||||
var SearchParams = new Search.SearchIndexProcessObjectParameters();
|
||||
DigestSearchText(obj, SearchParams);
|
||||
return SearchParams;
|
||||
case AyaType.QuoteItem:
|
||||
return await ItemGetSearchResultSummary(id);
|
||||
case AyaType.QuoteItemExpense:
|
||||
return await ExpenseGetSearchResultSummary(id);
|
||||
case AyaType.QuoteItemLabor:
|
||||
return await LaborGetSearchResultSummary(id);
|
||||
case AyaType.QuoteItemLoan:
|
||||
return await LoanGetSearchResultSummary(id);
|
||||
case AyaType.QuoteItemPart:
|
||||
return await PartGetSearchResultSummary(id);
|
||||
case AyaType.QuoteItemTask:
|
||||
return await TaskGetSearchResultSummary(id);
|
||||
case AyaType.QuoteItemTravel:
|
||||
return await TravelGetSearchResultSummary(id);
|
||||
case AyaType.QuoteItemOutsideService:
|
||||
return await OutsideServiceGetSearchResultSummary(id);
|
||||
case AyaType.QuoteItemUnit:
|
||||
return await UnitGetSearchResultSummary(id);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void DigestSearchText(Quote obj, Search.SearchIndexProcessObjectParameters searchParams)
|
||||
@@ -575,7 +601,7 @@ namespace AyaNova.Biz
|
||||
.AddText(obj.Serial)
|
||||
.AddText(obj.InternalReferenceNumber)
|
||||
.AddText(obj.CustomerReferenceNumber)
|
||||
.AddText(obj.CustomerContactName)
|
||||
.AddText(obj.CustomerContactName)
|
||||
.AddText(obj.PostAddress)
|
||||
.AddText(obj.PostCity)
|
||||
.AddText(obj.PostRegion)
|
||||
@@ -946,7 +972,7 @@ namespace AyaNova.Biz
|
||||
public async Task QuoteHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null)
|
||||
{
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<QuoteBiz>();
|
||||
if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
if (ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]");
|
||||
|
||||
bool isNew = currentObj == null;
|
||||
@@ -1608,7 +1634,7 @@ namespace AyaNova.Biz
|
||||
public async Task ItemHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null)
|
||||
{
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<QuoteBiz>();
|
||||
if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
if (ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]");
|
||||
|
||||
bool isNew = currentObj == null;
|
||||
@@ -1974,7 +2000,7 @@ namespace AyaNova.Biz
|
||||
public async Task ExpenseHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null)
|
||||
{
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<QuoteBiz>();
|
||||
if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
if (ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]");
|
||||
|
||||
bool isNew = currentObj == null;
|
||||
@@ -2368,7 +2394,7 @@ namespace AyaNova.Biz
|
||||
public async Task LaborHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null)
|
||||
{
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<QuoteBiz>();
|
||||
if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
if (ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]");
|
||||
|
||||
bool isNew = currentObj == null;
|
||||
@@ -2763,7 +2789,7 @@ namespace AyaNova.Biz
|
||||
public async Task LoanHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null)
|
||||
{
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<QuoteBiz>();
|
||||
if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
if (ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]");
|
||||
|
||||
bool isNew = currentObj == null;
|
||||
@@ -3077,7 +3103,7 @@ namespace AyaNova.Biz
|
||||
OutsideServiceReceived = 17,//* Workorder object , WorkOrderItemOutsideService updated, instant notification when item received, tag filterable
|
||||
*/
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<QuoteBiz>();
|
||||
if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
if (ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]");
|
||||
|
||||
bool isNew = currentObj == null;
|
||||
@@ -3528,7 +3554,7 @@ namespace AyaNova.Biz
|
||||
public async Task PartHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null)
|
||||
{
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<QuoteBiz>();
|
||||
if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
if (ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]");
|
||||
|
||||
bool isNew = currentObj == null;
|
||||
@@ -3776,7 +3802,7 @@ namespace AyaNova.Biz
|
||||
public async Task ScheduledUserHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null)
|
||||
{
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<QuoteBiz>();
|
||||
if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
if (ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]");
|
||||
|
||||
bool isNew = currentObj == null;
|
||||
@@ -4047,7 +4073,7 @@ namespace AyaNova.Biz
|
||||
public async Task TaskHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null)
|
||||
{
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<QuoteBiz>();
|
||||
if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
if (ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]");
|
||||
|
||||
bool isNew = currentObj == null;
|
||||
@@ -4419,7 +4445,7 @@ namespace AyaNova.Biz
|
||||
public async Task TravelHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null)
|
||||
{
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<QuoteBiz>();
|
||||
if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
if (ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]");
|
||||
|
||||
bool isNew = currentObj == null;
|
||||
@@ -4710,7 +4736,7 @@ namespace AyaNova.Biz
|
||||
public async Task UnitHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null)
|
||||
{
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<QuoteBiz>();
|
||||
if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
if (ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return;
|
||||
log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]");
|
||||
|
||||
bool isNew = currentObj == null;
|
||||
|
||||
@@ -396,7 +396,7 @@ BEGIN
|
||||
when 26 then aytable = 'apurchaseorder'; aynamecolumn = 'serial';
|
||||
when 27 then aytable = 'aquote'; aynamecolumn = 'serial';
|
||||
when 28 then return 'LT:WorkOrderItem';
|
||||
when 29 then return 'LT:WorkOrderItemloan';
|
||||
when 29 then return 'LT:WorkOrderItemLoan';
|
||||
when 30 then return 'LT:WorkOrderItemPart';
|
||||
when 31 then aytable = 'aunit'; aynamecolumn = 'serial';
|
||||
when 32 then aytable = 'aunitmodel'; aynamecolumn = 'number';
|
||||
@@ -405,7 +405,7 @@ BEGIN
|
||||
when 35 then return 'LT:WorkOrderItem';
|
||||
when 36 then return 'LT:WorkOrderItemExpense';
|
||||
when 37 then return 'LT:WorkOrderItemLabor';
|
||||
when 38 then return 'LT:WorkOrderItemloan';
|
||||
when 38 then return 'LT:WorkOrderItemLoan';
|
||||
when 39 then return 'LT:WorkOrderItemPart';
|
||||
when 40 then return 'LT:WorkOrderItemPartRequest';
|
||||
when 41 then return 'LT:WorkOrderItemScheduledUser';
|
||||
@@ -446,7 +446,7 @@ BEGIN
|
||||
when 79 then return 'LT:WorkOrderItemOutsideService';
|
||||
when 80 then return 'LT:WorkOrderItemExpense';
|
||||
when 81 then return 'LT:WorkOrderItemLabor';
|
||||
when 82 then return 'LT:WorkOrderItemloan';
|
||||
when 82 then return 'LT:WorkOrderItemLoan';
|
||||
when 83 then return 'LT:WorkOrderItemPart';
|
||||
when 84 then return 'LT:WorkOrderItemPartRequest';
|
||||
when 85 then return 'LT:WorkOrderItemScheduledUser';
|
||||
|
||||
Reference in New Issue
Block a user