Ejemplo n.º 1
0
 private List<EGPSHistoryInfo> GetGPSHistoryInfoList(Guid vehicleCode, VGPSInstallationInfo installation, EHistoryDataStoreConfig tableConfig,LatLon max,LatLon min,params string[] arrColumnName)
 {
     if (tableConfig == null)
         return null;
     string columnNames = arrColumnName.Length == 0 ? "*" : string.Join(",", arrColumnName);
     string sqlText = string.Format("select {8} from {0} where gpsCode = '{1}' and reporttime between '{2}' and '{3}' and speed > 0 and ACCState = 1 and Longitude between '{4}' and '{5}' and Latitude between '{6}' and '{7}' order by ReportTime asc ",
         tableConfig.StoreTable.TableName, installation.GpsCode, installation.CreateDate, installation.StopDate, min.Longitude, max.Longitude, min.Latitude, max.Latitude, columnNames);
     return List(vehicleCode, tableConfig, sqlText, arrColumnName);
 }
Ejemplo n.º 2
0
 private List<EGPSHistoryInfo> List(Guid vehicleCode, EHistoryDataStoreConfig tableConfig, string sqlText, params string[] arrColumnName)
 {
     DataSet ds = MySqlHelper.ExecuteDataSet(tableConfig.StoreTable.SelectConnStr, sqlText);
     if (ds == null || ds.Tables[0].Rows.Count == 0)
         return null;
     return ConvertInfo(vehicleCode, ds, arrColumnName);
 }
Ejemplo n.º 3
0
 private List<EGPSHistoryInfo> GetGPSHistoryInfoList(Guid vehicleCode, VGPSInstallationInfo installation, EHistoryDataStoreConfig tableConfig,int size, params string[] arrColumnName)
 {
     if (tableConfig == null)
         return null;
     string columnNames = arrColumnName.Length == 0 ? "*" : string.Join(",", arrColumnName);
     string sqlText = string.Format("select {4} from {0} where gpsCode = '{1}' and reporttime between '{2}' and '{3}' and ACCState = 1 order by ReportTime asc limit {5}",
         tableConfig.StoreTable.TableName, installation.GpsCode, installation.CreateDate, installation.StopDate, columnNames,size);
     return List(vehicleCode, tableConfig, sqlText, arrColumnName);
 }