feat: 树查询国内外标准

This commit is contained in:
super_liu
2021-07-27 09:50:47 +08:00
parent ebedd9ee4c
commit 387a97a46c
@@ -185,8 +185,13 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
*/ */
public List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception { public List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception {
//查询当前登录人角色拥有权限的菜单 //查询当前登录人角色拥有权限的菜单
List<String> getMenuIdList=tsUserService.getResourceId(new TsResource()); if(page.getMenuId() != null ){
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null); QueryWrapper<TsResource> qw = new QueryWrapper<>();
qw.eq("ID",page.getMenuId());
qw.isNull("PARENT_ID");
List<TsResource> children = iTsResourceService.list(qw);
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
List<String> getMenuIdList = tsUserService.getResourceId(new TsResource());
if (getMenuIdList != null && !getMenuIdList.isEmpty()) { if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
page.setMenuRoleList(getMenuIdList); page.setMenuRoleList(getMenuIdList);
} else { } else {
@@ -196,6 +201,9 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
if (ids != null && !ids.isEmpty()) { if (ids != null && !ids.isEmpty()) {
page.setMenuAllChildrenIdList(ids); page.setMenuAllChildrenIdList(ids);
} }
}
}
Integer rowCount = dao.getSarStandardsInfoCount(page); Integer rowCount = dao.getSarStandardsInfoCount(page);
page.getPager().setRowCount(rowCount); page.getPager().setRowCount(rowCount);
List<SarStandardsInfo> sarlist = dao.getSarStandardsInfoPage(page); List<SarStandardsInfo> sarlist = dao.getSarStandardsInfoPage(page);