|
|
@@ -19,10 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
@@ -172,8 +169,13 @@ public class AddDeptService { |
|
|
|
} |
|
|
|
|
|
|
|
// 添加部门和公路数据 |
|
|
|
// 去重,防止前端提交了重复的数据 |
|
|
|
roadInformationList = roadInformationList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(RoadInformation::getId))), ArrayList::new)); |
|
|
|
this.addRoadToDept(tenantId, deptId, roadInformationList); |
|
|
|
|
|
|
|
// 添加部门和路段数据 |
|
|
|
// 去重,防止前端提交了重复的数据 |
|
|
|
sectionList = sectionList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(Section::getId))), ArrayList::new)); |
|
|
|
this.addSectionToDept(tenantId, deptId, sectionList); |
|
|
|
} |
|
|
|
|