@ResponseBody @RequestMapping( value = "chooseDeviceBYBBSA", method = RequestMethod.POST, produces = MediaTypes.JSON) public Map<String, Object> chooseDeviceBYBBSA( @RequestParam("id") Integer id, HttpServletRequest request) throws SQLException { List<GroupBean> groupBeanList = new ArrayList<GroupBean>(); if (id == 0) { List<GroupBean> firstLevelDeviceList = groupService.findFirstLevelDeviceGroup(); groupBeanList.addAll(firstLevelDeviceList); } else { List<GroupBean> childDeviceGroup = groupService.findDeviceGroupWithId(id); groupBeanList.addAll(childDeviceGroup); BLGroup groupNode = groupService.findByGroupId(id); if (groupNode.getGROUP_TYPE_ID() == 1) { List<GroupBean> staticDeviceList = groupService.findStaticDeviceNode(id); groupBeanList.addAll(staticDeviceList); } else { List<GroupBean> smartDeviceList = groupService.findSmartDeviceNode(id); groupBeanList.addAll(smartDeviceList); } } Map<String, Object> resultMap = new HashMap<String, Object>(); resultMap.put("data", groupBeanList); // resultMap.put("data",deviceFilter.deviceFilterRole(groupBeanList,UserNameUtil.getUserNameByRequest(request)) ); return resultMap; }