| | |
| | | @Override |
| | | public Object updateAlarmViewTime(GlobalAlarmCondition condition) { |
| | | SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | SimpleDateFormat fmtms = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); |
| | | switch (condition.getCommand()) { |
| | | case 1001: |
| | | ArdAlarmStealelec ardAlarmStealelec = ardAlarmStealelecMapper.selectByPrimaryKey(condition.getId()); |
| | |
| | | ArdAlarmWall ardAlarmWall = ardAlarmWallMapper.selectArdAlarmWallById(condition.getId()); |
| | | if (StringUtils.isNotNull(ardAlarmWall)) { |
| | | String userId = ardAlarmWall.getUserId(); |
| | | String alarmTime = fmt.format(ardAlarmWall.getCreateTime()); |
| | | String alarmTime = fmtms.format(ardAlarmWall.getAlarmTime()); |
| | | ardAlarmWallMapper.updateViewTimeByUserId(userId, alarmTime, DateUtils.getTime()); |
| | | return ardAlarmWall; |
| | | } |
| | |
| | | //获取雷达所在塔上的大光电 |
| | | String cameraIdWithTower = ardEquipRadarMapper.getCameraByRadar(radarId); |
| | | if (StringUtils.isNotNull(cameraIdWithTower) && StringUtils.isNotEmpty(cameraIdWithTower)) { |
| | | log.info("获取到雷达塔上的光电:" + cameraIdWithTower); |
| | | log.debug("获取到雷达塔上的光电:" + cameraIdWithTower); |
| | | //如果雷达塔上有光电 |
| | | messagesEnqueued(cameraIdWithTower, alarmId, alarmType, createTime, 1, 1, coordinate); |
| | | } |
| | | else |
| | | { |
| | | log.debug("未获取到雷达塔上的光电"); |
| | | } |
| | | //获取报警点关联的大光电 |
| | | ArdAlarmpointsWell ardAlarmpointsWell = ardAlarmpointsWellMapper.selectArdAlarmpointsWellByWellId(alarmpointName); |
| | |
| | | //如果报警点关联了光电 |
| | | messagesEnqueued(cameraId, alarmId, alarmType, createTime, 1, 2, coordinate); |
| | | } |
| | | else |
| | | { |
| | | log.debug("未获取到报警点关联的光电"); |
| | | } |
| | | } |
| | | |
| | | |