|
@@ -444,12 +444,12 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
for (StudentExtracurricularExercisesSituation result : results) {
|
|
|
if(codeServeMap.containsKey(result.getStuAndTeaCode())){
|
|
|
StudentExtracurricularExercisesSituation s = codeServeMap.get(result.getStuAndTeaCode());
|
|
|
- List<Long> courseIds = new ArrayList<>();
|
|
|
+ Set<Long> courseIds = new HashSet<>();
|
|
|
if(StringUtils.isNotBlank(s.getCourseIds())&&s.getActualExercisesNum()>0){
|
|
|
- courseIds = Arrays.stream(s.getCourseIds().split(",")).map(id->Long.valueOf(id)).collect(Collectors.toList());
|
|
|
+ courseIds = Arrays.stream(s.getCourseIds().split(",")).map(id->Long.valueOf(id)).collect(Collectors.toSet());
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(result.getCourseIds())){
|
|
|
- courseIds.addAll(Arrays.stream(result.getCourseIds().split(",")).map(id->Long.valueOf(id)).collect(Collectors.toList()));
|
|
|
+ courseIds.addAll(Arrays.stream(result.getCourseIds().split(",")).map(id->Long.valueOf(id)).collect(Collectors.toSet()));
|
|
|
}
|
|
|
s.setServeType(result.getServeType());
|
|
|
if(s.getServeType().equals("HOMEWORK")){
|
|
@@ -527,7 +527,7 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
|
|
|
for (StudentExtracurricularExercisesSituation weekServiceWithStudent : weekServiceWithStudents) {
|
|
|
List<StudentServeCourseHomeworkDto> studentHomeworks = studentHomeworkMap.get(weekServiceWithStudent.getStudentId());
|
|
|
- if(!CollectionUtils.isEmpty(studentHomeworks)){
|
|
|
+ if(!CollectionUtils.isEmpty(studentHomeworks)&&weekServiceWithStudent.getServeType().equals("HOMEWORK")){
|
|
|
weekServiceWithStudent.setActualExercisesNum(1);
|
|
|
long replyNum = studentHomeworks.stream().filter(e -> YesOrNoEnum.YES.equals(e.getStatus())).count();
|
|
|
weekServiceWithStudent.setExercisesReplyNum(replyNum>0?1:0);
|
|
@@ -555,7 +555,7 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
}
|
|
|
|
|
|
List<ExtracurricularExercisesReply> studentExercises = studentExercisesMap.get(weekServiceWithStudent.getStudentId());
|
|
|
- if(!CollectionUtils.isEmpty(studentExercises)){
|
|
|
+ if(!CollectionUtils.isEmpty(studentExercises)&&weekServiceWithStudent.getServeType().equals("EXERCISE")){
|
|
|
weekServiceWithStudent.setActualExercisesNum(1);
|
|
|
long replyNum = studentExercises.stream().filter(e -> e.getStatus()==1).count();
|
|
|
if(weekServiceWithStudent.getExercisesReplyNum()<=0){
|