|
@@ -29,10 +29,7 @@ import javax.annotation.Resource;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
-import java.util.Set;
|
|
|
|
|
|
+import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Stream;
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
@@ -232,6 +229,9 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public IPage<TBStudentReportResult> reportList(IPage<Map> iPage, Long schoolId, Long examId, Long collegeId, String courseCode, Long clazzId, Boolean absent) {
|
|
public IPage<TBStudentReportResult> reportList(IPage<Map> iPage, Long schoolId, Long examId, Long collegeId, String courseCode, Long clazzId, Boolean absent) {
|
|
|
|
+ if(schoolId == null){
|
|
|
|
+ schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
|
|
+ }
|
|
return tbExamStudentMapper.reportList(iPage, schoolId, examId, collegeId, courseCode, clazzId, absent);
|
|
return tbExamStudentMapper.reportList(iPage, schoolId, examId, collegeId, courseCode, clazzId, absent);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -244,6 +244,9 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public ReportResult reportResult(Long schoolId, String studentCode) {
|
|
public ReportResult reportResult(Long schoolId, String studentCode) {
|
|
|
|
+ if(schoolId == null){
|
|
|
|
+ schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
|
|
+ }
|
|
ReportResult reportResult = new ReportResult();
|
|
ReportResult reportResult = new ReportResult();
|
|
// 考生信息
|
|
// 考生信息
|
|
StudentInfo studentInfo = tbStudentMapper.getStudentBySchoolIdAndStudentCode(schoolId, studentCode);
|
|
StudentInfo studentInfo = tbStudentMapper.getStudentBySchoolIdAndStudentCode(schoolId, studentCode);
|
|
@@ -260,7 +263,10 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public PersonalReportResult reportMark(String schoolId, String studentCode, String examId, String courseCode) {
|
|
|
|
|
|
+ public PersonalReportResult reportMark(Long schoolId, String studentCode, String examId, String courseCode) {
|
|
|
|
+ if(schoolId == null){
|
|
|
|
+ schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
|
|
+ }
|
|
PersonalReportResult personalReportResult = new PersonalReportResult();
|
|
PersonalReportResult personalReportResult = new PersonalReportResult();
|
|
// 考生信息
|
|
// 考生信息
|
|
ExamStudentResult examStudentResult = buildExamStudentResult(schoolId, examId, studentCode, courseCode);
|
|
ExamStudentResult examStudentResult = buildExamStudentResult(schoolId, examId, studentCode, courseCode);
|
|
@@ -272,7 +278,7 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
|
|
return personalReportResult;
|
|
return personalReportResult;
|
|
}
|
|
}
|
|
|
|
|
|
- private CollegeResult buildCollegeResult(String schoolId, String examId, String studentCode, String courseCode) {
|
|
|
|
|
|
+ private CollegeResult buildCollegeResult(Long schoolId, String examId, String studentCode, String courseCode) {
|
|
CollegeResult collegeResult = new CollegeResult();
|
|
CollegeResult collegeResult = new CollegeResult();
|
|
// 综合信息
|
|
// 综合信息
|
|
SynthesisResult synthesisResult = taExamCourseRecordMapper.getSynthesisResult(schoolId, examId, studentCode, courseCode);
|
|
SynthesisResult synthesisResult = taExamCourseRecordMapper.getSynthesisResult(schoolId, examId, studentCode, courseCode);
|
|
@@ -289,7 +295,7 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
|
|
queryWrapper.lambda().eq(TBPaper::getExamId, examId).eq(TBPaper::getCourseCode, courseCode);
|
|
queryWrapper.lambda().eq(TBPaper::getExamId, examId).eq(TBPaper::getCourseCode, courseCode);
|
|
List<TBPaper> papers = tbPaperMapper.selectList(queryWrapper);
|
|
List<TBPaper> papers = tbPaperMapper.selectList(queryWrapper);
|
|
|
|
|
|
- if (examCourseRecords.size() != 1 || papers.size() != 1) {
|
|
|
|
|
|
+ if (examCourseRecords.size() != 1) {
|
|
throw ExceptionResultEnum.ERROR.exception("获取数据异常,应该有且仅有一条数据");
|
|
throw ExceptionResultEnum.ERROR.exception("获取数据异常,应该有且仅有一条数据");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -333,12 +339,12 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
|
|
QueryWrapper<TBModuleProficiency> moduleProficiencyQueryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<TBModuleProficiency> moduleProficiencyQueryWrapper = new QueryWrapper<>();
|
|
moduleProficiencyQueryWrapper.lambda().eq(TBModuleProficiency::getExamId, examId).eq(TBModuleProficiency::getCourseCode, courseCode).eq(TBModuleProficiency::getModuleType, moduleName);
|
|
moduleProficiencyQueryWrapper.lambda().eq(TBModuleProficiency::getExamId, examId).eq(TBModuleProficiency::getCourseCode, courseCode).eq(TBModuleProficiency::getModuleType, moduleName);
|
|
List<TBModuleProficiency> moduleProficiencies = tbModuleProficiencyMapper.selectList(moduleProficiencyQueryWrapper);
|
|
List<TBModuleProficiency> moduleProficiencies = tbModuleProficiencyMapper.selectList(moduleProficiencyQueryWrapper);
|
|
- List<TBModuleProficiency> moduleProficiencieTemps = moduleProficiencies.stream().flatMap(e -> {
|
|
|
|
- TBModuleProficiency tbModuleProficiency = new TBModuleProficiency();
|
|
|
|
- tbModuleProficiency.setExamId(e.getExamId());
|
|
|
|
- tbModuleProficiency.setCourseCode(e.getCourseCode());
|
|
|
|
- tbModuleProficiency.setModuleType(e.getModuleType());
|
|
|
|
- tbModuleProficiency.setInterpret(e.getInterpret());
|
|
|
|
|
|
+ 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("moduleType", e.getModuleType());
|
|
|
|
+ tbModuleProficiency.put("interpret", e.getInterpret());
|
|
return Stream.of(tbModuleProficiency);
|
|
return Stream.of(tbModuleProficiency);
|
|
}).distinct().collect(Collectors.toList());
|
|
}).distinct().collect(Collectors.toList());
|
|
|
|
|
|
@@ -346,11 +352,11 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
|
|
throw ExceptionResultEnum.ERROR.exception("获取数据异常,应该有且仅有一条数据");
|
|
throw ExceptionResultEnum.ERROR.exception("获取数据异常,应该有且仅有一条数据");
|
|
}
|
|
}
|
|
ModuleResult moduleResult = new ModuleResult();
|
|
ModuleResult moduleResult = new ModuleResult();
|
|
- TBModuleProficiency tbModuleProficiency = moduleProficiencieTemps.get(0);
|
|
|
|
- String info = tbModuleProficiency.getModuleType().concat(":").concat(tbModuleProficiency.getInterpret());
|
|
|
|
|
|
+ Map<String, String> tbModuleProficiency = moduleProficiencieTemps.get(0);
|
|
|
|
+ String info = tbModuleProficiency.get("moduleType").concat(":").concat(tbModuleProficiency.get("interpret"));
|
|
moduleResult.setInfo(info);
|
|
moduleResult.setInfo(info);
|
|
|
|
|
|
- List<ModuleDetailResult> dios = taExamCourseRecordDioMapper.listDiosBySchoolIdAndExamIdAndCourseCodeAndModuleName(schoolId, examId, courseCode, moduleName);
|
|
|
|
|
|
+ List<ModuleDetailResult> dios = taExamCourseRecordDioMapper.listDiosBySchoolIdAndExamIdAndCourseCodeAndModuleName(schoolId, examId, courseCode, moduleName, studentCode);
|
|
moduleResult.setDios(dios);
|
|
moduleResult.setDios(dios);
|
|
diagnosisDetailResult.setModules(moduleResult);
|
|
diagnosisDetailResult.setModules(moduleResult);
|
|
|
|
|
|
@@ -384,7 +390,7 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
|
|
return collegeResult;
|
|
return collegeResult;
|
|
}
|
|
}
|
|
|
|
|
|
- private ExamStudentResult buildExamStudentResult(String schoolId, String examId, String studentCode, String courseCode) {
|
|
|
|
|
|
+ private ExamStudentResult buildExamStudentResult(Long schoolId, String examId, String studentCode, String courseCode) {
|
|
ExamStudentResult examStudentResult = taExamCourseRecordMapper.getStudent(schoolId, examId, studentCode, courseCode);
|
|
ExamStudentResult examStudentResult = taExamCourseRecordMapper.getStudent(schoolId, examId, studentCode, courseCode);
|
|
if (examStudentResult != null) {
|
|
if (examStudentResult != null) {
|
|
QueryWrapper<TBCommonRankLevelConfig> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<TBCommonRankLevelConfig> queryWrapper = new QueryWrapper<>();
|