Mercurial > lada > lada-server
changeset 560:c3742f46c8e1
Updated queryconf; Added 'probe.id' as result.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 13 Mar 2015 16:46:15 +0100 |
parents | 7c1f9409764a |
children | 20016be6c072 |
files | src/main/java/de/intevation/lada/rest/ProbeService.java src/main/resources/queryconf.json |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/rest/ProbeService.java Fri Mar 13 16:45:11 2015 +0100 +++ b/src/main/java/de/intevation/lada/rest/ProbeService.java Fri Mar 13 16:46:15 2015 +0100 @@ -116,6 +116,7 @@ filters.add( jsonFilters.getJsonObject(i).getString("dataIndex")); } + results.add("id"); for (int i = 0; i < jsonResults.size(); i++) { results.add( jsonResults.getJsonObject(i).getString("dataIndex"));
--- a/src/main/resources/queryconf.json Fri Mar 13 16:45:11 2015 +0100 +++ b/src/main/resources/queryconf.json Fri Mar 13 16:46:15 2015 +0100 @@ -2,7 +2,7 @@ { "id": "1", "name": "Kein Filter", "description": "Abfrage der Proben ohne Filter", - "sql": "select pt.probe_id_alt, mst_id, umw_id from probe join probe_translation pt on probe.id = pt.probe_id", + "sql": "select p.id, pt.probe_id_alt, p.mst_id, p.umw_id from probe p join probe_translation pt on p.id = pt.probe_id", "result": [ {"dataIndex": "probeId", "header": "ProbeId", "width": 100}, {"dataIndex": "mstId", "header": "MST", "width": 100}, @@ -14,7 +14,7 @@ { "id": "2", "name": "MST und UMW", "description": "Abfrage der Proben gefiltert nach Messtellen ID und ID des Umweltbereichs", - "sql": "select pt.probe_id_alt, p.mst_id, p.umw_id from probe p join probe_translation pt on p.id = pt.probe_id where (p.mst_id = :mst_id OR '' = :mst_id) and (p.umw_id = :umw_id OR '' = :umw_id)", + "sql": "select p.id, pt.probe_id_alt, p.mst_id, p.umw_id from probe p join probe_translation pt on p.id = pt.probe_id where (p.mst_id = :mst_id OR '' = :mst_id) and (p.umw_id = :umw_id OR '' = :umw_id)", "result": [ {"dataIndex": "probeId", "header": "ProbeId", "width": 100}, {"dataIndex": "mstId", "header": "MST", "width": 100},