Exemplo n.º 1
0
 void MyLastSeatSumTime_TimeTo(object sender, EventArgs e)
 {
     MyLastSeatSumTime.TimeStop();
     _LastSeatCount = TerminalOperatorService.LastSeatCount(ClientObject.ClientSetting.DeviceSetting.Rooms);
     OnPropertyChanged("LastSeat");
     MyLastSeatSumTime.TimeStrat();
 }
Exemplo n.º 2
0
        private bool CheckMacAddress()
        {
            ShowMessage = "验证终端设置绑定的Mac地址";
            //TODO:验证Mac地址
            ShowMessage = "获取本地MAC地址";
            List <string> localMacAdd;

            try
            {
                localMacAdd = GetMacAddress.GetLocalAddress();
            }
            catch (Exception ex)
            {
                ShowMessage = "本地MAC获取失败:" + ex.Message;
                return(false);
            }
            ShowMessage = "本地MAC获取成功,获取SystemObject单例";
            SystemObject clientObject = SystemObject.GetInstance();

            if (clientObject.ClientSetting == null)
            {
                ShowMessage = "获取终端设置失败, 请检查终端编号是否正确。";
                return(false);
            }
            ShowMessage = "获取SystemObject单例获取成功";

            if (!string.IsNullOrEmpty(clientObject.ClientSetting.TerminalMacAddress))//mac地址不为空
            {
                foreach (string macAdd in localMacAdd)
                {
                    if (clientObject.ClientSetting.TerminalMacAddress == macAdd)
                    {
                        return(true);
                    }
                }
                ShowMessage = "Mac地址验证失败,重新设置终端编号,您也可以通过本地设置程序强行将Mac地址和终端编号锁定";
                return(false);
            }
            if (localMacAdd.Count > 0)
            {
                //TODO:更新终端设置
                clientObject.ClientSetting.TerminalMacAddress = localMacAdd[0];
            }
            try
            {
                if (!string.IsNullOrEmpty(TerminalOperatorService.UpdateTeminalSetting(clientObject.ClientSetting)))
                {
                    ShowMessage = "尝试锁定终端设置的时候出现错误。";
                    return(false);
                }
                return(true);
            }
            catch
            {
                ShowMessage = "尝试锁定终端设置的时候出现错误。";
                return(false);
            }
        }
Exemplo n.º 3
0
 public void LastSeatRun()
 {
     _LastSeatCount = TerminalOperatorService.LastSeatCount(ClientObject.ClientSetting.DeviceSetting.Rooms);
     OnPropertyChanged("LastSeat");
     MyLastSeatSumTime         = new TimeLoop(30 * 1000);
     MyLastSeatSumTime.TimeTo += MyLastSeatSumTime_TimeTo;
     MyLastSeatSum             = new Thread(timeDateTimeShow.TimeStrat);
     MyLastSeatSum.Start();
 }
        /// <summary>
        /// 执行打印操作
        /// </summary>
        /// <param name="_PrintType"></param>
        /// <param name="data"></param>
        public void Print(PrintStatus printType, PrintData data, string clientNo)
        {
            Printer        printerStatus = PrintStatusHandle();
            TerminalInfoV2 term          = TerminalOperatorService.GetTeminalSetting(clientNo);

            if (printerStatus == Printer.NoPaper)
            {
                if (term.PrinterStatus)
                {
                    term.PrinterStatus  = false;
                    term.LastPrintTimes = term.PrintedTimes;
                    term.PrintedTimes   = 0;
                    TerminalOperatorService.UpdateTeminalSetting(term);
                }
                if (PrinterException != null)
                {
                    PrinterException(Printer.NoPaper);
                }
                return;
            }
            if (printerStatus == Printer.Normal)
            {
                term.PrinterStatus            = true;
                term.DeviceSetting.IsAnyPaper = true;
            }

            _PrintType = printType;
            printData  = data;
            XmlDocument doc = new XmlDocument();//原模板

            doc.LoadXml(GetPrintTemplate());
            PrintDocument pd = new PrintDocument();                   //打印操作的对象

            pd.DefaultPageSettings.Margins = new Margins(0, 0, 0, 0); //设置边距
            switch (PrintType)
            {
            //根据凭条的类型,在模板前增加【预约】或【等待】字样的节点
            case PrintStatus.General:
                newDoc = doc;
                break;

            case PrintStatus.Book:
                newDoc = InsertXmlNode(PrintStatus.Book, doc);
                break;

            case PrintStatus.Wait:
                newDoc = InsertXmlNode(PrintStatus.Wait, doc);
                break;
            }
            pd.PrintPage += pd_PrintPage;
            pd.Print();
            term.PrintedTimes++;
            TerminalOperatorService.UpdateTeminalSetting(term);
        }
 /// <summary>
 /// 上传设备运行状态
 /// </summary>
 public void UpdateDeviceState()
 {
     try
     {
         List <TerminalInfoV2> terminalList = TerminalOperatorService.GetAllTeminalInfo();
         foreach (TerminalInfoV2 terminal in terminalList)
         {
             //TODO:
             IDevice.UpdateDeviceStatus(terminal.ClientNo, terminal.StatusUpdateTime);
         }
     }
     catch (Exception ex)
     {
         //  SeatManage.SeatManageComm.WriteLog.Write(string.Format("上传设备运行状态失败:{0}", ex.Message));
     }
 }
Exemplo n.º 6
0
        /// <summary>
        /// 截图
        /// </summary>
        public void ScreenShots()
        {
            if (!_screenShots)
            {
                return;
            }
            if (!Directory.Exists(imageSavePath))
            {
                Directory.CreateDirectory(imageSavePath);
            }
            WPFMessage.MessageHelper.SendMessage(MediaCLient, SeatManage.EnumType.SendClentMessageType.ScreenShots, imageSavePath + "MeadiaClient.jpg");
            WPFMessage.MessageHelper.SendMessage(SeatClient, SeatManage.EnumType.SendClentMessageType.ScreenShots, imageSavePath + "SeatClient.jpg");
            Thread.Sleep(5000);
            if (!File.Exists(imageSavePath + "MeadiaClient.jpg") || !File.Exists(imageSavePath + "SeatClient.jpg"))
            {
                WriteLog.Write("获取截图失败!");
                return;
            }
            try
            {
                Bitmap   image = new Bitmap(1080, 1920);
                Graphics bg    = Graphics.FromImage(image);
                Image    bgmc  = Bitmap.FromFile(imageSavePath + "MeadiaClient.jpg");
                bg.DrawImage(bgmc, 0, 0, 1080, 920);
                Image scmc = Bitmap.FromFile(imageSavePath + "SeatClient.jpg");
                bg.DrawImage(scmc, 0, 921, 1080, 1000);
                image.Save(imageSavePath + _schoolNo + _clientNo + ".jpg");

                FileOperate fileOperate = new FileOperate();
                fileOperate.UpdateFile(imageSavePath + _schoolNo + _clientNo + ".jpg", string.Format("{0}{1}.jpg", _schoolNo, _clientNo), SeatManage.EnumType.SeatManageSubsystem.Caputre);
                //更新数据库状态
                TerminalInfoV2 terminal = TerminalOperatorService.GetTeminalSetting(_clientNo);
                terminal.ScreenshotPath   = string.Format("{0}{1}.jpg", _schoolNo, _clientNo);
                terminal.StatusUpdateTime = ServiceDateTime.Now;
                TerminalOperatorService.UpdateTeminalSetting(terminal);
            }
            catch (Exception ex)
            {
                WriteLog.Write("发送设备状态失败:" + ex.Message);
            }
        }
 /// <summary>
 /// 授权,如果设置为服务器授权,则不管是否在线都要联网获取授权
 /// </summary>
 public void Empower()
 {
     try
     {
         //如果设置为服务器授权,则不管是否在线都要联网获取授权。
         if (ServiceSet.Empower == EmpowerMode.Server)
         {
             try
             {
                 //从Advert服务器上获取时间,以判断 是否能够连接到公司服务器上
                 DateTime?dt = DateTime.Now;
                 //如果有值说明能够连接到服务器上,进行授权。
                 if (dt.HasValue)
                 {
                     List <TerminalInfoV2> terminalList = TerminalOperatorService.GetAllTeminalInfo();
                     foreach (TerminalInfoV2 terminal in terminalList)
                     {
                         terminal.EmpowerLoseEfficacyTime = ServiceDateTime.Now.AddDays(7);
                         TerminalOperatorService.UpdateTeminalSetting(terminal);
                     }
                 }
             }
             catch { }
         }
         else if (ServiceSet.Empower == EmpowerMode.Local)
         {
             List <TerminalInfoV2> terminalList = TerminalOperatorService.GetAllTeminalInfo();
             foreach (TerminalInfoV2 terminal in terminalList)
             {
                 terminal.EmpowerLoseEfficacyTime = ServiceDateTime.Now.AddDays(7);
                 TerminalOperatorService.UpdateTeminalSetting(terminal);
             }
         }
     }
     catch (Exception ex)
     {
         WriteLog.Write(string.Format("终端使用授权失败:{0}", ex.Message));
     }
 }
 /// <summary>
 /// 获取该学校的终端信息
 /// </summary>
 public void GetDevice()
 {
     try
     {
         if (ServiceSet.IsOnline)
         {
             //媒体服务器的设备列表
             List <AMS_Device> modelList = IDevice.GeDeviceModelBySchoolNum(ServiceSet.SchoolNums, false);
             Dictionary <string, AMS_Device> ModelDic = new Dictionary <string, AMS_Device>();
             foreach (AMS_Device item in modelList)
             {
                 ModelDic.Add(item.Number, item);
             }
             //学校的设备列表
             List <TerminalInfoV2> oldModelList = TerminalOperatorService.GetAllTeminalInfo();
             Dictionary <string, TerminalInfoV2> oldModelDic = new Dictionary <string, TerminalInfoV2>();
             foreach (TerminalInfoV2 item in oldModelList)
             {
                 oldModelDic.Add(item.ClientNo, item);
             }
             //判断是否存在num
             foreach (KeyValuePair <string, AMS_Device> item in ModelDic)
             {
                 if (oldModelDic.Keys.Contains(item.Key))
                 {
                     if (!item.Value.IsDel.Value)
                     {
                         TerminalInfoV2 terminal = TerminalOperatorService.GetTeminalSetting(item.Value.Number);
                         //terminal.Describe = item.Value.Describe;
                         terminal.EmpowerLoseEfficacyTime = ServiceDateTime.Now.AddDays(7);
                         TerminalOperatorService.UpdateTeminalSetting(terminal);
                     }
                     else
                     {
                         AMS_Terminal.DeleteTerminal(item.Key);
                     }
                 }
                 else
                 {
                     if (!item.Value.IsDel.Value)
                     {
                         TerminalInfoV2 terminal = new TerminalInfoV2();
                         //terminal.Describe = item.Value.Describe;
                         terminal.EmpowerLoseEfficacyTime = ServiceDateTime.Now.AddDays(7);
                         terminal.ClientNo         = item.Value.Number;
                         terminal.IsUpdatePlayList = false;
                         TerminalOperatorService.AddTeminalInfo(terminal);
                     }
                 }
                 if (item.Value.Flag.Value)
                 {
                     item.Value.Flag = false;
                     IDevice.UpdateDeviceModel(item.Value);
                 }
             }
             //判断是否存在非法No
             foreach (KeyValuePair <string, TerminalInfoV2> item in oldModelDic)
             {
                 if (!ModelDic.Keys.Contains(item.Key))
                 {
                     AMS_Terminal.DeleteTerminal(item.Key);
                 }
             }
         }
         else
         {
             SystemAuthorization saModel = SeatManage.Bll.SystemAuthorizationOperation.GetSystemAuthorization();
             if (saModel == null || saModel.SchoolNum != SeatManage.Bll.Registry.GetSchoolNum())
             {
                 WriteLog.Write("获取授权文件失败!");
                 return;
             }
             List <TerminalInfoV2> oldModelList = TerminalOperatorService.GetAllTeminalInfo();
             Dictionary <string, TerminalInfoV2> oldModelDic = oldModelList.ToDictionary(item => item.ClientNo);
             foreach (var item in from item in oldModelDic from v in saModel.SeatClientList.Where(v => item.Key == v.Key) select item)
             {
                 item.Value.EmpowerLoseEfficacyTime = ServiceDateTime.Now.AddDays(7);
                 TerminalOperatorService.UpdateTeminalSetting(item.Value);
             }
             foreach (var item in from item in oldModelDic let isExist = saModel.SeatClientList.Any(v => item.Key == v.Key) where !isExist select item)
             {
                 AMS_Terminal.DeleteTerminal(item.Key);
             }
             foreach (var item in from item in saModel.SeatClientList let isExist = oldModelDic.Any(v => item.Key == v.Key) where !isExist select item)
             {
                 TerminalInfoV2 terminal = new TerminalInfoV2();
                 terminal.EmpowerLoseEfficacyTime = ServiceDateTime.Now.AddDays(7);
                 terminal.ClientNo         = item.Key;
                 terminal.IsUpdatePlayList = false;
                 TerminalOperatorService.AddTeminalInfo(terminal);
             }
         }
     }
     catch (Exception ex)
     {
         WriteLog.Write(string.Format("获取学校终端信息失败:{0}", ex.Message));
     }
 }
        /// <summary>
        /// 开始计算
        /// </summary>
        private void Statistics()
        {
            try
            {
                List <TerminalInfoV2> terminals = TerminalOperatorService.GetAllTeminalInfo();
                DateTime sdt = SeatUsageDataOperating.GetLastTerminalUsageStatisticsDate();
                if (sdt <= DateTime.Parse("2000-1-1"))
                {
                    return;
                }
                sdt = sdt.AddDays(1);
                while (true)
                {
                    //获取进出记录
                    List <EnterOutLogInfo> enterOutLogList = T_SM_EnterOutLog_bak.GetStatisticsLogsByDate(sdt);
                    if (enterOutLogList.Count <= 0 && sdt >= ServiceDateTime.Now.Date.AddDays(-1))
                    {
                        break;
                    }
                    List <SeatManage.ClassModel.TerminalUsageStatistics> ftsList = SeatUsageDataOperating.GetTerminalUsageStatisticsist(null, sdt.AddDays(-1).Date, sdt.Date.AddSeconds(-1));
                    Dictionary <string, SeatManage.ClassModel.TerminalUsageStatistics> terminalDir = terminals.ToDictionary(u => u.ClientNo, u => new SeatManage.ClassModel.TerminalUsageStatistics());

                    //基本数据及排序处理
                    foreach (TerminalInfoV2 terminal in terminals)
                    {
                        terminalDir[terminal.ClientNo].StatisticsDate = sdt;
                        terminalDir[terminal.ClientNo].TerminalNo     = terminal.ClientNo;
                    }
                    foreach (EnterOutLogInfo eol in enterOutLogList.FindAll(u => !string.IsNullOrEmpty(u.TerminalNum) && u.Flag == Operation.Reader))
                    {
                        if (!terminalDir.ContainsKey(eol.TerminalNum))
                        {
                            continue;
                        }
                        terminalDir[eol.TerminalNum].RushCardCount++;
                        //记录类型
                        switch (eol.EnterOutState)
                        {
                        case EnterOutLogType.BookingConfirmation:
                            terminalDir[eol.TerminalNum].CheckBespeakCount++;
                            break;

                        case EnterOutLogType.ComeBack:
                            terminalDir[eol.TerminalNum].ComeBackCount++;
                            break;

                        case EnterOutLogType.ContinuedTime:
                            terminalDir[eol.TerminalNum].ContinueTimeCount++;
                            break;

                        case EnterOutLogType.Leave:
                            terminalDir[eol.TerminalNum].LeaveCount++;
                            break;

                        case EnterOutLogType.ReselectSeat:
                            terminalDir[eol.TerminalNum].ReselectSeatCount++;
                            break;

                        case EnterOutLogType.SelectSeat:
                            terminalDir[eol.TerminalNum].SelectSeatCount++;
                            break;

                        case EnterOutLogType.ShortLeave:
                            terminalDir[eol.TerminalNum].ShortLeaveCount++;
                            break;

                        case EnterOutLogType.WaitingSuccess:
                            terminalDir[eol.TerminalNum].WaitSeatCount++;
                            break;
                        }
                    }

                    foreach (SeatManage.ClassModel.TerminalUsageStatistics terminalUS in terminalDir.Values)
                    {
                        SeatManage.ClassModel.TerminalUsageStatistics fts = ftsList.Find(u => u.TerminalNo == terminalUS.TerminalNo);
                        TerminalInfoV2 terminal = terminals.Find(u => u.ClientNo == terminalUS.TerminalNo);
                        if (fts != null)
                        {
                            terminalUS.IsChangePage         = terminal.LastPrintTimes != fts.BeforePagePrintCount ? 1 : 0;
                            terminalUS.NowPagePrintCount    = terminal.PrintedTimes;
                            terminalUS.BeforePagePrintCount = terminal.LastPrintTimes;
                            terminalUS.TodayPrintCount      = terminal.LastPrintTimes != fts.BeforePagePrintCount ? terminal.LastPrintTimes - fts.NowPagePrintCount + terminal.PrintedTimes : terminal.PrintedTimes - fts.NowPagePrintCount;
                        }
                        else
                        {
                            terminalUS.IsChangePage         = 0;
                            terminalUS.NowPagePrintCount    = terminal.PrintedTimes;
                            terminalUS.BeforePagePrintCount = terminal.LastPrintTimes;
                            terminalUS.TodayPrintCount      = 0;
                        }


                        if (!SeatUsageDataOperating.AddTerminalUsageStatistics(terminalUS))
                        {
                            WriteLog.Write(string.Format("数据统计服务:添加终端:{0} {1} 使用情况统计出错", terminalUS.TerminalNo, terminalUS.StatisticsDate));
                            throw new Exception(string.Format("数据统计服务:添加终端:{0} {1} 使用情况统计出错", terminalUS.TerminalNo, terminalUS.StatisticsDate));
                        }
                    }

                    sdt = sdt.AddDays(1);
                    if (sdt >= ServiceDateTime.Now.Date)
                    {
                        break;
                    }
                    terminalDir = null;
                }
                WriteLog.Write("数据统计服务:统计终端使用情况完成");
            }

            catch (Exception ex)
            {
                WriteLog.Write(string.Format("数据统计服务:统计阅终端人流量失败:{0}", ex.Message));
            }
        }
Exemplo n.º 10
0
        /// <summary>
        /// 开始计算
        /// </summary>
        private void Statistics()
        {
            try
            {
                List <TerminalInfoV2> terminals = TerminalOperatorService.GetAllTeminalInfo();
                DateTime sdt = SeatUsageDataOperating.GetLastTerminalFlowStatisticsDate();
                if (sdt <= DateTime.Parse("2000-1-1"))
                {
                    return;
                }
                sdt = sdt.AddDays(1);
                while (true)
                {
                    //获取进出记录
                    List <EnterOutLogInfo> enterOutLogList = T_SM_EnterOutLog_bak.GetStatisticsLogsByDate(sdt);
                    if (enterOutLogList.Count <= 0 && sdt >= ServiceDateTime.Now.Date.AddDays(-1))
                    {
                        break;
                    }
                    Dictionary <string, SeatManage.ClassModel.TerminalFlowStatistics> terminalDir = terminals.ToDictionary(u => u.ClientNo, u => new SeatManage.ClassModel.TerminalFlowStatistics());

                    //基本数据及排序处理
                    foreach (TerminalInfoV2 terminal in terminals)
                    {
                        terminalDir[terminal.ClientNo].StatisticsDate = sdt;
                        terminalDir[terminal.ClientNo].TerminalNo     = terminal.ClientNo;
                        for (int i = 0; i < 24; i++)
                        {
                            terminalDir[terminal.ClientNo].CheckBespeakFlowDic.Add(i, 0);
                            terminalDir[terminal.ClientNo].ComeBackFlowDic.Add(i, 0);
                            terminalDir[terminal.ClientNo].ContinueTimeFlowDic.Add(i, 0);
                            terminalDir[terminal.ClientNo].LeaveFlowDic.Add(i, 0);
                            terminalDir[terminal.ClientNo].ReselectSeatFlowDic.Add(i, 0);
                            terminalDir[terminal.ClientNo].RushCardFlowDic.Add(i, 0);
                            terminalDir[terminal.ClientNo].SelectSeatFlowDic.Add(i, 0);
                            terminalDir[terminal.ClientNo].ShortLeaveFlowDic.Add(i, 0);
                            terminalDir[terminal.ClientNo].WaitSeatFlowDic.Add(i, 0);
                        }
                    }
                    foreach (EnterOutLogInfo eol in enterOutLogList.FindAll(u => !string.IsNullOrEmpty(u.TerminalNum) && u.Flag == Operation.Reader))
                    {
                        if (!terminalDir.ContainsKey(eol.TerminalNum))
                        {
                            continue;
                        }
                        terminalDir[eol.TerminalNum].RushCardFlowDic[eol.EnterOutTime.Hour]++;
                        //记录类型
                        switch (eol.EnterOutState)
                        {
                        case EnterOutLogType.BookingConfirmation:
                            terminalDir[eol.TerminalNum].CheckBespeakFlowDic[eol.EnterOutTime.Hour]++;
                            break;

                        case EnterOutLogType.ComeBack:
                            terminalDir[eol.TerminalNum].ComeBackFlowDic[eol.EnterOutTime.Hour]++;
                            break;

                        case EnterOutLogType.ContinuedTime:
                            terminalDir[eol.TerminalNum].ContinueTimeFlowDic[eol.EnterOutTime.Hour]++;
                            break;

                        case EnterOutLogType.Leave:
                            terminalDir[eol.TerminalNum].LeaveFlowDic[eol.EnterOutTime.Hour]++;
                            break;

                        case EnterOutLogType.ReselectSeat:
                            terminalDir[eol.TerminalNum].ReselectSeatFlowDic[eol.EnterOutTime.Hour]++;
                            break;

                        case EnterOutLogType.SelectSeat:
                            terminalDir[eol.TerminalNum].SelectSeatFlowDic[eol.EnterOutTime.Hour]++;
                            break;

                        case EnterOutLogType.ShortLeave:
                            terminalDir[eol.TerminalNum].ShortLeaveFlowDic[eol.EnterOutTime.Hour]++;
                            break;

                        case EnterOutLogType.WaitingSuccess:
                            terminalDir[eol.TerminalNum].WaitSeatFlowDic[eol.EnterOutTime.Hour]++;
                            break;
                        }
                    }
                    foreach (SeatManage.ClassModel.TerminalFlowStatistics terminalFS in terminalDir.Values)
                    {
                        foreach (KeyValuePair <int, int> item in terminalFS.CheckBespeakFlowDic)
                        {
                            terminalFS.CheckBespeakFlow += item.Key + ":" + item.Value + ";";
                        }
                        foreach (KeyValuePair <int, int> item in terminalFS.ComeBackFlowDic)
                        {
                            terminalFS.ComeBackFlow += item.Key + ":" + item.Value + ";";
                        }
                        foreach (KeyValuePair <int, int> item in terminalFS.ContinueTimeFlowDic)
                        {
                            terminalFS.ContinueTimeFlow += item.Key + ":" + item.Value + ";";
                        }
                        foreach (KeyValuePair <int, int> item in terminalFS.LeaveFlowDic)
                        {
                            terminalFS.LeaveFlow += item.Key + ":" + item.Value + ";";
                        }
                        foreach (KeyValuePair <int, int> item in terminalFS.ReselectSeatFlowDic)
                        {
                            terminalFS.ReselectSeatFlow += item.Key + ":" + item.Value + ";";
                        }
                        foreach (KeyValuePair <int, int> item in terminalFS.SelectSeatFlowDic)
                        {
                            terminalFS.SelectSeatFlow += item.Key + ":" + item.Value + ";";
                        }
                        foreach (KeyValuePair <int, int> item in terminalFS.ShortLeaveFlowDic)
                        {
                            terminalFS.ShortLeaveFlow += item.Key + ":" + item.Value + ";";
                        }
                        foreach (KeyValuePair <int, int> item in terminalFS.WaitSeatFlowDic)
                        {
                            terminalFS.WaitSeatFlow += item.Key + ":" + item.Value + ";";
                        }
                        foreach (KeyValuePair <int, int> item in terminalFS.RushCardFlowDic)
                        {
                            terminalFS.RushCardFlow += item.Key + ":" + item.Value + ";";
                        }
                        if (!SeatUsageDataOperating.AddTerminalFlowStatistics(terminalFS))
                        {
                            WriteLog.Write(string.Format("数据统计服务:添加终端:{0} {1} 人流量统计出错", terminalFS.TerminalNo, terminalFS.StatisticsDate));
                            throw new Exception(string.Format("数据统计服务:添加终端:{0} {1} 人流量统计出错", terminalFS.TerminalNo, terminalFS.StatisticsDate));
                        }
                    }

                    sdt = sdt.AddDays(1);
                    if (sdt >= ServiceDateTime.Now.Date)
                    {
                        break;
                    }
                    terminalDir = null;
                }
                WriteLog.Write("数据统计服务:统计终端人流量完成");
            }

            catch (Exception ex)
            {
                WriteLog.Write(string.Format("数据统计服务:统计阅终端人流量失败:{0}", ex.Message));
            }
        }