Exemplo n.º 1
0
        public IEnumerable <WorkItemView> QueryViews(string statCondition, string typeCondition)
        {
            var predict = (statCondition + '_' + typeCondition).GetWorkItemFilter();
            var stats   = predict == null?_repository.GetAllList() : _repository.GetAllList(predict);

            var views = Mapper.Map <List <WorkItem>, List <WorkItemView> >(stats);

            views.ForEach(x => x.UpdateTown(_eNodebRepository, _btsRepository, _townRepository));
            return(views);
        }
Exemplo n.º 2
0
        public int UpdateLteSectorIds()
        {
            var items = _repository.GetAllList(x => x.ENodebId > 10000);
            int count = 0;

            foreach (var item in items)
            {
                var cell = _cellRepository.GetBySectorId(item.ENodebId, item.SectorId);
                if (cell != null)
                {
                    continue;
                }
                cell = _cellRepository.GetBySectorId(item.ENodebId, (byte)(item.SectorId + 48));
                if (cell != null)
                {
                    item.SectorId += 48;
                    _repository.Update(item);
                    count++;
                }
            }
            return(count);
        }