| | |
| | | for(PageRegionInfoResponse p : allList){ |
| | | for(CarmeraListVO c : carmeraListVOList){ |
| | | if(StringUtils.equals(p.getIndexCode(),c.getReginCode()) ){ |
| | | if(p.getCarmeraList()==null){ |
| | | if(p.getDeviceList()==null){ |
| | | p.setDeviceList(new ArrayList<>()); |
| | | } |
| | | p.getDeviceList().add(c); |
| | |
| | | try { |
| | | CarmeraListVO param =new CarmeraListVO(); |
| | | param.setWithCameras(2); |
| | | param.setRefresh(1); |
| | | List<PageRegionInfoResponse> resultTree = getRegionTree(param); |
| | | List<PageRegionInfoResponse> result = getAllRegionList(); |
| | | List<CarmeraListVO> carmeraListVOList = initAllReginCameralList(result); |
| | |
| | | stringRedisTemplate.opsForValue().set(Constants.RedisKeys.HK_SENSOR,sensorList);//所有传感器 |
| | | log.error("===============缓存海康平台区域设备信息======成功============"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | log.error("===============缓存海康平台区域设备信息失败=================="); |
| | | } |
| | | } |
| | |
| | | for(PageRegionInfoResponse p : allList){ |
| | | for(CarmeraListVO c : carmeraListVOList){ |
| | | if(StringUtils.equals(p.getIndexCode(),c.getReginCode()) |
| | | && (StringUtils.contains(c.getName(),name) ||StringUtils.isBlank(name))){ |
| | | && (StringUtils.isBlank(name) || StringUtils.contains(c.getName(),name))){ |
| | | if(p.getCarmeraList()==null){ |
| | | p.setCarmeraList(new ArrayList<>()); |
| | | } |