大屏功能更新
This commit is contained in:
parent
f31bdefab2
commit
55f4e7e447
@ -2,6 +2,8 @@ package com.inspur.system.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.inspur.system.mapper.SysRegionMapper;
|
||||
@ -54,10 +56,16 @@ public class SysRegionServiceImpl implements ISysRegionService
|
||||
if(sysRegionList != null) {
|
||||
for (SysRegion sysRegion : sysRegionList) {
|
||||
if (sysRegion.getParentId() != 0L) {
|
||||
sysRegion = sysRegionMapper.selectSysRegionById(sysRegion.getParentId());
|
||||
resultList.add(sysRegion);
|
||||
SysRegion provinceRegion = sysRegionMapper.selectSysRegionById(sysRegion.getParentId());
|
||||
//去重
|
||||
if (!resultList.isEmpty() && resultList.stream().anyMatch(r -> r.getName().equals(provinceRegion.getName()))) {
|
||||
continue;
|
||||
}
|
||||
resultList.add(provinceRegion);
|
||||
} else {
|
||||
resultList.add(sysRegion);
|
||||
if(!resultList.isEmpty() && resultList.stream().anyMatch(r -> r.getName().equals(sysRegion.getName()))) {
|
||||
resultList.add(sysRegion);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user