Пример #1
0
        public IEnumerable <AggregateFlowView> Get(DateTime startDate, DateTime lastDate)
        {
            var colleges = _collegeService.QueryInfos();

            return(colleges.Select(college =>
            {
                var stats = _townFlowService.QueryTownFlowViews(startDate, lastDate, college.Id, FrequencyBandType.College);
                var result = stats.Any()
                    ? stats.ArraySum().MapTo <AggregateFlowView>()
                    : new AggregateFlowView();
                result.Name = college.Name;
                return result;
            }));
        }
Пример #2
0
        public IEnumerable <TownFlowStat> GetDateFlowView(DateTime statDate)
        {
            var beginDate = statDate.Date;
            var endDate   = beginDate.AddDays(1);
            var colleges  = _collegeService.QueryInfos();

            return(colleges.Select(college =>
            {
                var cells = _collegeCellViewService.GetCollegeViews(college.Name);
                var viewListList = cells.Select(cell => _service.Query(cell.ENodebId, cell.SectorId, beginDate, endDate))
                                   .Where(views => views != null && views.Any()).ToList();
                if (!viewListList.Any())
                {
                    return null;
                }
                var viewList = viewListList.Aggregate((x, y) => x.Concat(y).ToList());
                if (!viewList.Any())
                {
                    return null;
                }
                var stat = viewList.ArraySum().MapTo <TownFlowStat>();
                stat.FrequencyBandType = FrequencyBandType.College;
                stat.TownId = college.Id;
                return stat;
            }).Where(x => x != null));
        }
Пример #3
0
        public IEnumerable <TownPreciseStat> Get(DateTime statDate)
        {
            var beginDate = statDate.Date;
            var endDate   = beginDate.AddDays(1);
            var colleges  = _collegeService.QueryInfos();
            var stats     = _statService.GetTimeSpanStats(beginDate, endDate);

            return(colleges.Select(college =>
            {
                var cells = _collegeCellViewService.GetCollegeCells(college.Name);
                var viewListList
                    = (from c in cells
                       join s in stats on new { c.ENodebId, c.SectorId } equals new { ENodebId = s.CellId, s.SectorId }
                       select s).ToList();
                if (!viewListList.Any())
                {
                    return null;
                }
                var stat = viewListList.ArraySum().MapTo <TownPreciseStat>();
                stat.FrequencyBandType = FrequencyBandType.College;
                stat.TownId = college.Id;
                return stat;
            }).Where(x => x != null));
        }
Пример #4
0
 public IEnumerable <string> GetAllNames()
 {
     return(_service.QueryInfos().Select(x => x.Name));
 }
Пример #5
0
 public IEnumerable <CollegeView> Get()
 {
     return(_service.QueryInfos());
 }