Exemplo n.º 1
0
        /// <summary>
        /// 根据时间获取最近的人员采集记录
        /// </summary>
        /// <returns></returns>
        public static List <R_PhistoryInfo> GetRealR_PhistoryInfoList(DateTime timer)
        {
            List <R_PhistoryInfo>           rvalue  = new List <R_PhistoryInfo>();
            R_PhistoryGetLastByTimerRequest request = new R_PhistoryGetLastByTimerRequest();

            request.Timer = timer;
            rvalue        = r_PhistoryService.GetPersonR_PhistoryByTimer(request).Data;
            return(rvalue);
        }
        /// <summary>
        /// 根据存储时间查询轨迹记录
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public BasicResponse <List <R_PhistoryInfo> > GetPersonR_PhistoryByTimer(R_PhistoryGetLastByTimerRequest request)
        {
            var result = _Repository.QueryTable("global_R_PhistoryService_QueryR_PhistoryByTimer", DateTime.Now.ToString("yyyyMMdd"), request.Timer);
            List <R_PhistoryInfo> R_PhistoryInfoList = new List <R_PhistoryInfo>();

            for (int i = 0; i < result.Rows.Count; i++)
            {
                R_PhistoryInfo tempInfo = new R_PhistoryInfo();
                tempInfo.Id    = result.Rows[i]["id"].ToString();
                tempInfo.Bh    = result.Rows[i]["bh"].ToString();
                tempInfo.Name  = result.Rows[i]["name"].ToString();
                tempInfo.Rtime = DateTime.Parse(result.Rows[i]["rtime"].ToString());
                tempInfo.Timer = DateTime.Parse(result.Rows[i]["timer"].ToString());
                tempInfo.Flag  = result.Rows[i]["flag"].ToString();
                R_PhistoryInfoList.Add(tempInfo);
            }
            var phistoryresponse = new BasicResponse <List <R_PhistoryInfo> >();

            phistoryresponse.Data = R_PhistoryInfoList;
            return(phistoryresponse);
        }