|
|
@ -155,14 +155,16 @@ public class AppMenuServiceImpl extends BaseServiceImpl<AppMenuDao, AppMenuEntit |
|
|
|
List<AppMenuDTO> dtoList = ConvertUtils.sourceToTarget(getUserMenuList(userDetail), AppMenuDTO.class); |
|
|
|
List<AppMenuDTO> workMenuList = Lists.newArrayList(); |
|
|
|
List<AppMenuDTO> analysisMenuList = Lists.newArrayList(); |
|
|
|
for (int i = 0; i < dtoList.size(); i++) { |
|
|
|
AppMenuDTO dto = dtoList.get(i); |
|
|
|
if (AppMenuCategoryEnum.WORK.getValue().equals(dto.getCategory())) { |
|
|
|
workMenuList.add(dto); |
|
|
|
} else if (AppMenuCategoryEnum.ANALYSIS.getValue().equals(dto.getCategory())) { |
|
|
|
analysisMenuList.add(dto); |
|
|
|
dtoList.forEach(dto -> { |
|
|
|
if (dto != null) { |
|
|
|
String category = dto.getCategory(); |
|
|
|
if (AppMenuCategoryEnum.WORK.getValue().equals(category)) { |
|
|
|
workMenuList.add(dto); |
|
|
|
} else if (AppMenuCategoryEnum.ANALYSIS.getValue().equals(category)) { |
|
|
|
analysisMenuList.add(dto); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
AppMenuGroupDTO group = new AppMenuGroupDTO(); |
|
|
|
group.setWorkMenu(TreeUtils.build(workMenuList)); |
|
|
|
group.setAnalysisMenu(TreeUtils.build(analysisMenuList)); |
|
|
|