条件分支修复

This commit is contained in:
pengjie 2024-05-01 18:57:43 +08:00
parent e28b59f591
commit 5abe733e96
2 changed files with 3 additions and 2 deletions

View File

@ -185,7 +185,8 @@ public class FlowOrgRepositoryServiceImpl implements OrgRepositoryService {
public List<DeptDo> getSysAllDepts() {
try {
return xzProjectOrgMapper.selectList(null).stream()
.map(d -> new DeptDo(d.getId().toString(), d.getDeptName(), "", d.getParentId().toString()))
.map(d -> new DeptDo(d.getId().toString(), d.getDeptName(), d.getLeader() == null ?
null : d.getLeader().toString(), d.getParentId().toString()))
.collect(Collectors.toList());
} catch (Exception e) {
return Collections.emptyList();
@ -196,7 +197,7 @@ public class FlowOrgRepositoryServiceImpl implements OrgRepositoryService {
public List<UserDeptDo> getSysAllUserDepts() {
try {
return systemUserMapper.selectList(null).stream()
.map(d -> new UserDeptDo(d.getUserId().toString(), d.getDepartment()))
.map(d -> new UserDeptDo(d.getUserId().toString(), d.getXzProjectOrgId() == null ? null : d.getXzProjectOrgId().toString()))
.collect(Collectors.toList());
} catch (Exception e) {
return Collections.emptyList();