public CellIntraFreqHoView Query() { var zteCellGroup = _zteCellGroupRepository.GetRecentList(_eNodebId, _sectorId); int configId; if (zteCellGroup != null && zteCellGroup.Count > 0) { var fields = zteCellGroup[0].intraFHOMeasCfg.Split(','); configId = fields.Length > 0 ? fields[0].ConvertToInt(0) : 0; } else { var zteGroup = _zteGroupRepository.GetRecent(_eNodebId); var fields = zteGroup?.intraFHOMeasCfg.Split(','); configId = fields != null && fields.Length > 0 ? fields[0].ConvertToInt(0) : 0; } var ztePara = _zteMeasurementRepository.GetRecent(_eNodebId, configId); if (ztePara == null) { return(null); } var result = Mapper.Map <UeEUtranMeasurementZte, CellIntraFreqHoView>(ztePara); result.SectorId = _sectorId; return(result); }
public void Test_GetByENodeb() { var result = _repository.GetRecent(551203); Assert.IsNotNull(result); Assert.AreEqual(result.iDate, "20160304"); }
public void Test_GetOuter() { var result = _outerRepository.GetRecent(551203); Assert.IsNotNull(result); Assert.AreEqual(result.iDate, "20160408"); Assert.AreEqual(result.intraFHOMeasCfg, "50,51"); Assert.AreEqual(int.Parse(result.intraFHOMeasCfg.Split(',')[0]), 50); }
protected override UeEUtranMeasurementZte QueryStat() { if (UeEUtranMeasurementZte.IntraFreqHoConfigId < 0) { var zteGroup = _zteGroupRepository.GetRecent(ENodebId); UeEUtranMeasurementZte.IntraFreqHoConfigId = zteGroup == null ? 50 : int.Parse(zteGroup.intraFHOMeasCfg.Split(',')[0]); } return(_zteMeasurementRepository.GetRecent(ENodebId, UeEUtranMeasurementZte.IntraFreqHoConfigId)); }
public ENodebIntraFreqHoView Query() { if (UeEUtranMeasurementZte.IntraFreqHoConfigId < 0) { var zteGroup = _zteGroupRepository.GetRecent(_eNodebId); UeEUtranMeasurementZte.IntraFreqHoConfigId = zteGroup == null ? 50 : int.Parse(zteGroup.intraFHOMeasCfg.Split(',')[0]); } var ztePara = _zteMeasurementRepository.GetRecent(_eNodebId, UeEUtranMeasurementZte.IntraFreqHoConfigId); return(ztePara == null ? null : Mapper.Map <UeEUtranMeasurementZte, ENodebIntraFreqHoView>(ztePara)); }
public List <CellInterFreqHoView> Query() { var view = new CellInterFreqHoView { Earfcn = 0 }; var zteCellGroup = _zteCellGroupRepository.GetRecent(_eNodebId, _sectorId); int configId, configIdA1, configIdA2; if (zteCellGroup != null) { configId = int.Parse(zteCellGroup.interFHOMeasCfg.Split(',')[0]); configIdA1 = int.Parse(zteCellGroup.closedInterFMeasCfg.Split(',')[0]); configIdA2 = int.Parse(zteCellGroup.openInterFMeasCfg.Split(',')[0]); } else { var zteGroup = _zteGroupRepository.GetRecent(_eNodebId); configId = zteGroup == null ? 70 : int.Parse(zteGroup.interFHOMeasCfg.Split(',')[0]); configIdA1 = zteGroup == null ? 10 : int.Parse(zteGroup.closedInterFMeasCfg.Split(',')[0]); configIdA2 = zteGroup == null ? 20 : int.Parse(zteGroup.openInterFMeasCfg.Split(',')[0]); } var measurement = _zteMeasurementRepository.GetRecent(_eNodebId, configId); if (measurement != null) { view.InterFreqHoEventType = measurement.eventId; view.InterFreqEventA3 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA3>(measurement); view.InterFreqEventA4 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA4>(measurement); view.InterFreqEventA5 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA5>(measurement); } measurement = _zteMeasurementRepository.GetRecent(_eNodebId, configIdA1); if (measurement != null) { view.InterFreqEventA1 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA1>(measurement); } measurement = _zteMeasurementRepository.GetRecent(_eNodebId, configIdA2); if (measurement != null) { view.InterFreqEventA2 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA2>(measurement); } return(new List <CellInterFreqHoView> { view }); }
public CellIntraFreqHoView Query() { var zteCellGroup = _zteCellGroupRepository.GetRecent(_eNodebId, _sectorId); int configId; if (zteCellGroup != null) { configId = int.Parse(zteCellGroup.intraFHOMeasCfg.Split(',')[0]); } else { var zteGroup = _zteGroupRepository.GetRecent(_eNodebId); configId = zteGroup == null ? 50 : int.Parse(zteGroup.intraFHOMeasCfg.Split(',')[0]); } var ztePara = _zteMeasurementRepository.GetRecent(_eNodebId, configId); return(ztePara == null ? null : Mapper.Map <UeEUtranMeasurementZte, CellIntraFreqHoView>(ztePara)); }
public ENodebInterFreqHoView Query() { var view = new ENodebInterFreqHoView { ENodebId = _eNodebId }; var zteGroup = _zteGroupRepository.GetRecent(_eNodebId); var a1ConfigId = zteGroup == null ? 20 : int.Parse(zteGroup.closedInterFMeasCfg.Split(',')[0]); var a1Congig = _zteMeasurementRepository.GetRecent(_eNodebId, a1ConfigId); view.InterFreqHoA1TrigQuan = view.A3InterFreqHoA1TrigQuan = a1Congig?.triggerQuantity ?? 0; var a2ConfigId = zteGroup == null ? 30 : int.Parse(zteGroup.openInterFMeasCfg.Split(',')[0]); var a2Config = _zteMeasurementRepository.GetRecent(_eNodebId, a2ConfigId); view.InterFreqHoA1TrigQuan = view.A3InterFreqHoA2TrigQuan = a2Config?.triggerQuantity ?? 0; var hoEventId = zteGroup == null ? 70 : int.Parse(zteGroup.interFHOMeasCfg.Split(',')[0]); var hoEvent = _zteMeasurementRepository.GetRecent(_eNodebId, hoEventId); view.InterFreqHoA4TrigQuan = hoEvent?.triggerQuantity ?? 0; view.InterFreqHoA4RprtQuan = hoEvent?.reportQuantity ?? 0; view.InterFreqHoRprtInterval = hoEvent?.reportInterval ?? 0; return(view); }
public List <CellInterFreqHoView> Query() { var zteGroup = _zteGroupRepository.GetRecent(_eNodebId); var zteCellGroup = _zteCellGroupRepository.GetRecentList(_eNodebId, _sectorId); var idA1 = zteGroup == null ? 10 : int.Parse(zteGroup.closedInterFMeasCfg.Split(',')[0]); var idA2 = zteGroup == null ? 20 : int.Parse(zteGroup.openInterFMeasCfg.Split(',')[0]); var meas = _zteMeasurementRepository.GetRecent(_eNodebId, idA1); var eventA1 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA1>(meas); meas = _zteMeasurementRepository.GetRecent(_eNodebId, idA2); var eventA2 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA2>(meas); if (zteCellGroup.Count > 1) { return(zteCellGroup.Select(group => { var view = new CellInterFreqHoView { Earfcn = (int)group.eutranMeasParas_interCarriFreq, InterFreqEventA1 = eventA1, InterFreqEventA2 = eventA2 }; var configId = int.Parse(group.interFHOMeasCfg.Split(',')[0]); var measurement = _zteMeasurementRepository.GetRecent(_eNodebId, configId); if (measurement == null) { return view; } view.InterFreqHoEventType = measurement.eventId; view.InterFreqEventA3 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA3>(measurement); view.InterFreqEventA4 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA4>(measurement); view.InterFreqEventA5 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA5>(measurement); return view; }).ToList()); } if (zteCellGroup.Count == 0) { return(new List <CellInterFreqHoView>()); } var configIds = zteCellGroup[0].interFHOMeasCfg.Split(',').Select(int.Parse).Distinct(); return(configIds.Select(id => { var view = new CellInterFreqHoView { Earfcn = (int)zteCellGroup[0].eutranMeasParas_interCarriFreq, InterFreqEventA1 = eventA1, InterFreqEventA2 = eventA2 }; var measurement = _zteMeasurementRepository.GetRecent(_eNodebId, id); if (measurement != null) { view.InterFreqHoEventType = measurement.eventId; view.InterFreqEventA3 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA3>(measurement); view.InterFreqEventA4 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA4>(measurement); view.InterFreqEventA5 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA5>(measurement); } return view; }).ToList()); }