|
@@ -129,9 +129,14 @@ class NoticeAction extends Action {
|
|
|
\Rlfd\Alarm\PushTypeEnum::LOWWER_BATTERY_ALARM,// C('LOWWER_BATTERY_ALARM'), // 3-低电量告警
|
|
|
\Rlfd\Alarm\PushTypeEnum::SHAKE_ALARM,// C('SHAKE_ALARM'), // 4-震动报警
|
|
|
\Rlfd\Alarm\PushTypeEnum::SHIFT_ALARM,// C('SHIFT_ALARM'), // 5-位移报警
|
|
|
- \Rlfd\Alarm\PushTypeEnum::LOCK_VEHICLE_ALARM,// C('LOCK_VEHICLE_ALARM'), // 6-锁车告警
|
|
|
+ \Rlfd\Alarm\PushTypeEnum::LOCK_VEHICLE_ALARM,// C('LOCK_VEHICLE_ALARM'), // 99-锁车告警
|
|
|
\Rlfd\Alarm\PushTypeEnum::STOLEN_ALARM,// C('STOLEN_ALARM'), // 7-被盗告警
|
|
|
\Rlfd\Alarm\PushTypeEnum::FENCE_ALARM,// C('FENCE_ALARM'), // 8-电子围栏告警
|
|
|
+
|
|
|
+ \Rlfd\Alarm\PushTypeEnum::CRASH_ALARM,
|
|
|
+ \Rlfd\Alarm\PushTypeEnum::HIGHVOLTAGE_ALARM,
|
|
|
+ \Rlfd\Alarm\PushTypeEnum::TAKEAPART_ALARM,//拆动报警
|
|
|
+ \Rlfd\Alarm\PushTypeEnum::TURN_ALARM,//翻转报警
|
|
|
);
|
|
|
if(!is_array($msg_data)){
|
|
|
return array( 'success' => false , 'message' => 'invalid message data format!'.$msg_data);
|
|
@@ -146,6 +151,9 @@ class NoticeAction extends Action {
|
|
|
if(!$ctlRes['success']){
|
|
|
return $ctlRes;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// 取车辆数据
|
|
|
$where = array('DeviceNumber|GpsDeviceNumber' => $msg_data['device_number']);
|
|
|
$fields= 'CityId,LicensePlate,FullName,JgClientRegistrationId';
|
|
@@ -278,6 +286,18 @@ class NoticeAction extends Action {
|
|
|
$cache = 'last_fence_alarm_';
|
|
|
}
|
|
|
|
|
|
+ if($msg_data['type'] == \Rlfd\Alarm\PushTypeEnum::OUTAGE_ALARM ){
|
|
|
+ $interval = C('OUTAGE_ALARM_INTERVAL_SECOND') ? C('OUTAGE_ALARM_INTERVAL_SECOND') : 300;
|
|
|
+ $type = '断电告警';
|
|
|
+ $cache = 'last_outage_alarm_';
|
|
|
+ }
|
|
|
+
|
|
|
+ if($msg_data['type'] == \Rlfd\Alarm\PushTypeEnum::FENCE_ALARM ){
|
|
|
+ $interval = C('HIGHVOLTAGE_ALARM_INTERVAL_SECOND') ? C('HIGHVOLTAGE_ALARM_INTERVAL_SECOND') : 300;
|
|
|
+ $type = '高电压报警';
|
|
|
+ $cache = 'last_highvoltage_alarm_';
|
|
|
+ }
|
|
|
+
|
|
|
if($msg_data['type'] == \Rlfd\Alarm\PushTypeEnum::SHIFT_ALARM ){
|
|
|
$redis = Redis('czapp_lock_status', 'hash');
|
|
|
$lockStatus = $redis->get($msg_data['device_number']);
|
|
@@ -295,6 +315,24 @@ class NoticeAction extends Action {
|
|
|
$type = '锁车报警';
|
|
|
$cache = 'last_lock_alarm_';
|
|
|
}
|
|
|
+
|
|
|
+ if($msg_data['type'] == \Rlfd\Alarm\PushTypeEnum::TAKEAPART_ALARM ){
|
|
|
+ $interval = C('TAKEAPART_ALARM_INTERVAL_SECOND') ? C('TAKEAPART_ALARM_INTERVAL_SECOND') : 120;
|
|
|
+ $type = '拆动报警';
|
|
|
+ $cache = 'last_takeapart_alarm_';
|
|
|
+ }
|
|
|
+
|
|
|
+ if($msg_data['type'] == \Rlfd\Alarm\PushTypeEnum::TAKEAPART_ALARM ){
|
|
|
+ $interval = C('CRASH_ALARM_INTERVAL_SECOND') ? C('CRASH_ALARM_INTERVAL_SECOND') : 120;
|
|
|
+ $type = '碰撞报警';
|
|
|
+ $cache = 'last_crash_alarm_';
|
|
|
+ }
|
|
|
+
|
|
|
+ if($msg_data['type'] == \Rlfd\Alarm\PushTypeEnum::TURN_ALARM ){
|
|
|
+ $interval = C('TURN_ALARM_INTERVAL_SECOND') ? C('TURN_ALARM_INTERVAL_SECOND') : 120;
|
|
|
+ $type = '翻转报警';
|
|
|
+ $cache = 'last_turn_alarm_';
|
|
|
+ }
|
|
|
// \Rlfd\Alarm\PushTypeEnum::SHIFT_ALARM,// C('SHIFT_ALARM'), // 5-位移报警
|
|
|
// \Rlfd\Alarm\PushTypeEnum::LOCK_VEHICLE_ALARM,// C('LOCK_VEHICLE_ALARM'), // 6-锁车告警
|
|
|
|