mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 23:26:29 +02:00
adding REN and SX operators
This commit is contained in:
parent
709521c892
commit
30bb566d5e
8 changed files with 45 additions and 29 deletions
|
@ -550,7 +550,7 @@ sub service_update(){
|
|||
};
|
||||
my $record_pos = $dbt->fetch_tablerecord($dbh,$pref_pos) if($c_id);
|
||||
if($record_pos->{txt01} ne "NaN"){
|
||||
$update->{$key} = $q->escapeHTML($q->param('work_val')) . " " . $record_pos->{txt01};
|
||||
$update->{$key} = $q->escapeHTML($q->param('work_val')) . " " . $record_pos->{txt01} if($record_pos->{txt01} !~ /::erledigt::/);
|
||||
}else{
|
||||
$update->{$key} = $q->escapeHTML($q->param('work_val'));
|
||||
}
|
||||
|
@ -779,6 +779,7 @@ sub booking_update(){
|
|||
my $owner = shift || 0;
|
||||
my $state = $q->escapeHTML($q->param('state')) || "";
|
||||
my $lock_state = $q->escapeHTML($q->param('lock_state')) || "";
|
||||
my $station_state = $q->escapeHTML($q->param('station_state')) || "";
|
||||
my %varenv = $cf->envonline();
|
||||
my $rows = 0;
|
||||
my $user_agent = $q->user_agent();
|
||||
|
@ -801,6 +802,7 @@ sub booking_update(){
|
|||
bike => "$bike",
|
||||
state => "",
|
||||
lock_state => "",
|
||||
station_state => "",
|
||||
co2saving => "",
|
||||
response_state => "OK 1017: No update",
|
||||
response_text => "Es wurden keine Daten aktualisiert",
|
||||
|
@ -960,7 +962,9 @@ sub booking_update(){
|
|||
|
||||
$geo_distance = $lb->geo_fencing($latitude,$longitude,$latitude_station,$longitude_station);
|
||||
#$station_next = $stations_raw->{$id}->{int04};
|
||||
if($geo_distance <= $stations_raw->{$id}->{int06}){
|
||||
#if($geo_distance <= $stations_raw->{$id}->{int06}){
|
||||
#sigo development workaround without geofence
|
||||
if(($geo_distance <= $stations_raw->{$id}->{int06}) || ($record_pos->{int11} == 3)){
|
||||
$geo_distance_next = $geo_distance;
|
||||
#end-Station
|
||||
$update_pos->{int04} = "$stations_raw->{$id}->{int04}";
|
||||
|
@ -1169,12 +1173,13 @@ sub booking_update(){
|
|||
$booking_values->{response_text} = "Abschließen von Fahrrad Nr. " . $q->param('bike') . " bestätigt";
|
||||
}
|
||||
}elsif($lock_state eq "unlocked"){
|
||||
#int11=system >= 3 (sigo) with station_lock
|
||||
#int30=Station Id
|
||||
#int31=Slot Id
|
||||
#int27=velofactur bike Id
|
||||
if($record_cc->{int30} && $record_cc->{int31} && $record_cc->{int27}){
|
||||
$bw->log("unlock velofactur station lock with: '$record_cc->{int30}' '$record_cc->{int31}' '$record_cc->{int27}' 'Freigeben' '$record_pos->{c_id}'","","");
|
||||
system(`$varenv{basedir}/src/scripts/velofaktur_client.pl $varenv{syshost} post_velo "$record_cc->{int30}" "$record_cc->{int31}" "$record_cc->{int27}" "Freigeben" "$record_pos->{c_id}"`);
|
||||
if($record_cc->{int11} && $record_cc->{int11} >=3 && $record_cc->{int30} && $record_cc->{int31} && $record_cc->{int27}){
|
||||
$bw->log("unlock station lock with: '$record_cc->{int30}' '$record_cc->{int31}' '$record_cc->{int27}' 'Freigeben' '$record_pos->{c_id}'","","");
|
||||
#system(`$varenv{basedir}/src/scripts/velofaktur_client.pl $varenv{syshost} post_velo "$record_cc->{int30}" "$record_cc->{int31}" "$record_cc->{int27}" "Freigeben" "$record_pos->{c_id}"`);
|
||||
}
|
||||
$lock_value = 2;
|
||||
$update_cc->{int20} = "$lock_value";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue