修复“查询部门:根据ID获取同级与上级数据”包含禁用数据的问题

pull/729/head
cm 2022-04-18 16:02:11 +08:00
parent 854faa3994
commit a18ad5ab80
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ public class DeptServiceImpl implements DeptService {
depts.addAll(deptRepository.findByPidIsNull());
return deptMapper.toDto(depts);
}
depts.addAll(deptRepository.findByPid(deptDto.getPid()));
depts.addAll(deptRepository.findByPid(deptDto.getPid()).stream().filter(dept -> dept.getEnabled()).collect(Collectors.toList()));
return getSuperior(findById(deptDto.getPid()), depts);
}