|
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.google.common.collect.Lists;
|
|
|
+import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
|
import com.qmth.teachcloud.common.entity.BasicCourse;
|
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
|
import com.qmth.teachcloud.common.service.BasicCourseService;
|
|
@@ -21,6 +22,7 @@ import com.qmth.teachcloud.report.business.mapper.*;
|
|
|
import com.qmth.teachcloud.report.business.service.TBExamStudentService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.cache.annotation.Cacheable;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.LinkedMultiValueMap;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
@@ -229,7 +231,7 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
|
|
|
*/
|
|
|
@Override
|
|
|
public IPage<TBStudentReportResult> reportList(IPage<Map> iPage, Long schoolId, Long examId, Long collegeId, String courseCode, Long clazzId, Boolean absent) {
|
|
|
- if(schoolId == null){
|
|
|
+ if (schoolId == null) {
|
|
|
schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
|
}
|
|
|
return tbExamStudentMapper.reportList(iPage, schoolId, examId, collegeId, courseCode, clazzId, absent);
|
|
@@ -244,7 +246,7 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
|
|
|
*/
|
|
|
@Override
|
|
|
public ReportResult reportResult(Long schoolId, String studentCode) {
|
|
|
- if(schoolId == null){
|
|
|
+ if (schoolId == null) {
|
|
|
schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
|
}
|
|
|
ReportResult reportResult = new ReportResult();
|
|
@@ -263,8 +265,9 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Cacheable(value = SystemConstant.EXAM_STUDENT_REPORT, key = "#schoolId + '-' + #studentCode + '-' + #examId + '-' + #courseCode")
|
|
|
public PersonalReportResult reportMark(Long schoolId, String studentCode, String examId, String courseCode) {
|
|
|
- if(schoolId == null){
|
|
|
+ if (schoolId == null) {
|
|
|
schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
|
}
|
|
|
PersonalReportResult personalReportResult = new PersonalReportResult();
|
|
@@ -341,8 +344,8 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
|
|
|
List<TBModuleProficiency> moduleProficiencies = tbModuleProficiencyMapper.selectList(moduleProficiencyQueryWrapper);
|
|
|
List<Map<String, String>> moduleProficiencieTemps = moduleProficiencies.stream().flatMap(e -> {
|
|
|
Map<String, String> tbModuleProficiency = new HashMap();
|
|
|
- tbModuleProficiency.put("examId",e.getExamId().toString());
|
|
|
- tbModuleProficiency.put("courseCode",e.getCourseCode());
|
|
|
+ tbModuleProficiency.put("examId", e.getExamId().toString());
|
|
|
+ tbModuleProficiency.put("courseCode", e.getCourseCode());
|
|
|
tbModuleProficiency.put("moduleType", e.getModuleType());
|
|
|
tbModuleProficiency.put("interpret", e.getInterpret());
|
|
|
return Stream.of(tbModuleProficiency);
|