[Lada-commits] [PATCH] New querconfig with custom queries created by Mr. Stanko from BfS

Wald Commits scm-commit at wald.intevation.org
Mon Sep 23 14:49:34 CEST 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1379940479 -7200
# Node ID 9c3b3d34b260ef7e8fe0392b91a3263fe47b88c2
# Parent  8e335385ef95075ef87933b4ef007b50d732a081
New querconfig with custom queries created by Mr. Stanko from BfS.

diff -r 8e335385ef95 -r 9c3b3d34b260 queryconf.json
--- a/queryconf.json	Thu Sep 12 12:34:48 2013 +0200
+++ b/queryconf.json	Mon Sep 23 14:47:59 2013 +0200
@@ -1,5 +1,5 @@
-[{
-    "id": 1,
+[
+{   "id": 1,
     "name": "Kein Filter",
     "description": "Abfrage der Proben ohne Filter",
     "sql": "select probe_id, mst_id, umw_id from l_probe",
@@ -10,8 +10,8 @@
     ],
     "filters": [
     ]
-}, {
-    "id": 2,
+},
+{   "id": 2,
     "name": "MST und UMW",
     "description": "Abfrage der Proben gefiltert nach Messtellen ID und ID des Umweltbereichs",
     "sql": "select probe_id, mst_id, umw_id from l_probe where (mst_id = :mst_id OR '' = :mst_id) and (umw_id = :umw_id OR '' = :umw_id)",
@@ -24,17 +24,71 @@
         {"dataIndex": "mst_id", "type": "listmst", "label": "Messstelle"},
         {"dataIndex": "umw_id", "type": "listumw", "label": "Umweltbereich"}
     ]
-}, {
-    "id": 3,
-    "name": "3. Abfrage",
+},
+{   "id": 3,
+    "name": "Proben pro Land",
     "description": "Detailiertere Beschreibung der Abfrage",
-    "sql": "select probe_id, mst_id, umw_id from l_probe where (mst_id = :mst_id OR '' = :mst_id)",
+    "sql": "select probe_id, netzbetreiber_id, mst_id, umw_id, hauptproben_nr from l_probe where (netzbetreiber_id = :netz OR '' = :netz)",
+    "result": [
+        {"dataIndex": "probeId", "header": "ProbeId", "flex": 1},
+        {"dataIndex": "netzbetreiberId", "header": "Land", "width": 100},
+        {"dataIndex": "mstId", "header": "MST", "width": 100},
+        {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100},
+        {"dataIndex": "hauptprobenNr", "header": "Proben-Nr", "width": 100}
+    ],
+    "filters": [
+        {"dataIndex": "netz", "type": "listnetz", "label": "Land"}
+    ]
+},
+{   "id": 4,
+    "name": "alle Proben mit Ort",
+    "description": "alle Proben mit Entnahmeort",
+    "sql": "select lp.probe_id, lp.netzbetreiber_id, lp.mst_id, lp.umw_id, lp.hauptproben_nr, ort.gem_id, s_verwaltungseinheit.bezeichnung from l_probe left outer join l_ort on (lp.probe_id = l_ort.probe_id) 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'",
+    "result": [
+        {"dataIndex": "probeId", "header": "ProbeId", "flex": 1},
+        {"dataIndex": "netzbetreiberId", "header": "Land", "width": 100},
+        {"dataIndex": "mstId", "header": "MST", "width": 100},
+        {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100},
+        {"dataIndex": "hauptprobenNr", "header": "Proben-Nr", "width": 100},
+        {"dataIndex": "gemId", "header": "Gem-ID", "width": 100},
+        {"dataIndex": "bezeichnung", "header": "Gemeinde", "width": 100}
+    ],
+    "filters": [
+    ]
+},
+{   "id": 5,
+    "name": "MST und mehrfach UMW",
+    "description": "Abfrage der Proben gefiltert nach MST ID und nach UMW_ID mit Mehrfachauswahl",
+    "sql": "select probe_id, mst_id, umw_id from l_probe where (mst_id = :mst_id OR '' = :mst_id) and (umw_id similar to (:umw_id) OR '' = :umw_id)",
     "result": [
         {"dataIndex": "probeId", "header": "ProbeId", "flex": 1},
         {"dataIndex": "mstId", "header": "MST", "width": 100},
         {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100}
     ],
     "filters": [
-        {"dataIndex": "mst_id", "type": "listmst", "label": "Messstelle"}
+        {"dataIndex": "mst_id", "type": "listmst", "label": "Messstelle"},
+        {"dataIndex": "umw_id", "type": "listumw", "label": "Umweltbereich", "multiselect":true}
     ]
-}]
+},
+{   "id": 6,
+    "name": "Proben pro Land",
+    "description": "Abfrage aller Proben über V_PROBE (View)",
+    "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 l_probe left outer join l_ort on (lp.probe_id = l_ort.probe_id) 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' and lp.netzbetreiber_id = :netz and (umw_id similar to (:umw_id) OR '' = :umw_id)",
+    "result": [
+        {"dataIndex": "probeId", "header": "ProbeId", "flex": 1},
+        {"dataIndex": "netzbetreiberId", "header": "Land", "width": 100},
+        {"dataIndex": "mstId", "header": "MST", "width": 100},
+        {"dataIndex": "entnahmeVon", "header": "Entnahme von", "width": 100},
+        {"dataIndex": "entnahmeBis", "header": "Entnahme bis", "width": 100},
+        {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100},
+        {"dataIndex": "hauptprobenNr", "header": "Proben-Nr", "width": 100},
+        {"dataIndex": "ortsTyp", "header": "Ortstyp", "width": 50},
+        {"dataIndex": "genId", "header": "Gemeinde-ID", "width": 100},
+        {"dataIndex": "bezeichnung", "header": "Gemeinde", "width": 100}
+    ],
+    "filters": [
+        {"dataIndex": "netz", "type": "listnetz", "label": "Land"},
+        {"dataIndex": "umw_id", "type": "listumw", "label": "Umweltbereich", "multiselect":true}
+    ]
+}
+]


More information about the Lada-commits mailing list