| | |
| | | private IHikClientService hikClientService; |
| | | @Resource |
| | | private RedisCache redisCache; |
| | | |
| | | /** |
| | | * @描述 按条件查询报警 |
| | | * @参数 [condition] |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @描述 按条件更新查看时间 |
| | | * @参数 [condition] |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @描述 异步处理接收的报警 |
| | | * @参数 [topic, message] |
| | |
| | | double distance = GisTool.getDistance(cmd.getTargetPosition(), camPosition); |
| | | if (distance != 0.0 && distance <= camera.getCamMaxVisibleDistance()) { |
| | | distanceMap.put(camera.getId(), distance); |
| | | if(StringUtils.isNull(camera.getCamAlarmGuideEnable())) |
| | | { |
| | | if (StringUtils.isNull(camera.getCamAlarmGuideEnable())) { |
| | | camera.setCamAlarmGuideEnable(0); |
| | | } |
| | | guideMap.put(camera.getId(),camera.getCamAlarmGuideEnable()); |
| | |
| | | //获取距离字典中最近的一个相机ID |
| | | String minDistanceCameraId = ArdTool.getKeyByMinValue(distanceMap); |
| | | log.debug("查找到最近光电:"+minDistanceCameraId+",尝试引导"); |
| | | if(guideMap.get(minDistanceCameraId).equals(0)) |
| | | { |
| | | if (guideMap.get(minDistanceCameraId).equals(0)) { |
| | | log.debug("该光电未开启报警引导"); |
| | | return ""; |
| | | } |
| | |
| | | countMap.put("1014 ", count1014); |
| | | return countMap; |
| | | } |
| | | |
| | | @Override |
| | | public Object selectAlarmList(Integer command, String beginTime, String endTime) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("beginTime", beginTime); |
| | | params.put("endTime", endTime); |
| | | switch (command) { |
| | | case 1001: |
| | | ArdAlarmStealelec aas = new ArdAlarmStealelec(); |
| | | aas.setParams(params); |
| | | List<ArdAlarmStealelec> ardAlarmStealelecs = ardAlarmStealelecMapper.selectArdAlarmStealelecList(aas); |
| | | return ardAlarmStealelecs; |
| | | |
| | | case 1014: |
| | | ArdAlarmTube aat = new ArdAlarmTube(); |
| | | aat.setParams(params); |
| | | List<ArdAlarmTube> ardAlarmTubes = ardAlarmTubeMapper.selectArdAlarmTubeList(aat); |
| | | return ardAlarmTubes; |
| | | } |
| | | return null; |
| | | } |
| | | } |