This commit is contained in:
@@ -161,7 +161,7 @@ namespace AyaNova.Biz
|
||||
ValidateCanDelete(dbObject);
|
||||
if (HasErrors)
|
||||
return false;
|
||||
{
|
||||
{
|
||||
var IDList = await ct.Review.AsNoTracking().Where(x => x.AType == AyaType.LoanUnit && x.ObjectId == id).Select(x => x.Id).ToListAsync();
|
||||
if (IDList.Count() > 0)
|
||||
{
|
||||
@@ -217,7 +217,7 @@ namespace AyaNova.Biz
|
||||
.AddText(obj.Name)
|
||||
.AddText(obj.Wiki)
|
||||
.AddText(obj.Tags)
|
||||
.AddText(obj.Serial)
|
||||
.AddText(obj.Serial)
|
||||
.AddCustomFields(obj.CustomFields);
|
||||
}
|
||||
|
||||
@@ -285,6 +285,7 @@ namespace AyaNova.Biz
|
||||
var batchResults = await ct.LoanUnit.AsNoTracking().Where(z => batch.Contains(z.Id)).ToArrayAsync();
|
||||
//order the results back into original
|
||||
var orderedList = from id in batch join z in batchResults on id equals z.Id select z;
|
||||
batchResults = null;
|
||||
foreach (LoanUnit w in orderedList)
|
||||
{
|
||||
if (!ReportRenderManager.KeepGoing(jobId)) return null;
|
||||
@@ -294,15 +295,26 @@ namespace AyaNova.Biz
|
||||
jo["CustomFields"] = JObject.Parse((string)jo["CustomFields"]);
|
||||
ReportData.Add(jo);
|
||||
}
|
||||
orderedList = null;
|
||||
}
|
||||
vc.Clear();
|
||||
return ReportData;
|
||||
}
|
||||
|
||||
private VizCache vc = new VizCache();
|
||||
|
||||
|
||||
//populate viz fields from provided object
|
||||
private async Task PopulateVizFields(LoanUnit o)
|
||||
{
|
||||
|
||||
if (o.UnitId != null)
|
||||
o.UnitViz = await ct.Unit.AsNoTracking().Where(x => x.Id == o.UnitId).Select(x => x.Serial).FirstOrDefaultAsync();
|
||||
{
|
||||
if (!vc.Has("unitserial", o.UnitId))
|
||||
vc.Add(await ct.Unit.AsNoTracking().Where(x => x.Id == o.UnitId).Select(x => x.Serial).FirstOrDefaultAsync(), "unitserial", o.UnitId);
|
||||
o.UnitViz = vc.Get("unitserial", o.UnitId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -440,7 +452,7 @@ namespace AyaNova.Biz
|
||||
public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null)
|
||||
{
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<LoanUnitBiz>();
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user