This commit is contained in:
@@ -178,13 +178,15 @@ namespace AyaNova.Biz
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//SEARCH
|
||||
//
|
||||
private async Task SearchIndexAsync(Vendor obj, bool isNew)
|
||||
{
|
||||
var SearchParams = new Search.SearchIndexProcessObjectParameters(UserTranslationId, obj.Id, BizType);
|
||||
SearchParams.AddText(obj.Notes).AddText(obj.Name).AddText(obj.Wiki).AddText(obj.Tags).AddCustomFields(obj.CustomFields);
|
||||
DigestSearchText(obj, SearchParams);
|
||||
if (isNew)
|
||||
await Search.ProcessNewObjectKeywordsAsync(SearchParams);
|
||||
else
|
||||
@@ -195,11 +197,44 @@ namespace AyaNova.Biz
|
||||
{
|
||||
var obj = await ct.Vendor.SingleOrDefaultAsync(z => z.Id == id);
|
||||
var SearchParams = new Search.SearchIndexProcessObjectParameters();
|
||||
if (obj != null)
|
||||
SearchParams.AddText(obj.Notes).AddText(obj.Name).AddText(obj.Wiki).AddText(obj.Tags).AddCustomFields(obj.CustomFields);
|
||||
DigestSearchText(obj, SearchParams);
|
||||
return SearchParams;
|
||||
}
|
||||
|
||||
public void DigestSearchText(Vendor obj, Search.SearchIndexProcessObjectParameters searchParams)
|
||||
{
|
||||
if (obj != null)
|
||||
searchParams.AddText(obj.Notes)
|
||||
.AddText(obj.Name)
|
||||
.AddText(obj.Wiki)
|
||||
.AddText(obj.Tags)
|
||||
.AddText(obj.WebAddress)
|
||||
.AddText(obj.Contact)
|
||||
.AddText(obj.ContactNotes)
|
||||
.AddText(obj.PopUpNotes)
|
||||
.AddText(obj.AccountNumber)
|
||||
.AddText(obj.Phone1)
|
||||
.AddText(obj.Phone2)
|
||||
.AddText(obj.Phone3)
|
||||
.AddText(obj.Phone4)
|
||||
.AddText(obj.Phone5)
|
||||
.AddText(obj.EmailAddress)
|
||||
.AddText(obj.PostAddress)
|
||||
.AddText(obj.PostCity)
|
||||
.AddText(obj.PostRegion)
|
||||
.AddText(obj.PostCountry)
|
||||
.AddText(obj.PostCode)
|
||||
.AddText(obj.Address)
|
||||
.AddText(obj.City)
|
||||
.AddText(obj.Region)
|
||||
.AddText(obj.Country)
|
||||
.AddText(obj.Latitude)
|
||||
.AddText(obj.Longitude)
|
||||
.AddCustomFields(obj.CustomFields);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//VALIDATION
|
||||
@@ -399,19 +434,19 @@ namespace AyaNova.Biz
|
||||
await JobsBiz.LogJobAsync(job.GId, ExceptionUtil.ExtractAllExceptionMessages(ex));
|
||||
}
|
||||
}
|
||||
await JobsBiz.LogJobAsync(job.GId, $"LT:BatchJob {job.SubType} {idList.Count}{(FailedObjectCount > 0 ? " - LT:Failed " + FailedObjectCount : "")}");
|
||||
await JobsBiz.LogJobAsync(job.GId, $"LT:BatchJob {job.SubType} {idList.Count}{(FailedObjectCount > 0 ? " - LT:Failed " + FailedObjectCount : "")}");
|
||||
await JobsBiz.UpdateJobStatusAsync(job.GId, JobStatus.Completed);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// NOTIFICATION PROCESSING
|
||||
//
|
||||
public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj=null)
|
||||
public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null)
|
||||
{
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<VendorBiz>();
|
||||
if (ServerBootConfig.SEEDING) return;
|
||||
|
||||
Reference in New Issue
Block a user