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); }
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); }