|
|
@@ -201,6 +201,8 @@ public class UpdateDeptService { |
|
|
|
// 差集:新增公路 |
|
|
|
Collection<String> addRoadIdList = org.apache.commons.collections4.CollectionUtils.subtract(newRoadIdList, oldRoadIdList); |
|
|
|
if (!CollectionUtils.isEmpty(addRoadIdList)) { |
|
|
|
// 去重,防止前端提交了重复的数据 |
|
|
|
addRoadIdList= addRoadIdList.stream().distinct().collect(Collectors.toList()); |
|
|
|
this.addRoadToDept(tenantId, newEditDeptRequest.getId(), addRoadIdList); |
|
|
|
} |
|
|
|
|
|
|
@@ -301,6 +303,8 @@ public class UpdateDeptService { |
|
|
|
Collection<String> addSectionIdList = org.apache.commons.collections4.CollectionUtils.subtract(newSectionIdList, oldSectionIdList); |
|
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(addSectionIdList)) { |
|
|
|
// 去重,防止前端提交了重复的数据 |
|
|
|
addSectionIdList= addSectionIdList.stream().distinct().collect(Collectors.toList()); |
|
|
|
// 添加路段和部门数据 |
|
|
|
this.addSectionToDept(tenantId, newEditDeptRequest.getId(), addSectionIdList); |
|
|
|
} |