From 9190b2353c7c9bc43b67b1c70a66162417bb1822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rainer=20G=C3=BCmpelein?= Date: Wed, 2 Mar 2022 11:02:43 +0100 Subject: [PATCH] statistik without service tour user --- copri4/main/src/Mod/APIfunc.pm | 6 ------ copri4/main/src/Mod/DBtank.pm | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/copri4/main/src/Mod/APIfunc.pm b/copri4/main/src/Mod/APIfunc.pm index 0544fab..a435f4b 100755 --- a/copri4/main/src/Mod/APIfunc.pm +++ b/copri4/main/src/Mod/APIfunc.pm @@ -1582,17 +1582,12 @@ sub bikes_all(){ my $stations = ""; if(ref($stations_allraw) eq "HASH" && scalar(@{$user_tour} >= 1)){ foreach my $id (sort { $stations_allraw->{$a}->{int04} <=> $stations_allraw->{$b}->{int04} } keys (%$stations_allraw)){ - #push(@stations_service_tour, $stations_allraw->{$id}->{int04}) if($stations_allraw->{$id}->{int04} > 0); push(@stations_service_tour, $stations_allraw->{$id}->{int04}) if(looks_like_number($stations_allraw->{$id}->{int04})); } $stations = join(",",@stations_service_tour); $stations =~ s/[a-z_]+//ig; $pref->{int04} = "IN::($stations)" if($stations || $stations eq "0"); } - #bikes_all only if authenticated - #}else{ - # $bw->log("sub bikes_all",$pref,""); - # $record = $dbt->fetch_record($dbh,$pref) if(ref($bike_group) eq "ARRAY" && @{$bike_group}[0]); } $bw->log("sub bikes_all with user_tour ($station_id) @stations_service_tour",$pref,""); @@ -1620,7 +1615,6 @@ sub bikes_all(){ $return->{$id}->{Ilockit_GUID} = "$record->{$id}->{txt17}"; $return->{$id}->{Ilockit_ID} = "$record->{$id}->{txt18}"; $return->{$id}->{bike_group} = ["$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{main_id}"]; - #if($users_serviceapp->{int09}){ #shareetool if($q->param('authcookie') && $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{id} && $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{id} == 187 && scalar(@{$user_tour} >= 1)){ my @service_code = split(/\s/,$record->{$id}->{txt23}); diff --git a/copri4/main/src/Mod/DBtank.pm b/copri4/main/src/Mod/DBtank.pm index a2f17be..f3d21a8 100755 --- a/copri4/main/src/Mod/DBtank.pm +++ b/copri4/main/src/Mod/DBtank.pm @@ -727,7 +727,11 @@ sub fetch_tablerecord(){ if($key =~ /ct_name/ && $value =~ /CAST/){#CAST(c_id AS text) $where .= " and $key $op $value"; }elsif($key =~ /^(ct_name$|txt\d+|uri\d+|state)$/ && $value){ + if($value eq "null"){ + $where .= " and $key $op $value"; + }else{ $where .= " and $key $op '$value'"; + } }elsif($key =~ /_itime$/ && $value){ $where .= " and itime $op '$value'"; }elsif($key =~ /start_mtime|end_mtime/ && $value){