|
@@ -518,7 +518,7 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
Set<String> courseIds = Arrays.stream(weekServiceWithStudent.getCourseIds().split(",")).collect(Collectors.toSet());
|
|
|
List<StudentServeCourseHomeworkDto> studentHomeworks = studentAllHomeworks.stream().filter(s -> courseIds.contains(s.getCourseScheduleId().toString())).collect(Collectors.toList());
|
|
|
if(!CollectionUtils.isEmpty(studentHomeworks)){
|
|
|
- weekServiceWithStudent.setActualExercisesNum(1);
|
|
|
+ weekServiceWithStudent.setActualExercisesNum(studentHomeworks.size()>weekServiceWithStudent.getExpectExercisesNum()?weekServiceWithStudent.getExpectExercisesNum():studentHomeworks.size());
|
|
|
long replyNum = studentHomeworks.stream().filter(e -> YesOrNoEnum.YES.equals(e.getStatus())).count();
|
|
|
weekServiceWithStudent.setExercisesReplyNum(replyNum>0?1:0);
|
|
|
long haveSubmitTimes = studentHomeworks.stream().filter(e -> Objects.nonNull(e.getSubmitTime())).count();
|
|
@@ -549,7 +549,7 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
if(!CollectionUtils.isEmpty(studentAllExercises)&&weekServiceWithStudent.getServeType().equals("EXERCISE")){
|
|
|
List<ExtracurricularExercisesReply> studentExercises = studentAllExercises.stream().filter(s -> weekServiceWithStudent.getTeacherId().equals(s.getExtracurricularExercises().getTeacherId())).collect(Collectors.toList());
|
|
|
if(!CollectionUtils.isEmpty(studentExercises)){
|
|
|
- weekServiceWithStudent.setActualExercisesNum(1);
|
|
|
+ weekServiceWithStudent.setActualExercisesNum(studentExercises.size()>weekServiceWithStudent.getExpectExercisesNum()?weekServiceWithStudent.getExpectExercisesNum():studentExercises.size());
|
|
|
long replyNum = studentExercises.stream().filter(e -> e.getStatus()==1).count();
|
|
|
if(weekServiceWithStudent.getExercisesReplyNum()<=0){
|
|
|
weekServiceWithStudent.setExercisesReplyNum(replyNum>0?1:0);
|
|
@@ -710,7 +710,7 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
Set<String> courseIds = Arrays.stream(weekServiceWithStudent.getCourseIds().split(",")).collect(Collectors.toSet());
|
|
|
List<StudentServeCourseHomeworkDto> studentHomeworks = studentAllHomeworks.stream().filter(s -> courseIds.contains(s.getCourseScheduleId())).collect(Collectors.toList());
|
|
|
if(!CollectionUtils.isEmpty(studentHomeworks)){
|
|
|
- weekServiceWithStudent.setActualExercisesNum(1);
|
|
|
+ weekServiceWithStudent.setActualExercisesNum(studentHomeworks.size()>weekServiceWithStudent.getExpectExercisesNum()?weekServiceWithStudent.getExpectExercisesNum():studentHomeworks.size());
|
|
|
long replyNum = studentHomeworks.stream().filter(e -> YesOrNoEnum.YES.equals(e.getStatus())).count();
|
|
|
weekServiceWithStudent.setExercisesReplyNum(replyNum>0?1:0);
|
|
|
long haveSubmitTimes = studentHomeworks.stream().filter(e -> Objects.nonNull(e.getSubmitTime())).count();
|
|
@@ -741,7 +741,7 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
if(!CollectionUtils.isEmpty(studentAllExercises)&&weekServiceWithStudent.getServeType().equals("EXERCISE")){
|
|
|
List<ExtracurricularExercisesReply> studentExercises = studentAllExercises.stream().filter(s -> weekServiceWithStudent.getTeacherId().equals(s.getExtracurricularExercises().getTeacherId())).collect(Collectors.toList());
|
|
|
if(!CollectionUtils.isEmpty(studentExercises)){
|
|
|
- weekServiceWithStudent.setActualExercisesNum(1);
|
|
|
+ weekServiceWithStudent.setActualExercisesNum(studentExercises.size()>weekServiceWithStudent.getExpectExercisesNum()?weekServiceWithStudent.getExpectExercisesNum():studentExercises.size());
|
|
|
long replyNum = studentExercises.stream().filter(e -> e.getStatus()==1).count();
|
|
|
if(weekServiceWithStudent.getExercisesReplyNum()<=0){
|
|
|
weekServiceWithStudent.setExercisesReplyNum(replyNum>0?1:0);
|