Mercurial > dive4elements > river
comparison artifacts/doc/conf/meta-data.xml @ 6849:863a67e10c0c
(issue1391) Filter by reference_gauge or by KM
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Fri, 16 Aug 2013 09:39:27 +0200 |
parents | 8e5adc56385c |
children | 4937dab5ff7a |
comparison
equal
deleted
inserted
replaced
6848:9351bc4852a8 | 6849:863a67e10c0c |
---|---|
485 </dc:filter> | 485 </dc:filter> |
486 </dc:macro> | 486 </dc:macro> |
487 | 487 |
488 | 488 |
489 <dc:macro name="historical_discharge_curve"> | 489 <dc:macro name="historical_discharge_curve"> |
490 <dc:variable name="refgauge" type="number" expr="$reference_gauge"/> | |
490 <dc:context> | 491 <dc:context> |
491 <dc:statement> | 492 <dc:statement> |
492 SELECT g.id AS gauge_id, | 493 SELECT g.id AS gauge_id, |
493 g.name AS gauge_name, | 494 g.name AS gauge_name, |
494 dt.id AS dt_id, | 495 dt.id AS dt_id, |
495 t.start_time AS start_time, | 496 t.start_time AS start_time, |
496 t.stop_time AS stop_time, | 497 t.stop_time AS stop_time, |
497 dt.description AS desc, | 498 dt.description AS desc, |
498 dt.bfg_id AS bfg_id | 499 dt.bfg_id AS bfg_id |
499 FROM gauges g | 500 FROM gauges g |
500 JOIN discharge_tables dt ON g.id = dt.gauge_id | 501 JOIN discharge_tables dt ON g.id = dt.gauge_id |
501 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id | 502 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id |
502 WHERE g.river_id = ${river_id} | 503 WHERE g.river_id = ${river_id} |
503 AND dt.kind <> 0 | 504 AND dt.kind <> 0 |
504 AND g.station = ${fromkm} | 505 AND ((g.station = ${fromkm} AND g.station = ${tokm}) |
505 AND g.station = ${tokm} | 506 OR g.official_number = ${refgauge}) |
506 ORDER BY start_time | 507 ORDER BY start_time |
507 </dc:statement> | 508 </dc:statement> |
508 <dc:if test="dc:has-result()"> | 509 <dc:if test="dc:has-result()"> |
509 <historical_discharge_curves> | 510 <historical_discharge_curves> |
510 <dc:group expr="$gauge_name"> | 511 <dc:group expr="$gauge_name"> |
1334 FROM gauges g | 1335 FROM gauges g |
1335 JOIN discharge_tables dt ON g.id = dt.gauge_id | 1336 JOIN discharge_tables dt ON g.id = dt.gauge_id |
1336 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id | 1337 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id |
1337 WHERE g.river_id = ${river_id} | 1338 WHERE g.river_id = ${river_id} |
1338 AND dt.kind = 0 | 1339 AND dt.kind = 0 |
1339 AND g.station = ${fromkm} | 1340 AND ((g.station = ${fromkm} AND g.station = ${tokm}) |
1340 AND g.station = ${tokm} | 1341 OR g.official_number = ${refgauge}) |
1341 </dc:statement> | 1342 </dc:statement> |
1342 <dc:if test="dc:has-result()"> | 1343 <dc:if test="dc:has-result()"> |
1343 <current_gauge> | 1344 <current_gauge> |
1344 <dc:for-each> | 1345 <dc:for-each> |
1345 <gauge name="{$gauge_name} ({dc:date-format('dd.MM.yyyy', $start_time)})" | 1346 <gauge name="{$gauge_name} ({dc:date-format('dd.MM.yyyy', $start_time)})" |