|
|
|
@ -58,6 +58,17 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptDao, SysDeptEntity> i |
|
|
|
|
public List<SysDeptEntity> queryList(String company, long parentId) { |
|
|
|
|
DynamicContextHolder.push(DbConstant.BASICS_READ); |
|
|
|
|
List<SysDeptEntity> deptList = baseMapper.queryList(company); |
|
|
|
|
if(parentId == -1){ |
|
|
|
|
parentId = 0; |
|
|
|
|
if (StringUtils.isNotBlank(company)) { |
|
|
|
|
for (SysDeptEntity deptEntity : deptList) { |
|
|
|
|
if ("1".equals(deptEntity.getDeptType())) { |
|
|
|
|
parentId = deptEntity.getParentId(); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return this.getChildPerms(deptList, parentId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|