|
@@ -63,6 +63,8 @@ import java.util.Objects;
|
|
|
import java.util.Random;
|
|
import java.util.Random;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
+import static java.util.Arrays.stream;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @title: 新生分班任务
|
|
* @title: 新生分班任务
|
|
|
* @Author dzx
|
|
* @Author dzx
|
|
@@ -160,8 +162,8 @@ public class BandingTaskServiceImpl extends MPJBaseServiceImpl<BandingTaskMapper
|
|
|
Map<Long, Integer> classLimitMap = new HashMap<>();
|
|
Map<Long, Integer> classLimitMap = new HashMap<>();
|
|
|
if(ruleCodes.contains("BR0004")){
|
|
if(ruleCodes.contains("BR0004")){
|
|
|
//查询每个专业下面有多少个班级
|
|
//查询每个专业下面有多少个班级
|
|
|
- Map<Long, Integer> majorClassCount = taskClassMapper.getMajorClassCount(bandingTask.getId())
|
|
|
|
|
- .stream().collect(Collectors.toMap(IdCountVo::getId, IdCountVo::getCount));
|
|
|
|
|
|
|
+ List<IdCountVo> majorClassCountList = taskClassMapper.getMajorClassCount(bandingTask.getId());
|
|
|
|
|
+ Map<Long, Integer> majorClassCount = majorClassCountList.stream().collect(Collectors.toMap(IdCountVo::getId, IdCountVo::getCount));
|
|
|
//查询每个专业下面的班级人数
|
|
//查询每个专业下面的班级人数
|
|
|
Map<Long, Integer> majorClassStudentCount = taskClassMapper.getMajorClassStudentCount(bandingTask.getId())
|
|
Map<Long, Integer> majorClassStudentCount = taskClassMapper.getMajorClassStudentCount(bandingTask.getId())
|
|
|
.stream().collect(Collectors.toMap(IdCountVo::getId, IdCountVo::getCount));
|
|
.stream().collect(Collectors.toMap(IdCountVo::getId, IdCountVo::getCount));
|