示例#1
0
        private List <FreqPlanActivity> SelectFreqPartConvert(List <FreqPlanSegment> obj)
        {
            List <FreqPlanActivity> freqActivitys = new List <FreqPlanActivity>(obj.Count);

            for (int i = 0; i < obj.Count; i++)
            {
                FreqPlanSegment freqActivity = new FreqPlanActivity();
                StructClone.ClassClone(obj[i], ref freqActivity);
                ((FreqPlanActivity)freqActivity).ActivityId = CO_IA.Client.RiasPortal.ModuleContainer.Activity.Guid;
                ((FreqPlanActivity)freqActivity).PlaceId    = _activityPlaceId;
                freqActivitys.Add((FreqPlanActivity)freqActivity);
            }
            return(freqActivitys);
        }
示例#2
0
        /// <summary>
        /// 台站信息转周围台站信息
        /// </summary>
        /// <param name="pStationInfos"></param>
        /// <param name="pFreqPlans"></param>
        /// <param name="pStatFreqDic"></param>
        /// <returns></returns>
        private List <RoundStationInfo> StationInfoConvert(List <StationInfo> pStationInfos, List <FreqPlanActivity> pFreqPlans, Dictionary <string, FreqPlanSegment> pStatFreqDic)
        {
            List <RoundStationInfo> roundStations = new List <RoundStationInfo>(pStationInfos.Count);

            for (int i = 0; i < pStationInfos.Count; i++)
            {
                StationInfo stationInfo = new RoundStationInfo();
                StructClone.ClassClone(pStationInfos[i], ref stationInfo);
                ((RoundStationInfo)stationInfo).ActivityId       = CO_IA.Client.RiasPortal.ModuleContainer.Activity.Guid;
                ((RoundStationInfo)stationInfo).PlaceId          = _activityPlaceId;
                ((RoundStationInfo)stationInfo).FreqActivityGuid = _activityPlaceId;
                //获取台站发射信息
                List <FreqEmitInfo> emitInfos = GetStationSystemEmitInfo(pStationInfos[i].STATGUID, pStationInfos[i].STAT_APP_TYPE);
                if (emitInfos != null && emitInfos.Count > 0)
                {
                    foreach (var emit in emitInfos)
                    {
                        emit.StationGuid = pStationInfos[i].STATGUID;
                        emit.PlaceGuid   = _activityPlaceId;
                        emit.NeedClear   = NeedClearEunm.NotNeedClear;
                        emit.ClearResult = ClearResultEnum.NotClear;
                    }
                }
                ((RoundStationInfo)stationInfo).EmitInfos = emitInfos;
                FreqPlanSegment freqSegment = null;
                if (pStatFreqDic.TryGetValue(((RoundStationInfo)stationInfo).STATGUID, out freqSegment))
                {
                    if (freqSegment is FreqPlanActivity)
                    {
                        ((RoundStationInfo)stationInfo).FreqActivityGuid = (freqSegment as FreqPlanActivity).Guid;
                    }
                    ((RoundStationInfo)stationInfo).FreqPart = freqSegment;
                }
                roundStations.Add((RoundStationInfo)stationInfo);
            }
            return(roundStations);
        }