update 课列内容

develop
hhb@hotmail.com 4 months ago
parent c8089b9a99
commit 0928fd045a

@ -437,7 +437,7 @@ public class TeacherServiceImpl implements TeacherService {
long startTimestamp = startDatetime.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(),teacherDto.getPeriodId());
List<LessonRecord> lessonRecords = lessonRecordRepository.getLessonsByConditions(String.format(PK.PK_LESSON_RECORD, teacherDto.getCode()), startTimestamp, endTimestamp, teacherDto.getSubjectId(),teacherDto.getTmdId(),teacherDto.getGrade(),teacherDto.getPeriodId());
int[] counts = {0, 0, 0, 0, 0};
String[] keys = {"cooperation", "internet", "task", "exam", "diffential"};
@ -746,7 +746,7 @@ 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());
List<LessonRecord> lessonRecords = lessonRecordRepository.getLessonsByConditions(String.format(PK.PK_LESSON_RECORD, teacherDto.getCode()), teacherDto.getStartTime(), teacherDto.getEndTime(), teacherDto.getSubjectId(),teacherDto.getTmdId(),teacherDto.getGrade(),teacherDto.getPeriodId());
if(teacherDto.getTmdId() != null) {
List<SugVo> sugVos = sugVoList.stream().filter(sugVo -> sugVo.getHabook().equals(teacherDto.getTmdId())).collect(Collectors.toList());

@ -16,11 +16,12 @@ public interface LessonRecordRepository extends CosmosRepository<LessonRecord, S
"c.code = @code and " +
"(IS_NULL(@startTime) or c.startTime >= @startTime) and " +
"(IS_NULL(@endTime) or c.startTime <= @endTime) and "+
"(IS_NULL(@grade) or array_contains(c.grade,@grade) and " +
"c.status<>404 and "+
"c.periodId = @periodId and "+
"(IS_NULL(@subjectId) or c.subjectId = @subjectId) and"+
"(IS_NULL(@tmdId) or c.tmdId = @tmdId) ")
List<LessonRecord> getLessonsByConditions(String code, Long startTime, Long endTime,String subjectId,String tmdId,String periodId);
List<LessonRecord> getLessonsByConditions(String code, Long startTime, Long endTime,String subjectId,String tmdId,String grade,String periodId);
@Query("select * from LessonRecord as c where c.code = @code and c.expire<=0 and c.status<>404 and c.tmdid = @tmdId and c.periodId = @periodId and" +

Loading…
Cancel
Save