//是否达到提醒条件
        private bool IsReachCondition(EFatigueDrivingAlertSetting setting)
        {
            DateTime startTime = DateTime.Now.AddHours(-setting.DrivingDuration);
            DateTime endTime = DateTime.Now;
            IGPSHistoryInfoManager manager = new GPSHistoryInfoManager();
            int rowCountAllState = 0;
            int rowCount = 0;

            if (_MOVOVehicleDict.ContainsKey(setting.VehicleCode))
            {
                rowCount = manager.CountMovoAccOff(setting.VehicleCode, startTime, endTime, out rowCountAllState);
            }
    
            if (rowCountAllState < 100)             //总记录太少,不报警
            {
                Logger.Info(string.Format("车辆code:{0}--总记录太少(少于100),不报警", setting.VehicleCode));
                return false;
            }
            return rowCount == 0;
        }
Exemplo n.º 2
0
 public PES.GPS.Entity.History.VHistoryLocus GetVHistoryLocus(Guid vehicleCode, DateTime beginTime, DateTime endTime)
 {
     IGPSHistoryInfoManager manager = new GPSHistoryInfoManager();
     return manager.GetVHistoryLocus(vehicleCode, beginTime, endTime);
 }