@ -388,11 +388,11 @@ public class TeacherServiceImpl implements TeacherService {
do {
do {
if ( StringUtils . isNotEmpty ( teacherDto . getGrade ( ) ) ) {
if ( StringUtils . isNotEmpty ( teacherDto . getGrade ( ) ) ) {
slice = lessonRecordRepository . findAllByGrade ( String . format ( PK . PK_LESSON_RECORD , teacherDto . getCode ( ) ) , teacherDto . getGrade ( ) , teacherDto . getSubjectId ( ) , pageRequest) ;
slice = lessonRecordRepository . findAllByGrade ( String . format ( PK . PK_LESSON_RECORD , teacherDto . getCode ( ) ) , teacherDto . getGrade ( ) , teacherDto . getSubjectId ( ) , teacherDto. getPeriodId ( ) , pageRequest) ;
} else if ( StringUtils . isNotEmpty ( teacherDto . getTmdId ( ) ) ) {
} else if ( StringUtils . isNotEmpty ( teacherDto . getTmdId ( ) ) ) {
slice = lessonRecordRepository . findAllByAcademicYearId ( String . format ( PK . PK_LESSON_RECORD , teacherDto . getCode ( ) ) , teacherDto . getTmdId ( ) , teacherDto . getSubjectId ( ) , pageRequest) ;
slice = lessonRecordRepository . findAllByAcademicYearId ( String . format ( PK . PK_LESSON_RECORD , teacherDto . getCode ( ) ) , teacherDto . getTmdId ( ) , teacherDto . getSubjectId ( ) , teacherDto. getPeriodId ( ) , pageRequest) ;
} else {
} else {
slice = lessonRecordRepository . findAll ( String . format ( PK . PK_LESSON_RECORD , teacherDto . getCode ( ) ) , teacherDto . getSubjectId ( ) , pageRequest ) ;
slice = lessonRecordRepository . findAll ( String . format ( PK . PK_LESSON_RECORD , teacherDto . getCode ( ) ) , teacherDto . getSubjectId ( ) , teacherDto . getPeriodId ( ) , pageRequest ) ;
}
}
List < LessonRecord > content = slice . getContent ( ) ;
List < LessonRecord > content = slice . getContent ( ) ;
if ( ObjectUtils . isEmpty ( content ) ) {
if ( ObjectUtils . isEmpty ( content ) ) {
@ -437,7 +437,7 @@ public class TeacherServiceImpl implements TeacherService {
long startTimestamp = startDatetime . toInstant ( ZoneOffset . UTC ) . toEpochMilli ( ) ;
long startTimestamp = startDatetime . toInstant ( ZoneOffset . UTC ) . toEpochMilli ( ) ;
long endTimestamp = endDatetime . toInstant ( ZoneOffset . UTC ) . toEpochMilli ( ) ;
long endTimestamp = endDatetime . toInstant ( ZoneOffset . UTC ) . toEpochMilli ( ) ;
List < LessonRecord > lessonRecords = lessonRecordRepository . getLessonsByConditions ( String . format ( PK . PK_LESSON_RECORD , teacherDto . getCode ( ) ) , startTimestamp , endTimestamp , teacherDto . getSubjectId ( ) , teacherDto . getTmdId ( ) );
List < LessonRecord > lessonRecords = lessonRecordRepository . getLessonsByConditions ( String . format ( PK . PK_LESSON_RECORD , teacherDto . getCode ( ) ) , startTimestamp , endTimestamp , teacherDto . getSubjectId ( ) , teacherDto . getTmdId ( ) ,teacherDto . getPeriodId ( ) );
int [ ] counts = { 0 , 0 , 0 , 0 , 0 } ;
int [ ] counts = { 0 , 0 , 0 , 0 , 0 } ;
String [ ] keys = { "cooperation" , "internet" , "task" , "exam" , "diffential" } ;
String [ ] keys = { "cooperation" , "internet" , "task" , "exam" , "diffential" } ;
@ -746,7 +746,9 @@ public class TeacherServiceImpl implements TeacherService {
}
}
}
}
}
}
List < LessonRecord > lessonRecords = lessonRecordRepository . getLessonsByConditions ( String . format ( PK . PK_LESSON_RECORD , teacherDto . getCode ( ) ) , teacherDto . getStartTime ( ) , teacherDto . getEndTime ( ) , teacherDto . getSubjectId ( ) , teacherDto . getTmdId ( ) , teacherDto . getPeriodId ( ) ) ;
if ( teacherDto . getTmdId ( ) ! = null ) {
if ( teacherDto . getTmdId ( ) ! = null ) {
List < SugVo > sugVos = sugVoList . stream ( ) . filter ( sugVo - > sugVo . getHabook ( ) . equals ( teacherDto . getTmdId ( ) ) ) . collect ( Collectors . toList ( ) ) ;
List < SugVo > sugVos = sugVoList . stream ( ) . filter ( sugVo - > sugVo . getHabook ( ) . equals ( teacherDto . getTmdId ( ) ) ) . collect ( Collectors . toList ( ) ) ;
LinkedHashMap < String , Object > mapTeach = new LinkedHashMap < > ( ) ;
LinkedHashMap < String , Object > mapTeach = new LinkedHashMap < > ( ) ;
int [ ] scores = new int [ 5 ] ;
int [ ] scores = new int [ 5 ] ;
@ -767,6 +769,7 @@ public class TeacherServiceImpl implements TeacherService {
mapTeach . put ( "TAttendance" , scores [ 3 ] ) ;
mapTeach . put ( "TAttendance" , scores [ 3 ] ) ;
//T(数据)互动次数
//T(数据)互动次数
mapTeach . put ( "TInteraction" , scores [ 4 ] ) ;
mapTeach . put ( "TInteraction" , scores [ 4 ] ) ;
mapTeach . put ( "Lessons" , lessonRecords . size ( ) ) ;
return mapTeach ;
return mapTeach ;
} else if ( teacherDto . getGradeName ( ) ! = null ) {
} else if ( teacherDto . getGradeName ( ) ! = null ) {
@ -801,6 +804,7 @@ public class TeacherServiceImpl implements TeacherService {
mapTeach . put ( "TAttendance" , scores [ 3 ] ) ;
mapTeach . put ( "TAttendance" , scores [ 3 ] ) ;
//T(数据)互动次数
//T(数据)互动次数
mapTeach . put ( "TInteraction" , scores [ 4 ] ) ;
mapTeach . put ( "TInteraction" , scores [ 4 ] ) ;
mapTeach . put ( "Lessons" , lessonRecords . size ( ) ) ;
return mapTeach ;
return mapTeach ;
} else {
} else {
@ -823,6 +827,7 @@ public class TeacherServiceImpl implements TeacherService {
mapTeach . put ( "TAttendance" , scores [ 3 ] ) ;
mapTeach . put ( "TAttendance" , scores [ 3 ] ) ;
//T(数据)互动次数
//T(数据)互动次数
mapTeach . put ( "TInteraction" , scores [ 4 ] ) ;
mapTeach . put ( "TInteraction" , scores [ 4 ] ) ;
mapTeach . put ( "Lessons" , lessonRecords . size ( ) ) ;
return mapTeach ;
return mapTeach ;