private IEnumerable <ConstructionView> QueryConstructionViews(string searchTxt, string district, string town, List <ENodebBase> btsList)
        {
            if (!string.IsNullOrEmpty(searchTxt))
            {
                btsList = btsList.Where(o => o.ENODEBNAME == searchTxt).ToList();
            }
            if (district != "全部")
            {
                btsList = btsList.Where(o => o.AREA == district).ToList();
            }

            if (town != "全部")
            {
                btsList = btsList.Where(o => o.MKTCENTER == town).ToList();
            }
            var conList          = _constructionRepository.GetAllList();
            var constructionList = from c in conList
                                   join b in btsList on c.FSLNO equals b.FSLNO
                                   select new
            {
                Bts = b,
                Con = c
            };

            return(constructionList.Select(x =>
            {
                var view = x.Con.MapTo <ConstructionView>();
                x.Bts.MapTo(view);
                return view;
            }));
        }
Beispiel #2
0
        private IEnumerable <StationCellView> QueryConstructionViews(string searchTxt, string district, string town, List <ENodebBase> btsList)
        {
            if (!string.IsNullOrEmpty(searchTxt))
            {
                btsList = btsList.Where(o => o.ENodebName == searchTxt).ToList();
            }
            if (district != "全部")
            {
                btsList = btsList.Where(o => o.StationDistrict == district).ToList();
            }

            if (town != "全部")
            {
                btsList = btsList.Where(o => o.MarketCenter == town).ToList();
            }
            var conList          = _constructionRepository.GetAllList();
            var constructionList = from c in conList
                                   join b in btsList on c.ENodebId equals b.ENodebId
                                   select new
            {
                Bts = b,
                Con = c
            };

            return(constructionList.Select(x =>
            {
                var view = x.Con.MapTo <StationCellView>();
                x.Bts.MapTo(view);
                return view;
            }));
        }
Beispiel #3
0
        public IEnumerable <IndoorDistributionView> QueryByStationNum(string stationNum)
        {
            var eNodebs = _eNodebBaseRepository.GetAllList(x => x.StationNum == stationNum);

            if (!eNodebs.Any())
            {
                return(new List <IndoorDistributionView>());
            }
            var cells = eNodebs.Select(x =>
                                       _cellRepository.GetAllList(c => c.ENodebId == x.ENodebId && c.IndoorDistributionSerial != null))
                        .Aggregate((a, b) => a.Concat(b).ToList());

            return(cells.Any()
                ? cells.Select(c => _repository.GetAllList(x => x.CellSerialNum == c.CellSerialNum && x.IsInUse))
                   .Aggregate((a, b) => a.Concat(b).ToList()).MapTo <IEnumerable <IndoorDistributionView> >()
                : new List <IndoorDistributionView>());
        }
Beispiel #4
0
 public IEnumerable <ConstructionView> QueryAll()
 {
     return(_repository.GetAllList(x => x.IsInUse).MapTo <IEnumerable <ConstructionView> >());
 }