Commit 49e7697b authored by 刘林's avatar 刘林

fix(大屏):获取本级及子级区域code

parent 92188651
......@@ -577,9 +577,12 @@ public class StCommonServiceImpl {
* @return 本级及子级区域code
*/
public String getSelfAndChildRegion(RegionModel region) {
return getRegionTree3Level(region.getRegionCode()).stream()
return Stream.concat(Stream.of(region.getRegionCode()),
Optional.ofNullable(region.getChildren())
.orElse(Collections.emptyList())
.stream()
.map(RegionModel::getRegionCode)
.map(String::valueOf)
).map(String::valueOf)
.collect(Collectors.joining(","));
}
......
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