diff --git a/copri4/main/src/Mod/APIsigclient.pm b/copri4/main/src/Mod/APIsigclient.pm index 4991033..6d35587 100755 --- a/copri4/main/src/Mod/APIsigclient.pm +++ b/copri4/main/src/Mod/APIsigclient.pm @@ -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; diff --git a/copri4/main/src/Mod/Shareework.pm b/copri4/main/src/Mod/Shareework.pm index 4ab8147..b1bcd1c 100755 --- a/copri4/main/src/Mod/Shareework.pm +++ b/copri4/main/src/Mod/Shareework.pm @@ -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", }; diff --git a/copri4/main/src/Tpl/Liste3.pm b/copri4/main/src/Tpl/Liste3.pm index d13f487..4a684b7 100755 --- a/copri4/main/src/Tpl/Liste3.pm +++ b/copri4/main/src/Tpl/Liste3.pm @@ -978,15 +978,15 @@ sub tpl(){ }elsif($key =~ /txt01/ && $table =~ /contenttrans|contenttver/){ print $q->td({-class=>'tdtxt',-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?ct_trans=open\&mode=manager\&c_id4trans=$ct4rel->{$id}->{c_id}\&tpl_id4trans=$ct4rel->{$id}->{template_id}\&kind_of_trans=$node_meta->{node_name}\&owner=$users_dms->{u_id}\&offset=$offset\&limit=$limit",-title=>"Terminal öffnen"},"$ct4rel->{$id}->{$key}")),"\n"; - }elsif($key =~ /txt01/ && $table =~ /content$|contentadr/ && $lock_system != 3){ + }elsif($key =~ /txt01/ && $table =~ /content$|contentadr/){# && $lock_system != 3){ my $txt01 = "---"; $txt01 = "$ct4rel->{$id}->{$key}" if($ct4rel->{$id}->{$key}); print $q->td({-class=>'tdtxt',-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?node2edit=editpart\&mode=manager\&rel_id=$ct4rel->{$id}->{rel_id}\&offset=$offset\&limit=$limit",-title=>"Terminal öffnen"},"$txt01")),"\n"; - }elsif($key =~ /barcode/ && $table =~ /content$|contentadr/ && $ct4rel->{$id}->{template_id} != 225 && $lock_system != 3){ + }elsif($key =~ /barcode/ && $table =~ /content$|contentadr/ && $ct4rel->{$id}->{template_id} != 225){# && $lock_system != 3){ print $q->td({-class=>'tdint',-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?node2edit=editpart\&mode=manager\&rel_id=$ct4rel->{$id}->{rel_id}\&offset=$offset\&limit=$limit",-title=>"Terminal öffnen"},"$ct4rel->{$id}->{$key}")),"\n"; - }elsif($key =~ /int04/ && $table eq "content" && $ct4rel->{$id}->{template_id} == 225 && $lock_system != 3){ + }elsif($key =~ /int04/ && $table eq "content" && $ct4rel->{$id}->{template_id} == 225){# && $lock_system != 3){ print $q->td({-class=>'tdint',-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?node2edit=editpart\&mode=manager\&rel_id=$ct4rel->{$id}->{rel_id}\&offset=$offset\&limit=$limit",-title=>"Terminal öffnen"},"$ct4rel->{$id}->{$key}")),"\n"; - }elsif($key =~ /int04/ && $table eq "content" && $ct4rel->{$id}->{template_id} == 205 && $lock_system != 3){ + }elsif($key =~ /int04/ && $table eq "content" && $ct4rel->{$id}->{template_id} == 205){# && $lock_system != 3){ print $q->td({-class=>'tdint',-style=>"font-weight:normal;"},$q->a({-class=>"linknav3",-style=>"",-href=>"?detail_search=1&s_int04=$ct4rel->{$id}->{$key}",-title=>"Rad Warenstamm nach Station filtern"},"$ct4rel->{$id}->{$key}")); }elsif($key =~ /date_time/){ $ct4rel->{$id}->{start_time} = $lb->time4de($ct4rel->{$id}->{start_time},"1") if($ct4rel->{$id}->{start_time}); diff --git a/copri4/shareeapp-operator/src/Lib/Mlogic.pm b/copri4/shareeapp-operator/src/Lib/Mlogic.pm index 7f68f2f..22405d9 100755 --- a/copri4/shareeapp-operator/src/Lib/Mlogic.pm +++ b/copri4/shareeapp-operator/src/Lib/Mlogic.pm @@ -43,11 +43,11 @@ sub tpl(){ my $coo = $q->cookie('domcookie') || $q->param('sessionid') || ""; #my $api_test = "sharee_fr01"; my $bike="FR1538"; - my $api_test = "sharee_fr01"; my $bike="FR1005";#E-Lastenrad (bike_group=300101, bike_node=300102) + #my $api_test = "sharee_fr01"; my $bike="FR1005";#E-Lastenrad (bike_group=300101, bike_node=300102) #my $api_test = "sharee_fr01"; my $bike="FR4781";#Tracking and BVB test #my $api_test = "sharee_kn"; my $bike="KN1011"; #my $api_test = "sharee_wue"; my $bike="WUE5525"; - #my $api_test = "sharee_sx"; my $bike="S3X1001"; + my $api_test = "sharee_sx"; my $bike="S3X1001"; #my $api_test = "sharee_ren"; my $bike="REN2"; print $q->div({-style=>'float:right;text-align:right;height:25px;padding:6px 15px;background-color:white'},$q->a({-style=>"background-color:#ffffff;color:#$bgcolor1;", -href=>"$varenv->{metahost}/src/scripts/tests/index.pl?sessionid=$coo\&api_test=$api_test\&bike=$bike", -target=>'_blank'}," [ tests --> $api_test ] "),"$users_sharee->{txt08}",$q->a({-style=>"color:#$bgcolor1;", -href=>"logout_sharee$session"},"logout")),"\n";