Mercurial > gemma
changeset 4110:861760675497 request_hist_bns
Merged default
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Tue, 30 Jul 2019 11:30:31 +0200 |
parents | 3d2f02c16765 (diff) 6ee5523967ec (current diff) |
children | 692aba3e8b85 |
files | pkg/imports/bn.go |
diffstat | 2 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/pkg/imports/bn.go Mon Jul 29 16:53:15 2019 +0200 +++ b/pkg/imports/bn.go Tue Jul 30 11:30:31 2019 +0200 @@ -24,6 +24,7 @@ "strings" "time" + "gemma.intevation.de/gemma/pkg/common" "gemma.intevation.de/gemma/pkg/pgxutils" "gemma.intevation.de/gemma/pkg/soap/ifbn" "github.com/jackc/pgx/pgtype" @@ -287,7 +288,9 @@ fetch := func() ([]*ifbn.BottleNeckType, error) { client := ifbn.NewIBottleneckService(bn.URL, bn.Insecure, nil) - req := &ifbn.Export_bn_by_isrs{} + req := &ifbn.Export_bn_by_isrs{ + Period: &ifbn.RequestedPeriod{Date_start: &time.Time{}}, + } resp, err := client.Export_bn_by_isrs(req) if err != nil { @@ -438,8 +441,13 @@ if t, ok := fromTo[toKey]; ok { tto.Set(t) uBound = pgtype.Exclusive + feedback.Info("Valid from %s to %s", + fromTo[fromKey].Format(common.TimeFormat), + fromTo[toKey].Format(common.TimeFormat)) } else { uBound = pgtype.Unbounded + feedback.Info("Valid from %s", + fromTo[fromKey].Format(common.TimeFormat)) } }
--- a/pkg/soap/ifbn/service.go Mon Jul 29 16:53:15 2019 +0200 +++ b/pkg/soap/ifbn/service.go Tue Jul 30 11:30:31 2019 +0200 @@ -36,7 +36,6 @@ } type Export_bn_by_isrs struct { - //XMLName xml.Name `xml:"http://www.ris.eu/bottleneck/3.0 export_bn_by_isrs"` XMLName xml.Name `xml:"http://www.ris.eu/bottleneck/3.0 export_bn_by_isrs"` ISRS *ArrayOfISRSPair `xml:"ISRS,omitempty"` @@ -826,13 +825,11 @@ } type RequestedPeriod struct { - //XMLName xml.Name `xml:"http://www.ris.eu/wamos/common/3.0 RequestedPeriod"` - - Date_start time.Time `xml:"Date_start,omitempty"` + Date_start *time.Time `xml:"http://www.ris.eu/wamos/common/3.0 Date_start,omitempty"` - Date_end time.Time `xml:"Date_end,omitempty"` + Date_end *time.Time `xml:"http://www.ris.eu/wamos/common/3.0 Date_end,omitempty"` - Value_interval int32 `xml:"Value_interval,omitempty"` + Value_interval *int32 `xml:"http://www.ris.eu/wamos/common/3.0 Value_interval,omitempty"` } type ArrayOfString struct {