Esempio n. 1
0
        public IEnumerable <CellMrsTadvDto> GetMarketDateView(string marketName, DateTime statDate)
        {
            var beginDate = statDate.Date;
            var endDate   = beginDate.AddDays(1);
            var college   = _collegeService.QueryMarketView(marketName);

            if (college == null)
            {
                return(new List <CellMrsTadvDto>());
            }
            var cells        = _collegeCellViewService.QueryCollegeSectors(college.HotspotName);
            var viewListList = cells.Select(cell =>
            {
                var items = _service.QueryMrsTadvStats(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 <CellMrsTadvDto>());
            }
            var viewList = viewListList.Aggregate((x, y) => x.Concat(y).ToList());

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