public int DumpMongoStats(InterferenceMatrixStat stat)
        {
            stat.RecordTime = stat.RecordTime.Date;
            var existedStat =
                _repository.FirstOrDefault(
                    x =>
                    x.ENodebId == stat.ENodebId && x.SectorId == stat.SectorId &&
                    x.DestPci == stat.DestPci && x.RecordTime == stat.RecordTime);

            if (existedStat == null)
            {
                _repository.Insert(stat);
            }

            return(_repository.SaveChanges());
        }
        public int DumpMongoStats(InterferenceMatrixStat stat)
        {
            stat.StatDate = stat.StatDate.Date;
            var cellId = stat.ENodebId + "-" + stat.SectorId;
            var existedStat =
                _repository.FirstOrDefault(
                    x => x.CellId == cellId && x.NeighborPci == stat.NeighborPci && x.StatDate == stat.StatDate);
            if (existedStat == null)
                _repository.Insert(stat);
            else
            {
                existedStat.DestENodebId = stat.DestENodebId;
                existedStat.DestSectorId = stat.DestSectorId;
            }

            return _repository.SaveChanges();
        }
        public int DumpMongoStats(InterferenceMatrixStat stat)
        {
            stat.StatDate = stat.StatDate.Date;
            var cellId      = stat.ENodebId + "-" + stat.SectorId;
            var existedStat =
                _repository.FirstOrDefault(
                    x => x.CellId == cellId && x.NeighborPci == stat.NeighborPci && x.StatDate == stat.StatDate);

            if (existedStat == null)
            {
                _repository.Insert(stat);
            }
            else
            {
                existedStat.DestENodebId = stat.DestENodebId;
                existedStat.DestSectorId = stat.DestSectorId;
            }

            return(_repository.SaveChanges());
        }
Example #4
0
 public int Post(InterferenceMatrixStat dumpInfo)
 {
     return(_service.DumpMongoStats(dumpInfo));
 }
 public int Post(InterferenceMatrixStat dumpInfo)
 {
     return _service.DumpMongoStats(dumpInfo);
 }