[PATCH] We only want to use stations with an end km

Wald Commits scm-commit at wald.intevation.org
Wed Oct 15 19:35:47 CEST 2014


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1413394535 -7200
# Node ID 665c8326b1a63b90901695dc52f326710f242e39
# Parent  17db0857063745cdbb76163c45655ccb9e4474c3
We only want to use stations with an end km.

diff -r 17db08570637 -r 665c8326b1a6 artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFactory.java
--- 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";
 


More information about the Dive4Elements-commits mailing list