mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 23:26:29 +02:00
sig contributor restriction
This commit is contained in:
parent
4cec179664
commit
1e81d08904
4 changed files with 23 additions and 8 deletions
|
@ -154,6 +154,7 @@ sub sig_available {
|
|||
$return2copri->{$station}->{txt01} = "$response_out->{$station}->{description}";
|
||||
$return2copri->{$station}->{txt06} = "$response_out->{$station}->{gps}->{latitude},$response_out->{$station}->{gps}->{longitude}";
|
||||
$return2copri->{$station}->{txt24} = "300102";#node.main_id
|
||||
$return2copri->{$station}->{txt24} = "300001" if($response_out->{$station}->{description} =~ /sigo GmbH/i);#Contributor flot
|
||||
$return2copri->{$station}->{txt25} = "300101";#node_type_id
|
||||
while (my ($key, $value) = each %{ $dbt->{copri_conf}->{station_state} }) {
|
||||
if($response_out->{$station}->{state} eq $value){
|
||||
|
@ -162,7 +163,19 @@ sub sig_available {
|
|||
}
|
||||
#print FILE "response_out:" . Dumper($response_out->{$station}) . "\n";
|
||||
#print FILE "return2copri:" . Dumper($return2copri->{$station}) . "\n";
|
||||
delete $response_out->{$station} if(uc($resp->{site}->{status}) !~ /ACTIVE|PRIVATE/i || !$resp->{site}->{lat} || !$resp->{site}->{lon});
|
||||
|
||||
my $user_station_available = 0;
|
||||
foreach my $main_id (@{$bike_node}){
|
||||
if($main_id =~ /(\d+)/){
|
||||
my $node_id = $1;
|
||||
$user_station_available = 1 if($node_id == $return2copri->{$station}->{txt24});
|
||||
}
|
||||
}
|
||||
|
||||
if(!$user_station_available || uc($resp->{site}->{status}) !~ /ACTIVE|PRIVATE/i || !$resp->{site}->{lat} || !$resp->{site}->{lon}){
|
||||
delete $response_out->{$station};
|
||||
}
|
||||
|
||||
}
|
||||
}#end stations_available
|
||||
|
||||
|
@ -268,6 +281,8 @@ sub sig_available {
|
|||
}
|
||||
}
|
||||
#just like caching
|
||||
$return2copri->{$bike}->{main_id} = "300102";
|
||||
$return2copri->{$bike}->{main_id} = "300001" if($bike_id == 1001 || $bike_id == 84);#Contributor bikes
|
||||
$return2copri->{$bike}->{int11} = 3;#system
|
||||
$return2copri->{$bike}->{int25} = 1;#tracking on
|
||||
$return2copri->{$bike}->{barcode} = $bike_id;
|
||||
|
|
|
@ -833,7 +833,7 @@ sub sigbike_cupdate {
|
|||
%{$record_sig->{$bid}},
|
||||
table => "content",
|
||||
template_id => "205",
|
||||
main_id => "300102",
|
||||
#main_id => "300102",#set by APIsigclient
|
||||
mtime => "now()",
|
||||
owner => "169",
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue