|
|
@@ -125,9 +125,9 @@ public class UserUtil extends GroupUtil {
|
|
|
* AND units_to_groups.unit_id =last_units_positions.unit_id ;
|
|
|
*/
|
|
|
String last_pos_table = SQLExecutor.getUnitsLastPositions_table();
|
|
|
+ /*
|
|
|
String queryObservations = "SELECT gid, st_x(the_geom), st_y(the_geom), st_srid(the_geom), speed, "
|
|
|
- + last_pos_table
|
|
|
- + ".unit_id, time_stamp, units_to_groups.group_id "
|
|
|
+ + last_pos_table + ".unit_id, time_stamp, units_to_groups.group_id "
|
|
|
+ "FROM "
|
|
|
+ last_pos_table
|
|
|
+ ", "
|
|
|
@@ -137,6 +137,12 @@ public class UserUtil extends GroupUtil {
|
|
|
+ ") AND units_to_groups.unit_id = "
|
|
|
+ last_pos_table
|
|
|
+ ".unit_id; ";
|
|
|
+ */
|
|
|
+ String queryObservations = "SELECT units_to_groups.group_id, units_to_groups.unit_id,"
|
|
|
+ + " lpt.gid, lpt.time_stamp, st_x(lpt.the_geom), st_y(lpt.the_geom), st_srid(lpt.the_geom), lpt.speed"
|
|
|
+ + " FROM units_to_groups"
|
|
|
+ + " LEFT JOIN "+last_pos_table+" lpt ON units_to_groups.unit_id = lpt.unit_id"
|
|
|
+ + " WHERE ("+ this.getWhereStatemant(user_name, "units_to_groups.group_id") + ");";
|
|
|
return stmt.executeQuery(queryObservations);
|
|
|
}
|
|
|
|