Skip to content

Commit

Permalink
CDMS-200 removes commented out lines
Browse files Browse the repository at this point in the history
  • Loading branch information
craigedmunds committed Dec 17, 2024
1 parent 49ffb59 commit bb99f9e
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions Btms.Analytics/ImportNotificationsAggregationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ public Task<MultiSeriesDataset> ByCommodityCount(DateTime from, DateTime to)
.GroupBy(r => new { r.Key.ImportNotificationType, r.Key.Linked })
.ToList();

// var maxCommodities = result.Max(r => r.Max(i => i.Key.CommodityCount));

var maxCommodities = result.Count > 0 ?
result.Max(r => r.Any() ? r.Max(i => i.Key.CommodityCount) : 0) : 0;

Expand Down Expand Up @@ -107,32 +105,7 @@ public Task<MultiSeriesDataset> ByCommodityCount(DateTime from, DateTime to)
}).ToList()
})
.ToList()
// .AsOrderedArray(d => d.Name)

});

// return Task.FromResult(
// AnalyticsHelpers.GetImportNotificationSegments()
// .Select(title => new MultiSeriesDataset(title, "ItemCount")
// {
// // Results = asDictionary.AsResultList(title, maxCommodities)
// Series =
// [
// new Series()
// {
// Results = Enumerable.Range(0, maxCommodities)
// .Select(i => new ByNumericDimensionResult
// {
// Dimension = i,
// Value = asDictionary.GetValueOrDefault(new { Title=title, CommodityCount = i })
// }).ToList()
// }
// ]
//
// }
// )
// .AsOrderedArray(d => d.Name)
// );
}

private Task<MultiSeriesDatetimeDataset> Aggregate(DateTime[] dateRange, Func<BsonDocument, string> createDatasetName, Expression<Func<ImportNotification, bool>> filter, string dateField, AggregationPeriod aggregateBy)
Expand Down

0 comments on commit bb99f9e

Please sign in to comment.