private IList <object[]> BuildTimeSpendReport(ReportFilter filter) { var data = SelectOnlyCanReadTimeSpend(reportDao.BuildTimeReport(filter)).ToList(); if (filter.ViewType == 0) { data = data.GroupBy(r => r[0]).Select(r => new[] { r.Key, r.Sum(item => (double)item[4]) }).ToList(); return(data.ConvertAll(r => new object[] { new Guid((string)r[0]), 0, 0, "", ToTimeSpend((double)r[1]) })); } return(data.ConvertAll(r => new object[] { new Guid((string)r[0]), Convert.ToInt32(r[1]), Convert.ToInt32(r[2]), (string)r[3], ToTimeSpend((double)r[4]) })); }