|
|
@ -242,7 +242,14 @@ public class GovMenuServiceImpl extends BaseServiceImpl<GovMenuDao, GovMenuEntit |
|
|
|
@Override |
|
|
|
public List<GovMenuDTO> navDigitalCommunity(TokenDto tokenDto, String tableName) { |
|
|
|
tableName = getTableName(tableName); |
|
|
|
List<GovMenuEntity> menuList = baseDao.getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value(), HttpContextUtils.getLanguage(),tableName); |
|
|
|
List<GovMenuEntity> menuList=new ArrayList<>(); |
|
|
|
if("gov_menu".equals(tableName)){ |
|
|
|
// 管理平台菜单返回所有的
|
|
|
|
menuList = baseDao.getCustomerMenuList(tokenDto.getCustomerId(),null, HttpContextUtils.getLanguage(),tableName); |
|
|
|
}else{ |
|
|
|
//数据分析还是沿用原来的
|
|
|
|
menuList = baseDao.getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value(), HttpContextUtils.getLanguage(),tableName); |
|
|
|
} |
|
|
|
Result<Boolean> isRootManager = epmetUserOpenFeignClient.getIsRootManager(tokenDto.getUserId()); |
|
|
|
if (!isRootManager.success()){ |
|
|
|
throw new EpmetException("getIsRootManager method is failure"); |
|
|
@ -251,6 +258,11 @@ public class GovMenuServiceImpl extends BaseServiceImpl<GovMenuDao, GovMenuEntit |
|
|
|
List<GovMenuDTO> govMenuDTOS = ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class); |
|
|
|
return TreeUtils.buildTree(govMenuDTOS); |
|
|
|
} |
|
|
|
/*for(GovMenuEntity m:menuList){ |
|
|
|
if("ic_resi_add".equals(m.getPermissions())){ |
|
|
|
logger.info("1、菜单返回了新增居民"); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
disposeGovMenu(menuList,tokenDto.getUserId()); |
|
|
|
Map<Boolean, List<GovMenuEntity>> groupByStatus = menuList.stream().collect(Collectors.groupingBy(GovMenuEntity::getRoleStatus)); |
|
|
|
List<GovMenuDTO> dtoList = ConvertUtils.sourceToTarget(CollectionUtils.isEmpty(groupByStatus.get(true)) ? new ArrayList<>() : groupByStatus.get(true), GovMenuDTO.class); |
|
|
@ -286,11 +298,17 @@ public class GovMenuServiceImpl extends BaseServiceImpl<GovMenuDao, GovMenuEntit |
|
|
|
menuList = new ArrayList<>(); |
|
|
|
return; |
|
|
|
} |
|
|
|
// logger.info("==roleIdList="+ JSON.toJSONString(roleIdList));
|
|
|
|
List<String> menuIdsList = govRoleMenuDao.getMenuIdsList(roleIdList); |
|
|
|
if (CollectionUtils.isEmpty(menuIdsList)){ |
|
|
|
menuList = new ArrayList<>(); |
|
|
|
return; |
|
|
|
} |
|
|
|
/*for(String mid:menuIdsList){ |
|
|
|
if("1581827798717898754".equals(mid)){ |
|
|
|
logger.info("2、角色也有此菜单"); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
for (String id : menuIdsList) { |
|
|
|
for (GovMenuEntity m : menuList) { |
|
|
|
if (m.getId().equals(id)){ |
|
|
|