private List<VGPSHistoryRunInfo> GetHistoryRunInfo(IList<EGPSHistoryInfo> ltHistoryInfo_All)
        {
            List<VGPSHistoryRunInfo> ltHistoryInfo = new List<VGPSHistoryRunInfo>();
            decimal currentMileage = 0;
            for (int i = 0; i < ltHistoryInfo_All.Count; i++)
            {
                
                var current = ltHistoryInfo_All[i];

                currentMileage += current.Mileage;

                bool isStop = CheckIsStop(current, ltHistoryInfo_All, i);

                if (isStop) 
                {
                    continue;
                }

                VGPSHistoryRunInfo historyInfo = new VGPSHistoryRunInfo();
                current.Mileage = currentMileage;                
                historyInfo.Longitude = current.Longitude;
                historyInfo.Latitude = current.Latitude;
                //historyInfo.EncodeLatLon = arrLatLonParameter[i];
                historyInfo.ReportTime = current.ReportTime.ToString("yyyy-MM-dd HH:mm");
                historyInfo.Speed = current.Speed.ToString() + "公里/小时";
                historyInfo.Direction = current.Direction.ToString();
                historyInfo.Mileage = (current.Mileage / 1000).ToString();

                ltHistoryInfo.Add(historyInfo);
            }
            return ltHistoryInfo;
        }
        /// <summary>
        /// 返回运行的点的视图实体列表
        /// </summary>
        private List<VGPSHistoryRunInfo> GetVGPSHistoryRunInfoList(List<LatLon> ltLatLon, EGPSHistoryInfo[] arrEGPSHistoryInfo,
            List<string> listStopTime)
        {
            //IMapService service = new PES.MapService.MapSearchService.MapService();
            //string[] arrLatLonParameter = service.Encode(ltLatLon.ToArray());

            //if ((arrLatLonParameter == null) || (arrLatLonParameter.Length == 0))
            //{
            //    return null;
            //}

            List<VGPSHistoryRunInfo> ltHistoryInfo = new List<VGPSHistoryRunInfo>();

            for (int i = 0; i < arrEGPSHistoryInfo.Length; i++)
            {
                VGPSHistoryRunInfo historyInfo = new VGPSHistoryRunInfo();

                historyInfo.Longitude = arrEGPSHistoryInfo[i].Longitude;
                historyInfo.Latitude = arrEGPSHistoryInfo[i].Latitude;
                //historyInfo.EncodeLatLon = arrLatLonParameter[i];
                historyInfo.ReportTime = arrEGPSHistoryInfo[i].ReportTime.ToString();
                historyInfo.Speed = arrEGPSHistoryInfo[i].Speed.ToString() + "公里/小时";
                historyInfo.Direction = arrEGPSHistoryInfo[i].Direction.ToString();
                historyInfo.Mileage = (arrEGPSHistoryInfo[i].Mileage / 1000).ToString();//迁移前为decimal
                historyInfo.StopTime = listStopTime[i];

                ltHistoryInfo.Add(historyInfo);
            }

            if (ltHistoryInfo.Count == 0)
                return null;

            return ltHistoryInfo;
        }
 private VGPSHistoryRunInfo ConvertToVGPSHistoryRunInfo(decimal currentMileage, EGPSHistoryInfo current, bool IsNotSurtStop, bool IsStop, TimeSpan stopTime, string stopTimeBegin, string stopTimeEnd)
 {
     VGPSHistoryRunInfo historyInfo = new VGPSHistoryRunInfo();
     current.Mileage = currentMileage;
     historyInfo.Longitude = current.Longitude;
     historyInfo.Latitude = current.Latitude;
     //historyInfo.EncodeLatLon = arrLatLonParameter[i];
     historyInfo.ReportTime = current.ReportTime.ToString("yyyy-MM-dd HH:mm");
     historyInfo.Speed = current.Speed.ToString() + "公里/小时";
     historyInfo.Direction = current.Direction.ToString();
     historyInfo.Mileage = current.Mileage / 1000;
     historyInfo.StarkMileage = current.StarkMileage;
     historyInfo.IsNotSureStop = IsNotSurtStop;
     historyInfo.IsStop = IsStop;
     historyInfo.StopTime = (stopTime.Days * 24 * 60 + stopTime.Hours * 60 + stopTime.Minutes) + "分钟";
     historyInfo.StopTimeBegin = stopTimeBegin;
     historyInfo.StopTimeEnd = stopTimeEnd;
     return historyInfo;        
 }