diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandardsInfo/service/impl/SarStandardsInfoServiceImpl.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandardsInfo/service/impl/SarStandardsInfoServiceImpl.java index 0af77f7f..df3ee156 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandardsInfo/service/impl/SarStandardsInfoServiceImpl.java +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandardsInfo/service/impl/SarStandardsInfoServiceImpl.java @@ -185,16 +185,24 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception { //查询当前登录人角色拥有权限的菜单 - List getMenuIdList=tsUserService.getResourceId(new TsResource()); -// List getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null); - if (getMenuIdList != null && !getMenuIdList.isEmpty()) { - page.setMenuRoleList(getMenuIdList); - } else { - page.setMenuRoleList(null); - } - List ids = iTsResourceService.getChildMenuList(page.getMenuId()); - if (ids != null && !ids.isEmpty()) { - page.setMenuAllChildrenIdList(ids); + if(page.getMenuId() != null ){ + QueryWrapper qw = new QueryWrapper<>(); + qw.eq("ID",page.getMenuId()); + qw.isNull("PARENT_ID"); + List children = iTsResourceService.list(qw); + if(children.isEmpty() && !page.getMenuId().equals("nomenu")){ + List getMenuIdList = tsUserService.getResourceId(new TsResource()); + if (getMenuIdList != null && !getMenuIdList.isEmpty()) { + page.setMenuRoleList(getMenuIdList); + } else { + page.setMenuRoleList(null); + } + List ids = iTsResourceService.getChildMenuList(page.getMenuId()); + if (ids != null && !ids.isEmpty()) { + page.setMenuAllChildrenIdList(ids); + } + } + } Integer rowCount = dao.getSarStandardsInfoCount(page); page.getPager().setRowCount(rowCount);