raimund@636: [ mstanko@690: { "id": "0", raimund@636: "name": "Kein Filter", raimund@636: "description": "Abfrage der Proben ohne Filter", mstanko@690: "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", raimund@636: "result": [ mstanko@690: {"dataIndex": "probeId", "header": "ProbeId", "width": 120}, mstanko@690: {"dataIndex": "netzbetreiberId", "header": "Land", "width": 50}, mstanko@690: {"dataIndex": "mstId", "header": "MST", "width": 60}, mstanko@690: {"dataIndex": "umwId", "header": "Umw-ID", "width": 60}, mstanko@690: {"dataIndex": "hauptprobenNr", "header": "Proben-Nr", "width": 120} raimund@636: ], raimund@636: "filters": [ raimund@636: ] raimund@636: }, mstanko@690: { "id": "1", mstanko@739: "name": "HP-Nr-Filer", mstanko@739: "description": "Abfrage der Proben mit Wildcardfilter fuer die Hauptproben-Nr.", mstanko@739: "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 (p.hauptproben_nr like :hp_nr_id or '' = :hp_nr_id)", mstanko@739: "result": [ mstanko@739: {"dataIndex": "probeId", "header": "ProbeId", "width": 120}, mstanko@739: {"dataIndex": "netzbetreiberId", "header": "Land", "width": 50}, mstanko@739: {"dataIndex": "mstId", "header": "MST", "width": 60}, mstanko@739: {"dataIndex": "umwId", "header": "Umw-ID", "width": 60}, mstanko@739: {"dataIndex": "hauptprobenNr", "header": "Proben-Nr", "width": 120} mstanko@739: ], mstanko@739: "filters": [ mstanko@739: {"dataIndex": "hp_nr_id", "type": "text", "label": "Probe_id-Filter"} mstanko@739: ] mstanko@739: }, mstanko@739: { "id": "2", mstanko@690: "name": "Probe-ID-Filer", mstanko@690: "description": "Abfrage der Proben mit Wildcardfilter fuer die Probe_id", mstanko@690: "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 (pt.probe_id_alt like :probe_id or '' = :probe_id)", mstanko@690: "result": [ mstanko@690: {"dataIndex": "probeId", "header": "ProbeId", "width": 120}, mstanko@690: {"dataIndex": "netzbetreiberId", "header": "Land", "width": 50}, mstanko@690: {"dataIndex": "mstId", "header": "MST", "width": 60}, mstanko@690: {"dataIndex": "umwId", "header": "Umw-ID", "width": 60}, mstanko@690: {"dataIndex": "hauptprobenNr", "header": "Proben-Nr", "width": 120} mstanko@690: ], mstanko@690: "filters": [ mstanko@690: {"dataIndex": "probe_id", "type": "text", "label": "Probe_id-Filter"} mstanko@690: ] mstanko@690: }, mstanko@739: { "id": "3", raimund@636: "name": "MST und UMW", raimund@636: "description": "Abfrage der Proben gefiltert nach Messtellen ID und ID des Umweltbereichs", mstanko@690: "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 (p.mst_id = :mst_id OR '' = :mst_id) and (p.umw_id = :umw_id OR '' = :umw_id)", raimund@636: "result": [ mstanko@690: {"dataIndex": "probeId", "header": "ProbeId", "width": 120}, mstanko@690: {"dataIndex": "netzbetreiberId", "header": "Land", "width": 50}, mstanko@690: {"dataIndex": "mstId", "header": "MST", "width": 60}, mstanko@690: {"dataIndex": "umwId", "header": "Umw-ID", "width": 60}, mstanko@690: {"dataIndex": "hauptprobenNr", "header": "Proben-Nr", "width": 120} raimund@636: ], raimund@636: "filters": [ raimund@636: {"dataIndex": "mst_id", "type": "listmst", "label": "Messstelle"}, raimund@636: {"dataIndex": "umw_id", "type": "listumw", "label": "Umweltbereich"} raimund@636: ] raimund@636: }, mstanko@739: { "id": "4", raimund@636: "name": "Proben pro Land", raimund@636: "description": "Proben gefiltert nach Ländern", raimund@636: "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)", raimund@636: "result": [ raimund@636: {"dataIndex": "probeId", "header": "ProbeId", "width": 100}, raimund@636: {"dataIndex": "netzbetreiberId", "header": "Land", "width": 100}, raimund@636: {"dataIndex": "mstId", "header": "MST", "width": 100}, raimund@636: {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100}, raimund@636: {"dataIndex": "hauptprobenNr", "header": "Proben-Nr", "width": 100} raimund@636: ], raimund@636: "filters": [ raimund@636: {"dataIndex": "netz", "type": "listnetz", "label": "Land"} raimund@636: ] raimund@636: }, mstanko@739: { "id": "5", raimund@636: "name": "alle Proben mit Ort", raimund@636: "description": "alle Proben mit Entnahmeort", mstanko@638: "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", raimund@636: "result": [ raimund@636: {"dataIndex": "probeId", "header": "ProbeId", "width": 100}, raimund@636: {"dataIndex": "netzbetreiberId", "header": "Land", "width": 50}, raimund@636: {"dataIndex": "mstId", "header": "MST", "width": 60}, raimund@636: {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100}, raimund@636: {"dataIndex": "hauptprobenNr", "header": "Proben-Nr", "width": 100}, raimund@636: {"dataIndex": "gemId", "header": "Gem-ID", "width": 100}, raimund@636: {"dataIndex": "bezeichnung", "header": "Gemeinde", "flex": 1} raimund@636: ], raimund@636: "filters": [ raimund@636: ] raimund@636: }, mstanko@739: { "id": "6", raimund@636: "name": "Proben pro Land und UMW (Multiselect)", raimund@636: "description": "Abfrage aller Proben gefiltert pro Land und Umweltbereich (mit Mehrfachauswahl)", raimund@636: "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)", raimund@636: "result": [ raimund@636: {"dataIndex": "probeId", "header": "ProbeId", "width": 100}, raimund@636: {"dataIndex": "netzbetreiberId", "header": "Land", "width": 50}, raimund@636: {"dataIndex": "mstId", "header": "MST", "width": 50}, raimund@636: {"dataIndex": "entnahmeVon", "header": "Entnahme von", "width": 120}, raimund@636: {"dataIndex": "entnahmeBis", "header": "Entnahme bis", "width": 120}, raimund@636: {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100}, raimund@636: {"dataIndex": "hauptprobenNr", "header": "Proben-Nr", "width": 100}, raimund@636: {"dataIndex": "ortsTyp", "header": "Ortstyp", "width": 50}, raimund@636: {"dataIndex": "genId", "header": "Gemeinde-ID", "width": 100}, raimund@636: {"dataIndex": "bezeichnung", "header": "Gemeinde", "flex": 1} raimund@636: ], raimund@636: "filters": [ raimund@636: {"dataIndex": "netz", "type": "listnetz", "label": "Land"}, raimund@636: {"dataIndex": "umw_id", "type": "listumw", "label": "Umweltbereich", "multiselect":true} raimund@636: ] raimund@636: } raimund@636: ]