Commit 6277a333 authored by 赵啸非's avatar 赵啸非

修改根据业务查询部门逻辑

parent a2b830a6
......@@ -53,17 +53,20 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
SiteBusinessEntity item = iterator.next();
siteBusinessQuery.siteId(item.getSiteId());
siteBusinessQuery.setParentId(item.getBusinessId());
siteBusinessQuery.setIdNotList(params.getIdNotList());
List<SiteBusinessEntity> childs = this.find(siteBusinessQuery);
if (ObjectUtils.isEmpty(childs)) {
//子节点已经全部选中,删除父节点
iterator.remove();
} else {
childs.stream().forEach(item1 -> {
buildChildBusiness(item1);
});
item.setChildren(childs);
buildChildBusiness(item);
int count = this.count(siteBusinessQuery, context);
if (count > 0) {
siteBusinessQuery.setIdNotList(params.getIdNotList());
List<SiteBusinessEntity> childs = this.find(siteBusinessQuery);
if (ObjectUtils.isEmpty(childs)) {
//子节点已经全部选中,删除父节点
iterator.remove();
} else {
childs.stream().forEach(item1 -> {
buildChildBusiness(item1);
});
item.setChildren(childs);
buildChildBusiness(item);
}
}
}
} else {
......
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