Mercurial > lada > lada-server
annotate src/main/resources/queryconf.json @ 573:08084d754073
Updated sql query to fit the requirements of sorting and paging.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 19 Mar 2015 09:28:18 +0100 |
parents | c3742f46c8e1 |
children | 7f5e2e68c765 |
rev | line source |
---|---|
431
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
1 [ |
452
819747a8d037
Changed query id from integer to String. Updated query 1 & 2.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
431
diff
changeset
|
2 { "id": "1", |
431
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
3 "name": "Kein Filter", |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
4 "description": "Abfrage der Proben ohne Filter", |
560
c3742f46c8e1
Updated queryconf; Added 'probe.id' as result.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
452
diff
changeset
|
5 "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", |
431
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
6 "result": [ |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
7 {"dataIndex": "probeId", "header": "ProbeId", "width": 100}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
8 {"dataIndex": "mstId", "header": "MST", "width": 100}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
9 {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100} |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
10 ], |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
11 "filters": [ |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
12 ] |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
13 }, |
452
819747a8d037
Changed query id from integer to String. Updated query 1 & 2.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
431
diff
changeset
|
14 { "id": "2", |
431
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
15 "name": "MST und UMW", |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
16 "description": "Abfrage der Proben gefiltert nach Messtellen ID und ID des Umweltbereichs", |
573
08084d754073
Updated sql query to fit the requirements of sorting and paging.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
560
diff
changeset
|
17 "sql": "select p.id as id, pt.probe_id_alt as probeId, p.mst_id as mstId, p.umw_id as umwId 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)", |
431
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
18 "result": [ |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
19 {"dataIndex": "probeId", "header": "ProbeId", "width": 100}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
20 {"dataIndex": "mstId", "header": "MST", "width": 100}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
21 {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100} |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
22 ], |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
23 "filters": [ |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
24 {"dataIndex": "mst_id", "type": "listmst", "label": "Messstelle"}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
25 {"dataIndex": "umw_id", "type": "listumw", "label": "Umweltbereich"} |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
26 ] |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
27 }, |
452
819747a8d037
Changed query id from integer to String. Updated query 1 & 2.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
431
diff
changeset
|
28 { "id": "3", |
431
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
29 "name": "Proben pro Land", |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
30 "description": "Detailiertere Beschreibung der Abfrage", |
452
819747a8d037
Changed query id from integer to String. Updated query 1 & 2.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
431
diff
changeset
|
31 "sql": "select probe_id, netzbetreiber_id, mst_id, umw_id, hauptproben_nr from probe where (netzbetreiber_id = :netz OR '' = :netz)", |
431
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
32 "result": [ |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
33 {"dataIndex": "probeId", "header": "ProbeId", "width": 100}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
34 {"dataIndex": "netzbetreiberId", "header": "Land", "width": 100}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
35 {"dataIndex": "mstId", "header": "MST", "width": 100}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
36 {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
37 {"dataIndex": "hauptprobenNr", "header": "Proben-Nr", "width": 100} |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
38 ], |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
39 "filters": [ |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
40 {"dataIndex": "netz", "type": "listnetz", "label": "Land"} |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
41 ] |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
42 }, |
452
819747a8d037
Changed query id from integer to String. Updated query 1 & 2.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
431
diff
changeset
|
43 { "id": "4", |
431
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
44 "name": "alle Proben mit Ort", |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
45 "description": "alle Proben mit Entnahmeort", |
452
819747a8d037
Changed query id from integer to String. Updated query 1 & 2.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
431
diff
changeset
|
46 "sql": "select lp.probe_id, lp.netzbetreiber_id, lp.mst_id, lp.umw_id, lp.hauptproben_nr, ort.gem_id, s_verwaltungseinheit.bezeichnung from probe left outer join l_ort on (lp.probe_id = l_ort.probe_id) left outer join ort on (l_ort.ort_id = ort.ort_id) left outer join s_verwaltungseinheit on (ort.gem_id = s_verwaltungseinheit.gem_id) where l_ort.orts_typ = 'E' or l_ort.orts_typ is null", |
431
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
47 "result": [ |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
48 {"dataIndex": "probeId", "header": "ProbeId", "width": 100}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
49 {"dataIndex": "netzbetreiberId", "header": "Land", "width": 50}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
50 {"dataIndex": "mstId", "header": "MST", "width": 60}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
51 {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
52 {"dataIndex": "hauptprobenNr", "header": "Proben-Nr", "width": 100}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
53 {"dataIndex": "gemId", "header": "Gem-ID", "width": 100}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
54 {"dataIndex": "bezeichnung", "header": "Gemeinde", "flex": 1} |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
55 ], |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
56 "filters": [ |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
57 ] |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
58 }, |
452
819747a8d037
Changed query id from integer to String. Updated query 1 & 2.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
431
diff
changeset
|
59 { "id": "5", |
431
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
60 "name": "Proben pro Land und UMW (Multiselect)", |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
61 "description": "Abfrage aller Proben gefiltert pro Land und Umweltbereich (mit Mehrfachauswahl)", |
452
819747a8d037
Changed query id from integer to String. Updated query 1 & 2.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
431
diff
changeset
|
62 "sql": "select lp.probe_id, lp.netzbetreiber_id, lp.mst_id, to_char(lp.probeentnahme_beginn,'YYYY-mm-dd HH24:MI') entnahme_von, to_char(lp.probeentnahme_ende,'YYYY-mm-dd HH24:MI') entnahme_bis, lp.umw_id, lp.hauptproben_nr, l_ort.orts_typ, ort.gem_id, s_verwaltungseinheit.bezeichnung from probe left outer join l_ort on (lp.probe_id = l_ort.probe_id) left outer join ort on (l_ort.ort_id = ort.ort_id) left outer join s_verwaltungseinheit on (ort.gem_id = s_verwaltungseinheit.gem_id) where (l_ort.orts_typ = 'E' or l_ort.orts_typ is null) and lp.netzbetreiber_id = :netz and (umw_id similar to (:umw_id) OR '' = :umw_id)", |
431
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
63 "result": [ |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
64 {"dataIndex": "probeId", "header": "ProbeId", "width": 100}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
65 {"dataIndex": "netzbetreiberId", "header": "Land", "width": 50}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
66 {"dataIndex": "mstId", "header": "MST", "width": 50}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
67 {"dataIndex": "entnahmeVon", "header": "Entnahme von", "width": 120}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
68 {"dataIndex": "entnahmeBis", "header": "Entnahme bis", "width": 120}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
69 {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
70 {"dataIndex": "hauptprobenNr", "header": "Proben-Nr", "width": 100}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
71 {"dataIndex": "ortsTyp", "header": "Ortstyp", "width": 50}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
72 {"dataIndex": "genId", "header": "Gemeinde-ID", "width": 100}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
73 {"dataIndex": "bezeichnung", "header": "Gemeinde", "flex": 1} |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
74 ], |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
75 "filters": [ |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
76 {"dataIndex": "netz", "type": "listnetz", "label": "Land"}, |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
77 {"dataIndex": "umw_id", "type": "listumw", "label": "Umweltbereich", "multiselect":true} |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
78 ] |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
79 } |
83b92b475d9d
Moved config file for queries and read the file via stream from resources.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
80 ] |