mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-07-17 02:07:26 +02:00
change site parameter
This commit is contained in:
parent
38a72a3eed
commit
7ce6cb6230
10 changed files with 47 additions and 46 deletions
|
@ -387,7 +387,7 @@ sub get_positions {
|
|||
|
||||
my $theftmove_count = 0;
|
||||
foreach my $resp (sort { $a->{id} <=> $b->{id} } (@{ $response_in })) {
|
||||
print FILE "$resp->{id} shareeTime: $today | serverTime: $resp->{serverTime} | ilockit get_positions movement: $theft_record_detect->{barcode} | $record_cc->{$id}->{int13} eq $resp->{deviceId} && $resp->{speed} > 0 && $resp->{attributes}->{distance})\n";
|
||||
print FILE "$resp->{id} shareeTime: $today | serverTime: $resp->{serverTime} | ilockit get_positions movement: $theft_record_detect->{barcode} | $record_cc->{$id}->{int13} eq $resp->{deviceId} && speed:$resp->{speed} && distance:$resp->{attributes}->{distance})\n";
|
||||
#if($record_cc->{$id}->{int13} eq $resp->{deviceId} && $resp->{speed} > 0 && $resp->{attributes}->{distance} >= 200){
|
||||
if($record_cc->{$id}->{int13} eq $resp->{deviceId}){
|
||||
$theftmove_count++;#count if move holds on for min 2 times
|
||||
|
@ -422,12 +422,13 @@ sub get_positions {
|
|||
my $c_id = 0;
|
||||
$c_id = $dbt->insert_contentoid($dbh,$insert);
|
||||
print FILE "insert sub get_positions:" . Dumper($insert);
|
||||
print FILE "send_alarm2hotline condition: syshost:$op_name->{syshost}, c_id:$c_id && $theftmove_count > $dbt->{copri_conf}->{theftalarm}->{move_count} && ($resp->{speed} > $dbt->{copri_conf}->{theftalarm}->{speed} || $resp->{attributes}->{distance} > $dbt->{copri_conf}->{theftalarm}->{meter})\n";
|
||||
|
||||
#theft mailing
|
||||
if($c_id && $theftmove_count > $dbt->{copri_conf}->{theftalarm}->{move_count} && ($resp->{speed} > $dbt->{copri_conf}->{theftalarm}->{speed} || $resp->{attributes}->{distance} > $dbt->{copri_conf}->{theftalarm}->{meter})){
|
||||
#send mail
|
||||
system("$dbt->{copri_conf}->{basedir}/src/scripts/mailTransportcms.pl '$op_name->{syshost}' 'send_alarm2hotline' '1' '$c_id' ''");
|
||||
print FILE "send_alarm2hotline, condition: c_id:$c_id && $theftmove_count > $dbt->{copri_conf}->{theftalarm}->{move_count} && ($resp->{speed} > $dbt->{copri_conf}->{theftalarm}->{speed} || $resp->{attributes}->{distance} > $dbt->{copri_conf}->{theftalarm}->{meter})\n";
|
||||
system("$dbt->{copri_conf}->{basedir}/$op_name->{syshost}/src/scripts/mailTransportcms.pl '$op_name->{syshost}' 'send_alarm2hotline' '1' '$c_id' ''");
|
||||
print FILE "$dbt->{copri_conf}->{basedir}/$op_name->{syshost}/src/scripts/mailTransportcms.pl '$op_name->{syshost}' 'send_alarm2hotline' '1' '$c_id' ''\n\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue