public IEnumerable <ZhangshangyouQualityView> QueryByDateSpanAndRange(DateTime begin, DateTime end,
                                                                              double west, double east, double south, double north, double xOffset, double yOffset)
        {
            var coverageItems = _coverageRepository.GetAllList(
                x => x.Longtitute >= west + xOffset && x.Longtitute < east + xOffset &&
                x.Lattitute >= south + yOffset &&
                x.Lattitute < north + yOffset &&
                x.StatTime >= begin && x.StatTime < end);
            var dateSpanItems = _repository.GetAllList(x => x.StatTime >= begin && x.StatTime < end);

            return((from c in coverageItems join q in dateSpanItems on c.SerialNumber equals q.SerialNumber select q)
                   .Distinct(new ZhangshangyouQualityEquator())
                   .MapTo <IEnumerable <ZhangshangyouQualityView> >());
        }
        public IEnumerable <ZhangshangyouCoverageView> QueryByDateSpanAndGeneralRange(DateTime begin, DateTime end,
                                                                                      double generalWest, double generalEast, double generalSouth, double generalNorth,
                                                                                      double xOffset, double yOffset)
        {
            var list = _repository.GetAllList(
                x => x.Longtitute >= generalWest + xOffset &&
                x.Longtitute < generalEast + xOffset &&
                x.Lattitute >= generalSouth + yOffset &&
                x.Lattitute < generalNorth + yOffset &&
                x.StatTime >= begin && x.StatTime < end);

            var cells = _cellRepository.GetAllList(x => x.Longtitute >= generalWest && x.Longtitute < generalEast &&
                                                   x.Lattitute >= generalSouth &&
                                                   x.Lattitute < generalNorth);
            var rangeItems = _repository.GetAllList(x => x.StatTime >= begin && x.StatTime < end);
            var items      = (from item in rangeItems
                              join c in cells on new { item.ENodebId, item.SectorId } equals new { c.ENodebId, c.SectorId }
                              select item).ToList();

            list.AddRange(items);

            var resultList = list.Distinct(new ZhangshangyouCoverageEquator());

            foreach (var item in resultList)
            {
                item.XOffset = xOffset;
                item.YOffset = yOffset;
                var o = _repository.Get(item.Id);
                o.XOffset = xOffset;
                o.YOffset = yOffset;
            }

            _repository.SaveChanges();

            return(resultList.MapTo <IEnumerable <ZhangshangyouCoverageView> >());
        }