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)); }
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)); }
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)); }
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)); }
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)); }