Exemplo n.º 1
0
        public IEnumerable <CoverageStatView> GetCollegeDateView(string collegeName, DateTime statDate)
        {
            var beginDate = statDate.Date;
            var endDate   = beginDate.AddDays(1);
            var college   = _collegeService.QueryInfo(collegeName);

            if (college == null)
            {
                return(new List <CoverageStatView>());
            }
            var cells        = _collegeCellViewService.QueryCollegeSectors(college.Name);
            var viewListList = cells.Select(cell =>
            {
                var items = _service.GetDateSpanViews(cell.ENodebId, cell.SectorId, beginDate, endDate).ToList();
                items.ForEach(item => { cell.MapTo(item); });
                return(items);
            })
                               .Where(views => views.Any()).ToList();

            if (!viewListList.Any())
            {
                return(new List <CoverageStatView>());
            }
            var viewList = viewListList.Aggregate((x, y) => x.Concat(y).ToList());

            return(!viewList.Any() ? new List <CoverageStatView>() : viewList);
        }
Exemplo n.º 2
0
 public IEnumerable <CoverageStatView> Get(int eNodebId, byte sectorId, DateTime begin, DateTime end)
 {
     return(_service.GetDateSpanViews(eNodebId, sectorId, begin, end));
 }