// 查询数据
List<Org> list = outCommonService.getOrgTree(queryOrg);
Iterator<Org> it = list.iterator();
while(it.hasNext()){
if("4".equals(it.next().getType())){
List<Org> list = outCommonService.getOrgTree(queryOrg);
Iterator<Org> it = list.iterator();
while(it.hasNext()){
if("4".equals(it.next().getType())){
it.remove();
使用迭代器进行删除。