changeset 8413:665c8326b1a6

We only want to use stations with an end km.
author Tom Gottfried <tom@intevation.de>
date Wed, 15 Oct 2014 19:35:35 +0200
parents 17db08570637
children 8e1c9ce1c7c6
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFactory.java
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFactory.java	Wed Oct 15 19:20:26 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFactory.java	Wed Oct 15 19:35:35 2014 +0200
@@ -56,10 +56,7 @@
           "slv.value AS slv_value, " +
           "gf.name AS gf_name, " +
           "ms.id AS ms_id, " +
-          "CASE WHEN r.km_up = 1 AND rs.b IS NOT NULL " +
-              "THEN rs.b " +
-              "ELSE rs.a " +
-          "END AS ms_station, " +
+          "CASE WHEN r.km_up = 1 THEN rs.b ELSE rs.a END AS ms_station, " +
           "ms.measurement_type AS ms_type " +
         "FROM load_at_river sl " +
           "CROSS JOIN measurement_station ms " +
@@ -78,6 +75,7 @@
           "OR " +
           "(ms.measurement_type='Schwebstoff' AND gf.name IN " +
              "('suspended_sediment', 'suspended_load', 'total'))) " +
+        "AND rs.b IS NOT NULL " +
         "AND r.name = :river " +
         "ORDER BY sl.id";
 

http://dive4elements.wald.intevation.org