|
|
@@ -160,6 +160,16 @@ public class StudentReportRecordController {
|
|
|
if(dto.getTeacherId() == null){
|
|
|
dto.setTeacherId(StpUtil.getLoginIdAsLong());
|
|
|
}
|
|
|
+ if(dto.getGradeId() == null){
|
|
|
+ LambdaQueryWrapper<BaseGrade> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper
|
|
|
+ .orderByDesc(BaseGrade::getTitle)
|
|
|
+ .select(BaseGrade.class,x -> VoToColumnUtil.fieldsToColumns(BaseGrade.class).contains(x.getProperty()));
|
|
|
+ List<BaseGrade> gradeList = gradeService.list(queryWrapper);
|
|
|
+ if(!gradeList.isEmpty()){
|
|
|
+ dto.setGradeId(gradeList.get(0).getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
Page<StudentReportRecordPageVo> page = studentReportRecordService.getMobilePage(new Page<>(dto.getLimit(), dto.getSize()), dto);
|
|
|
PageOutput<StudentReportRecordPageVo> pageOutput = ConventPage.getPageOutput(page, StudentReportRecordPageVo.class);
|
|
|
return RT.ok(pageOutput);
|