Mercurial > lada > lada-server
annotate src/test/resources/probequery.json @ 905:df2908334150
Set netzbetreiber-specific IDs UNIQUE per netzbetreiber.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Tue, 05 Apr 2016 10:49:13 +0200 |
parents | 59c51da59b30 |
children |
rev | line source |
---|---|
642
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
1 [ |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
2 { "id": "1", |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
3 "name": "Kein Filter", |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
4 "description": "Abfrage der Proben ohne Filter", |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
5 "sql": "select p.id as id, pt.probe_id_alt as probeId, p.mst_id as mstId, p.umw_id as umwId from land.probe p join land.probe_translation pt on p.id = pt.probe_id", |
832
59c51da59b30
Refactored test environment.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
642
diff
changeset
|
6 "type": "probe", |
642
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
7 "result": [ |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
8 {"dataIndex": "probeId", "header": "ProbeId", "width": 100}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
9 {"dataIndex": "mstId", "header": "MST", "width": 100}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
10 {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100} |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
11 ], |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
12 "filters": [ |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
13 ] |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
14 }, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
15 { "id": "2", |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
16 "name": "MST und UMW", |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
17 "description": "Abfrage der Proben gefiltert nach Messtellen ID und ID des Umweltbereichs", |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
18 "sql": "select p.id as id, pt.probe_id_alt as probeId, p.mst_id as mstId, p.umw_id as umwId from land.probe p join land.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)", |
832
59c51da59b30
Refactored test environment.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
642
diff
changeset
|
19 "type": "probe", |
642
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
20 "result": [ |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
21 {"dataIndex": "probeId", "header": "ProbeId", "width": 100}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
22 {"dataIndex": "mstId", "header": "MST", "width": 100}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
23 {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100} |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
24 ], |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
25 "filters": [ |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
26 {"dataIndex": "mst_id", "type": "listmst", "label": "Messstelle"}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
27 {"dataIndex": "umw_id", "type": "listumw", "label": "Umweltbereich"} |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
28 ] |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
29 }, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
30 { "id": "3", |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
31 "name": "Proben pro Land", |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
32 "description": "Proben gefiltert nach Ländern", |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
33 "sql": "select p.id as id, pt.probe_id_alt as probeId, p.netzbetreiber_id as netzbetreiberId, p.mst_id as mstId, p.umw_id as umwId, p.hauptproben_nr as hauptprobenNr from land.probe p join land.probe_translation pt on p.id = pt.probe_id where (netzbetreiber_id = :netz OR '' = :netz)", |
832
59c51da59b30
Refactored test environment.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
642
diff
changeset
|
34 "type": "probe", |
642
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
35 "result": [ |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
36 {"dataIndex": "probeId", "header": "ProbeId", "width": 100}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
37 {"dataIndex": "netzbetreiberId", "header": "Land", "width": 100}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
38 {"dataIndex": "mstId", "header": "MST", "width": 100}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
39 {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
40 {"dataIndex": "hauptprobenNr", "header": "Proben-Nr", "width": 100} |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
41 ], |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
42 "filters": [ |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
43 {"dataIndex": "netz", "type": "listnetz", "label": "Land"} |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
44 ] |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
45 }, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
46 { "id": "4", |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
47 "name": "alle Proben mit Ort", |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
48 "description": "alle Proben mit Entnahmeort", |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
49 "sql": "select p.id as id, pt.probe_id_alt as probeId, p.netzbetreiber_id as netzbetreiberId, p.mst_id as mstId, p.umw_id as umwId, p.hauptproben_nr as hauptprobenNr, so.gem_id as gemId, v.bezeichnung as bezeichnung from land.probe p join land.probe_translation pt on p.id = pt.probe_id left outer join land.ort o on (p.id = o.probe_id) left outer join stammdaten.ort so on (o.ort_id = so.id) left outer join stammdaten.verwaltungseinheit v on (so.gem_id = v.id) where o.orts_typ = 'E' or o.orts_typ is null", |
832
59c51da59b30
Refactored test environment.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
642
diff
changeset
|
50 "type": "probe", |
642
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
51 "result": [ |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
52 {"dataIndex": "probeId", "header": "ProbeId", "width": 100}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
53 {"dataIndex": "netzbetreiberId", "header": "Land", "width": 50}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
54 {"dataIndex": "mstId", "header": "MST", "width": 60}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
55 {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
56 {"dataIndex": "hauptprobenNr", "header": "Proben-Nr", "width": 100}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
57 {"dataIndex": "gemId", "header": "Gem-ID", "width": 100}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
58 {"dataIndex": "bezeichnung", "header": "Gemeinde", "flex": 1} |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
59 ], |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
60 "filters": [ |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
61 ] |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
62 }, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
63 { "id": "5", |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
64 "name": "Proben pro Land und UMW (Multiselect)", |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
65 "description": "Abfrage aller Proben gefiltert pro Land und Umweltbereich (mit Mehrfachauswahl)", |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
66 "sql": "select p.id as id, pt.probe_id_alt as probeId, p.netzbetreiber_id as netzbetreiberId, p.mst_id as mstId, to_char(p.probeentnahme_beginn,'YYYY-mm-dd HH24:MI') entnahmeVon, to_char(p.probeentnahme_ende,'YYYY-mm-dd HH24:MI') entnahmeBis, p.umw_id as umwId, p.hauptproben_nr as hauptprobenNr, o.orts_typ as ortsTyp, so.gem_id as gemId, v.bezeichnung as bezeichnung from land.probe p join land.probe_translation pt on p.id = pt.probe_id left outer join land.ort o on (p.id = o.probe_id) left outer join stammdaten.ort so on (o.ort_id = so.id) left outer join stammdaten.verwaltungseinheit v on (so.gem_id = v.id) where (o.orts_typ = 'E' or o.orts_typ is null) and (p.netzbetreiber_id = :netz OR '' =:netz) and (p.umw_id similar to (:umw_id) OR '' = :umw_id)", |
832
59c51da59b30
Refactored test environment.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
642
diff
changeset
|
67 "type": "probe", |
642
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
68 "result": [ |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
69 {"dataIndex": "probeId", "header": "ProbeId", "width": 100}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
70 {"dataIndex": "netzbetreiberId", "header": "Land", "width": 50}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
71 {"dataIndex": "mstId", "header": "MST", "width": 50}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
72 {"dataIndex": "entnahmeVon", "header": "Entnahme von", "width": 120}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
73 {"dataIndex": "entnahmeBis", "header": "Entnahme bis", "width": 120}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
74 {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
75 {"dataIndex": "hauptprobenNr", "header": "Proben-Nr", "width": 100}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
76 {"dataIndex": "ortsTyp", "header": "Ortstyp", "width": 50}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
77 {"dataIndex": "genId", "header": "Gemeinde-ID", "width": 100}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
78 {"dataIndex": "bezeichnung", "header": "Gemeinde", "flex": 1} |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
79 ], |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
80 "filters": [ |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
81 {"dataIndex": "netz", "type": "listnetz", "label": "Land"}, |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
82 {"dataIndex": "umw_id", "type": "listumw", "label": "Umweltbereich", "multiselect":true} |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
83 ] |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
84 } |
72c4510c3d4d
Added resources for filter queries to test env.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
85 ] |