mirror of https://gitee.com/stylefeng/roses
【7.6.0】【sys】获取公司列表接口去重
parent
4e55b6c4b9
commit
60b4029219
|
@ -236,7 +236,17 @@ public class SysUserOrgServiceServiceImpl extends ServiceImpl<SysUserOrgMapper,
|
|||
if (companyInfo == null) {
|
||||
continue;
|
||||
}
|
||||
results.add(companyInfo);
|
||||
|
||||
// 判断是否已经加了这个公司
|
||||
boolean alreadyHave = false;
|
||||
for (HrOrganizationDTO dtoItem : results) {
|
||||
if (dtoItem.getOrgId().equals(companyInfo.getOrgId())) {
|
||||
alreadyHave = true;
|
||||
}
|
||||
}
|
||||
if (!alreadyHave) {
|
||||
results.add(companyInfo);
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
|
|
Loading…
Reference in New Issue