This commit is contained in:
2021-09-24 20:27:20 +00:00
parent 58241b8973
commit 03840ae759
3 changed files with 22 additions and 2 deletions

View File

@@ -524,6 +524,15 @@ namespace AyaNova.Biz
o.ManufacturerViz = await ct.Vendor.AsNoTracking().Where(x => x.Id == o.ManufacturerId).Select(x => x.Name).FirstOrDefaultAsync();
if (o.AlternativeWholeSalerId != null)
o.AlternativeWholeSalerViz = await ct.Vendor.AsNoTracking().Where(x => x.Id == o.AlternativeWholeSalerId).Select(x => x.Name).FirstOrDefaultAsync();
//Ok, this one I'm not comfortable with but it was insisted upon
//so if there turns out to be a situation where there are just too many serials slowing down the reporting always
//can look at tying this to the report data list column selection to check if serials are selected to display or not
o.PartSerialsViz = $"[{string.Join(',', (await ct.PartSerial.Where(z => z.PartId == o.Id).OrderBy(z => z.Serial).Select(z => $"'{z.Serial}'").ToListAsync()))}]";
}
////////////////////////////////////////////////////////////////////////////////////////////////
@@ -659,7 +668,7 @@ namespace AyaNova.Biz
public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null)
{
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<PartBiz>();
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;