corretto recupero dati x scarti (pareto)
This commit is contained in:
@@ -274,12 +274,12 @@ namespace MP.Stats.Data
|
||||
else
|
||||
{
|
||||
// recupero dal DB (eventualmente con cache)
|
||||
var dbResult = StatScartiGetAll(CurrFilter, searchVal);
|
||||
var dbResult = await StatScartiGetAll(CurrFilter, searchVal);
|
||||
// faccio conteggio...
|
||||
statResult = dbResult
|
||||
.Result
|
||||
.GroupBy(x => x.Causale)
|
||||
.Select(y => new ChartKV() { label = y.First().Causale, value = y.Sum(c => c.Qta) })
|
||||
.Select(y => new ChartKV() { label = y.First().Descrizione, value = y.Sum(c => c.Qta) })
|
||||
.OrderByDescending(x => x.value)
|
||||
.ToList();
|
||||
|
||||
rawData = JsonConvert.SerializeObject(statResult);
|
||||
|
||||
Reference in New Issue
Block a user