merchant_message. trigger mail by alarm

This commit is contained in:
ragu 2023-01-23 12:56:14 +01:00
parent a61920988c
commit b63e00e982
10 changed files with 65 additions and 39 deletions

View file

@ -428,10 +428,10 @@ sub get_positions {
print FILE "insert sub get_positions:" . Dumper($insert);
#theft mailing
if($theftmove_count > $dbt->{copri_conf}->{theftalarm}->{move_count} && $resp->{speed} $dbt->{copri_conf}->{theftalarm}->{speed} && $resp->{attributes}->{distance} > $dbt->{copri_conf}->{theftalarm}->{meter}){
if($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("$varenv{basedir}/src/scripts/mailTransportcms.pl '$varenv->{syshost}' 'send_alarm2hotline' '' ''");
print FILE "send_alarm2hotline, condition: $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("$varenv{basedir}/src/scripts/mailTransportcms.pl '$varenv{syshost}' 'send_alarm2hotline' '1' '$c_id' ''");
print FILE "send_alarm2hotline, condition: $theftmove_count > $dbt->{copri_conf}->{theftalarm}->{move_count} && $resp->{speed} > $dbt->{copri_conf}->{theftalarm}->{speed} && $resp->{attributes}->{distance} > $dbt->{copri_conf}->{theftalarm}->{meter}\n";
}
}