소스 검색

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.0.0^2
wanjing 1 년 전
부모
커밋
cbcb4d6c6c
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  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 파일 보기

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


Loading…
취소
저장