Ejemplo n.º 1
0
        public List <DistrictStat> QueryDistrictStats(string city)
        {
            var eNodebTownIds = _eNodebRepository.GetAllInUseList().Select(x => new
            {
                x.TownId, x.ENodebId
            });
            var btsTownIds = _btsRepository.GetAllInUseList().Select(x => new
            {
                x.TownId, x.BtsId
            });
            var cellENodebIds  = _cellRepository.GetAllInUseList().Select(x => x.ENodebId);
            var cdmaCellBtsIds = _cdmaCellRepository.GetAllInUseList().Select(x => x.BtsId);

            return((from district in GetDistricts(city)
                    let townList = _repository.GetAllList(city, district)
                                   let eNodebs = (from t in townList join e in eNodebTownIds on t.Id equals e.TownId select e)
                                                 let btss = (from t in townList join b in btsTownIds on t.Id equals b.TownId select b)
                                                            let cells = (from t in townList join e in eNodebTownIds on t.Id equals e.TownId join c in cellENodebIds on e.ENodebId equals c select c)
                                                                        let cdmaCells = (from t in townList join b in btsTownIds on t.Id equals b.TownId join c in cdmaCellBtsIds on b.BtsId equals c select c)
                                                                                        select new DistrictStat
            {
                District = district,
                TotalLteENodebs = eNodebs.Count(),
                TotalLteCells = cells.Count(),
                TotalCdmaBts = btss.Count(),
                TotalCdmaCells = cdmaCells.Count()
            }).ToList());
        }
Ejemplo n.º 2
0
 public IEnumerable <ENodebExcel> GetNewENodebExcels()
 {
     if (!BasicImportContainer.ENodebExcels.Any())
     {
         return(new List <ENodebExcel>());
     }
     return(from info in BasicImportContainer.ENodebExcels
            join eNodeb in _eNodebRepository.GetAllInUseList()
            on new { info.ENodebId, info.Name } equals new { eNodeb.ENodebId, eNodeb.Name } into eNodebQuery
            from eq in eNodebQuery.DefaultIfEmpty()
            where eq == null
            select info);
 }
Ejemplo n.º 3
0
 public IEnumerable <ENodebExcel> GetNewENodebExcels()
 {
     if (!ENodebExcels.Any())
     {
         return(new List <ENodebExcel>());
     }
     return(from info in ENodebExcels
            join eNodeb in _eNodebRepository.GetAllInUseList()
            on info.ENodebId equals eNodeb.ENodebId into eNodebQuery
            from eq in eNodebQuery.DefaultIfEmpty()
            where eq == null
            select info);
 }
Ejemplo n.º 4
0
        public List <DistrictIndoorStat> QueryDistrictIndoorStats(string city)
        {
            var eNodebTownIds = _eNodebRepository.GetAllInUseList().Select(x => new
            {
                x.TownId,
                x.ENodebId
            });
            var allCells = _cellRepository.GetAllInUseList();

            return((from district in GetDistricts(city)
                    let townList = _repository.GetAllList().Where(x => x.CityName == city && x.DistrictName == district)
                                   let cells = (from t in townList
                                                join e in eNodebTownIds on t.Id equals e.TownId
                                                join c in allCells on e.ENodebId equals c.ENodebId
                                                select c)
                                               select new DistrictIndoorStat
            {
                District = district,
                TotalIndoorCells = cells.Count(x => !x.IsOutdoor),
                TotalOutdoorCells = cells.Count(x => x.IsOutdoor)
            }).ToList());
        }