Commit f8acd2d3 authored by xixinzhao's avatar xixinzhao

修改根据登陆人获取单位列表

parent abe462ac
......@@ -1198,11 +1198,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
Set<Long> set = new HashSet<>();
orgUsrList.forEach(orgUsr -> {
Long parent = ObjectUtils.isEmpty(orgUsr.getParentId()) ? 0L : Long.parseLong(orgUsr.getParentId());
if (set.add(parent)) {
Long companyIdByDto = getCompanyIdByDto(parent, companyList);
List<CheckObjectDto> orgUsrTreeDtoList = this.baseMapper.getCompanyAndKeySite(companyIdByDto);
list.addAll(companyAndKeySiteList(orgUsrTreeDtoList));
if (!StringUtils.isEmpty(orgUsr.getParentId())) {
Long parent = Long.parseLong(orgUsr.getParentId());
if (set.add(parent)) {
Long companyIdByDto = getCompanyIdByDto(parent, companyList);
List<CheckObjectDto> orgUsrTreeDtoList = this.baseMapper.getCompanyAndKeySite(companyIdByDto);
list.addAll(companyAndKeySiteList(orgUsrTreeDtoList));
}
}
});
// 返回所在用户单位列表
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment