Bladeren bron

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.0.0^2
wanjing 1 jaar geleden
bovenliggende
commit
cbcb4d6c6c
1 gewijzigde bestanden met toevoegingen van 6 en 4 verwijderingen
  1. +6
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/add/AddDeptService.java

+ 6
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/add/AddDeptService.java Bestand weergeven

@@ -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);
}


Laden…
Annuleren
Opslaan