示例#1
0
        public IEnumerable <TownHourCqi> GetDateCqiView(DateTime statDate)
        {
            var beginDate = statDate.Date;
            var endDate   = beginDate.AddDays(1);
            var colleges  = _transportationService.QueryHotSpotViews("交通枢纽");

            return(colleges.Select(college =>
            {
                var cells = _collegeCellViewService.GetCollegeCells(college.HotspotName);
                var viewListList = cells.Select(cell => _service.QueryHourCqiViews(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()).ToList();
                if (!viewList.Any())
                {
                    return null;
                }
                var stat = viewList.ArraySum().MapTo <TownHourCqi>();
                stat.FrequencyBandType = FrequencyBandType.Transportation;
                stat.TownId = college.Id;
                return stat;
            }).Where(x => x != null));
        }
示例#2
0
        public async Task <int> RetrieveAndUpdate(DateTime statTime)
        {
            var beginDate = statTime.Date;
            var endDate   = beginDate.AddDays(1);
            var colleges  = _collegeService.QueryInfos();
            var stats     = _coverageStatService.QueryStats(beginDate, endDate);
            var results   = 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 { s.ENodebId, s.SectorId }
                       select s).ToList();
                if (!viewListList.Any())
                {
                    return(null);
                }
                var stat = viewListList.MapTo <List <TownCoverageStat> >().ArraySum();
                stat.FrequencyBandType = FrequencyBandType.College;
                stat.TownId            = college.Id;
                stat.Id = 0;
                return(stat);
            }).Where(x => x != null).ToList();

            return(await _townMroRsrpService.DumpTownStats(results));
        }
示例#3
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.GetCollegeCells(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));
        }
示例#4
0
        public IEnumerable <TownPreciseStat> GetDatePreciseView(DateTime statDate)
        {
            var beginDate = statDate.Date;
            var endDate   = beginDate.AddDays(1);
            var colleges  = _marketService.QueryHotSpotViews("交通枢纽");
            var stats     = _service.GetTimeSpanStats(beginDate, endDate);

            return(colleges.Select(college =>
            {
                var cells = _collegeCellViewService.GetCollegeCells(college.HotspotName);
                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.Transportation;
                stat.TownId = college.Id;
                return stat;
            }).Where(x => x != null));
        }
示例#5
0
        public IEnumerable <TownMrsRsrp> Get(DateTime statDate)
        {
            var beginDate = statDate.Date;
            var endDate   = beginDate.AddDays(1);
            var colleges  = _collegeService.QueryInfos();
            var stats     = _statService.QueryDateSpanMrsRsrpStats(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 { s.ENodebId, s.SectorId }
                       select s).ToList();
                if (!viewListList.Any())
                {
                    return null;
                }
                var stat = viewListList.MapTo <List <TownMrsRsrpDto> >().MapTo <List <TownMrsRsrp> >().ArraySum();
                stat.FrequencyBandType = FrequencyBandType.College;
                stat.TownId = college.Id;
                return stat;
            }).Where(x => x != null));
        }