Commit 7d1f1741 authored by gaodongdong's avatar gaodongdong

修改bug

parent 3122b373
...@@ -858,13 +858,18 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -858,13 +858,18 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
} }
public List<CompanyPerson> returnCompanyPerson(List<Long> ids) { public List<CompanyPerson> returnCompanyPerson(List<Long> ids) {
if (ids == null) return null; if (ObjectUtils.isEmpty(ids)) return null;
return ids.stream().map(m -> { return ids.stream().map(m -> {
OrgUsr org = getById(m); OrgUsr org = getById(m);
if (ObjectUtils.isEmpty(org)) {
return null;
}
CompanyPerson company = new CompanyPerson(); CompanyPerson company = new CompanyPerson();
BeanUtils.copyProperties(org, company); BeanUtils.copyProperties(org, company);
company.setPersons(this.queryForListByParentIdAndOrgType(org.getSequenceNbr(), OrgPersonEnum.人员.getKey())); company.setPersons(this.queryForListByParentIdAndOrgType(org.getSequenceNbr(), OrgPersonEnum.人员.getKey()));
return company; return company;
}).filter(c -> {
return c != null;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
...@@ -874,6 +879,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -874,6 +879,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
public OrgUsrDto getOrg(String amosUserId) { public OrgUsrDto getOrg(String amosUserId) {
OrgUsrDto person = queryForListByParentIdAndOrgType(amosUserId); OrgUsrDto person = queryForListByParentIdAndOrgType(amosUserId);
if (ObjectUtils.isEmpty(person)) {
return null;
}
return this.queryBySeq(Long.valueOf(person.getParentId())); return this.queryBySeq(Long.valueOf(person.getParentId()));
} }
......
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