| | |
| | | import org.springframework.beans.factory.InitializingBean; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import javax.sip.InvalidArgumentException; |
| | |
| | | deviceAlarm.setLatitude(0.00); |
| | | } |
| | | |
| | | if (!StringUtils.isEmpty(deviceAlarm.getAlarmMethod())) { |
| | | if (!ObjectUtils.isEmpty(deviceAlarm.getAlarmMethod())) { |
| | | if ( deviceAlarm.getAlarmMethod().contains(DeviceAlarmMethod.GPS.getVal() + "")) { |
| | | MobilePosition mobilePosition = new MobilePosition(); |
| | | mobilePosition.setCreateTime(DateUtil.getNow()); |
| | |
| | | redisCatchStorage.sendMobilePositionMsg(jsonObject); |
| | | } |
| | | } |
| | | if (!StringUtils.isEmpty(deviceAlarm.getDeviceId())) { |
| | | if (!ObjectUtils.isEmpty(deviceAlarm.getDeviceId())) { |
| | | if (deviceAlarm.getAlarmMethod().contains(DeviceAlarmMethod.Video.getVal() + "")) { |
| | | deviceAlarm.setAlarmType(getText(rootElement.element("Info"), "AlarmType")); |
| | | } |
| | | } |
| | | |
| | | if (channelId.equals(sipConfig.getId())) { |
| | | if ("7".equals(deviceAlarm.getAlarmMethod()) ) { |
| | | // 发送给平台的报警信息。 发送redis通知 |
| | | AlarmChannelMessage alarmChannelMessage = new AlarmChannelMessage(); |
| | | alarmChannelMessage.setAlarmSn(Integer.parseInt(deviceAlarm.getAlarmMethod())); |
| | |
| | | deviceAlarm.setLatitude(0.00); |
| | | } |
| | | |
| | | if (!StringUtils.isEmpty(deviceAlarm.getAlarmMethod())) { |
| | | if (!ObjectUtils.isEmpty(deviceAlarm.getAlarmMethod())) { |
| | | |
| | | if (deviceAlarm.getAlarmMethod().contains(DeviceAlarmMethod.Video.getVal() + "")) { |
| | | deviceAlarm.setAlarmType(getText(rootElement.element("Info"), "AlarmType")); |