mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 23:26:29 +02:00
sigo lock_state unlocking
This commit is contained in:
parent
c40f326d37
commit
5870071d1b
6 changed files with 26 additions and 7 deletions
|
@ -1086,7 +1086,7 @@ sub booking_update(){
|
|||
}#end if $state =~ /canceled|occupied|available/
|
||||
|
||||
|
||||
if($lock_state && $lock_state =~ /locking|locked|unlocked/ && $record_pos->{cc_id} && $record_pos->{cc_id} > 0){
|
||||
if($lock_state && $lock_state =~ /locking|locked|unlocking|unlocked/ && $record_pos->{cc_id} && $record_pos->{cc_id} > 0){
|
||||
#content
|
||||
my $update_cc = {
|
||||
table => "content",
|
||||
|
@ -1186,7 +1186,6 @@ sub booking_update(){
|
|||
$lock_value = 2;
|
||||
$update_cc->{int20} = "$lock_value";
|
||||
$update_pos->{int20} = "$lock_value";
|
||||
$update_pos->{int23} = "$geo_distance";
|
||||
if($state){
|
||||
$booking_values->{response_state} .= " OK: bike " . $q->param('bike') . " unlocked confirmed";
|
||||
$booking_values->{response_text} .= " Aufschließen von Fahrrad Nr. " . $q->param('bike') . " bestätigt";
|
||||
|
@ -1211,7 +1210,17 @@ sub booking_update(){
|
|||
system("$varenv{basedir}/src/scripts/sms_message.pl $varenv{syshost} locking_progress $auth->{txt07} $record_pos->{c_id} &");
|
||||
}
|
||||
$update_pos->{int32} = $record_pos->{int32} + 1;#sms_message sent marker
|
||||
|
||||
}elsif($lock_state eq "unlocking"){
|
||||
$lock_value = 4;
|
||||
$update_cc->{int20} = "$lock_value";
|
||||
$update_pos->{int20} = "$lock_value";
|
||||
if($state){
|
||||
$booking_values->{response_state} .= " OK: bike " . $q->param('bike') . " unlocking in progress";
|
||||
$booking_values->{response_text} .= " Aufschließen von Fahrrad Nr. " . $q->param('bike') . " ist im Prozess.";
|
||||
}else{
|
||||
$booking_values->{response_state} = "OK: bike " . $q->param('bike') . " unlocking in progress";
|
||||
$booking_values->{response_text} = "Aufschließen von Fahrrad Nr. " . $q->param('bike') . " ist im Prozess.";
|
||||
}
|
||||
}
|
||||
|
||||
$dbt->update_record($dbh,$update_pos,$record_pos);
|
||||
|
@ -1234,6 +1243,7 @@ sub booking_update(){
|
|||
$booking_values->{lock_state} = "locked" if($booking->{int20} == 1);
|
||||
$booking_values->{lock_state} = "unlocked" if($booking->{int20} == 2);
|
||||
$booking_values->{lock_state} = "locking" if($booking->{int20} == 3);
|
||||
$booking_values->{lock_state} = "unlocking" if($booking->{int20} == 4);
|
||||
|
||||
#fetch tracking distance on Ilockit cloud by summary trip if(tracking && deviceId && available)
|
||||
if($booking->{int25} == 1 && $booking->{int10} == 1){
|
||||
|
@ -1475,6 +1485,7 @@ sub bikes_available(){
|
|||
$return->{$id}->{lock_state} = "locked" if($record->{$id}->{int20} == 1);
|
||||
$return->{$id}->{lock_state} = "unlocked" if($record->{$id}->{int20} == 2);
|
||||
$return->{$id}->{lock_state} = "locking" if($record->{$id}->{int20} == 3);
|
||||
$return->{$id}->{lock_state} = "unlocking" if($record->{$id}->{int20} == 4);
|
||||
$return->{$id}->{bike_group} = ["$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{main_id}"];
|
||||
|
||||
if($record->{$id}->{int11} eq "2"){
|
||||
|
@ -1585,6 +1596,7 @@ sub bikes_all(){
|
|||
$return->{$id}->{lock_state} = "locked" if($record->{$id}->{int20} == 1);
|
||||
$return->{$id}->{lock_state} = "unlocked" if($record->{$id}->{int20} == 2);
|
||||
$return->{$id}->{lock_state} = "locking" if($record->{$id}->{int20} == 3);
|
||||
$return->{$id}->{lock_state} = "unlocking" if($record->{$id}->{int20} == 4);
|
||||
$return->{$id}->{bike_group} = ["$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{main_id}"];
|
||||
|
||||
if($record->{$id}->{int11} eq "2"){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue