根据部门id获取子部门

This commit is contained in:
zhuxinyu
2023-03-21 10:05:44 +08:00
parent d3e0769a6e
commit d4553ffa85

View File

@@ -322,12 +322,11 @@ public class GeneralDeviceService {
.collect(Collectors.toList()); .collect(Collectors.toList());
if (CollectionUtil.isEmpty(directDeptInfos)) { if (CollectionUtil.isEmpty(directDeptInfos)) {
// 没有直接子部门(树的最底层),获取当前部门所有信息 // 没有直接子部门(树的最底层),获取当前部门所有信息
// List<DeptDTO> dept = deptInfos.stream() List<DeptDTO> dept = deptInfos.stream()
// .filter(deptDTO -> deptDTO.getId().equals(deviceInfoParam.getDeptIndex())) .filter(deptDTO -> deptDTO.getId().equals(deviceInfoParam.getDeptIndex()))
// .collect(Collectors.toList()); .collect(Collectors.toList());
deviceInfos.add(getGeneralDeviceInfo( deviceInfos.add(getGeneralDeviceInfo(
// dept.get(0), dept.get(0),
deptInfos.get(0),
deviceType, deviceType,
Collections.singletonList(deviceInfoParam.getDeptIndex()), Collections.singletonList(deviceInfoParam.getDeptIndex()),
deviceInfoParam)); deviceInfoParam));