|
@@ -231,7 +231,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
/*
|
|
|
学院信息
|
|
|
*/
|
|
|
- // TODO: 2021/6/7 考察学院数量算进去往届和缺考的吗
|
|
|
+ // TODO: 2021/6/7 考查学院数量算进去往届和缺考的吗
|
|
|
List<TBExamStudent> tbExamStudentList = tbExamStudentService.list(new QueryWrapper<TBExamStudent>().lambda()
|
|
|
.eq(TBExamStudent::getExamId, examId).eq(TBExamStudent::getCourseCode, effectiveCourseCode));
|
|
|
|
|
@@ -524,7 +524,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
List<TAExamCourseRecord> effectiveDatasource = dataSource.stream()
|
|
|
.filter(e -> effectiveCourseCode.equals(e.getCourseCode()) && !e.getAbsent() && e.getStudentCurrent()).collect(Collectors.toList());
|
|
|
|
|
|
- // 考察点数据源
|
|
|
+ // 考查点数据源
|
|
|
List<TBDimension> dimensionDatasource = tbDimensionService.list(new QueryWrapper<TBDimension>().lambda()
|
|
|
.eq(TBDimension::getExamId, examId)
|
|
|
.eq(TBDimension::getCourseCode, effectiveCourseCode));
|
|
@@ -568,20 +568,20 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
throw ExceptionResultEnum.ERROR.exception("试卷id为[" + paperId + "]的考生作答详细记录不存在");
|
|
|
}
|
|
|
|
|
|
- // 5.计算每个考察点所对应的题目集合
|
|
|
+ // 5.计算每个考查点所对应的题目集合
|
|
|
Map<String, List<TBPaperStruct>> pointToPaper = this.handlePointToPaper(dimensionDatasource, tbPaperStructList, examId, effectiveCourseCode);
|
|
|
|
|
|
// 计算每个模块对应的题目集合
|
|
|
Map<String, List<TBPaperStruct>> moduleToPaper = this.handleModuleToPaper(dimensionDatasource, tbPaperStructList, examId, effectiveCourseCode);
|
|
|
|
|
|
- // 6.计算每个考察点在此次考试所占分数
|
|
|
+ // 6.计算每个考查点在此次考试所占分数
|
|
|
Map<String, Object> everyPointTotalScore = this.handleEveryPointTotalScore(pointToPaper);
|
|
|
|
|
|
// 计算每个模块在此次考试中所占分数
|
|
|
Map<String, Object> everyModuleTotalScore = this.handleEveryPointTotalScore(moduleToPaper);
|
|
|
|
|
|
// TODO: 2021/6/7 数据组装
|
|
|
- // 7.计算每个考生各个考察点和考察模块得分率并更新't_a_exam_course_record_dio'表和't_a_exam_course_record_mod'表
|
|
|
+ // 7.计算每个考生各个考查点和考查模块得分率并更新't_a_exam_course_record_dio'表和't_a_exam_course_record_mod'表
|
|
|
List<TAExamCourseRecordDio> taExamCourseRecordDioList = new ArrayList<>();
|
|
|
List<TAExamCourseRecordMod> taExamCourseRecordModList = new ArrayList<>();
|
|
|
for (TAExamCourseRecord taExamCourseRecord : effectiveDatasource) {
|
|
@@ -593,22 +593,22 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
if (oneStudentAnswerDetailDataSource.size() == 0) {
|
|
|
continue; // 当AB卷时,examPaperTikDataSource还是整体数据,所以会匹配不到,匹配不到的说明不是本套试卷,因此匹配不到的不能处理。
|
|
|
}
|
|
|
- // 考察点得分率
|
|
|
- for (String s : pointToPaper.keySet()) { // 遍历考察知识点所对应的题目集合键值对
|
|
|
+ // 考查点得分率
|
|
|
+ for (String s : pointToPaper.keySet()) { // 遍历考查知识点所对应的题目集合键值对
|
|
|
List<TBPaperStruct> paperStructList = pointToPaper.get(s);
|
|
|
|
|
|
final String split = SystemConstant.HYPHEN;
|
|
|
Set<String> questionIndex = paperStructList
|
|
|
.stream()
|
|
|
.map(e -> e.getNumberType() + split + e.getBigQuestionNumber() + split + e.getSmallQuestionNumber())
|
|
|
- .collect(Collectors.toSet()); // 该考察点考察到的所有试题在试卷结构(paper)中'题号类型-大题号-小题号'组成的索引集合
|
|
|
+ .collect(Collectors.toSet()); // 该考查点考查到的所有试题在试卷结构(paper)中'题号类型-大题号-小题号'组成的索引集合
|
|
|
|
|
|
|
|
|
// 获取学生在该知识点的总得分
|
|
|
double studentScore = oneStudentAnswerDetailDataSource.stream()
|
|
|
.filter(e -> questionIndex.contains(e.getNumberType() + split + e.getMainNumber() + split + e.getSubNumber()))
|
|
|
.collect(Collectors.summarizingDouble(e -> e.getScore().doubleValue()))
|
|
|
- .getSum(); // 查找该考察点所考察的所有试题在试卷结构(paper)中的索引('题号类型-大题号-小题号')包含该学生每题答题记录的索引的答题记录信息,计算描述统计
|
|
|
+ .getSum(); // 查找该考查点所考查的所有试题在试卷结构(paper)中的索引('题号类型-大题号-小题号')包含该学生每题答题记录的索引的答题记录信息,计算描述统计
|
|
|
|
|
|
// 获取该知识点在试卷中的总得分
|
|
|
double totalScore = (double) everyPointTotalScore.get(s);
|
|
@@ -634,7 +634,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
taExamCourseRecordDio.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode).getName());
|
|
|
String[] dimCodeArr = s.split("-");
|
|
|
if (dimCodeArr.length != 2) {
|
|
|
- throw ExceptionResultEnum.ERROR.exception("获得的考察点标识不符合标准,标准为 type-dimensionCode,结果为: " + s);
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("获得的考查点标识不符合标准,标准为 type-dimensionCode,结果为: " + s);
|
|
|
}
|
|
|
String dimensionType = dimCodeArr[0];
|
|
|
String dimensionCode = dimCodeArr[1];
|
|
@@ -647,8 +647,8 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
taExamCourseRecordDio.setInspectCollegeName(inspectCollegeName);
|
|
|
taExamCourseRecordDioList.add(taExamCourseRecordDio);
|
|
|
}
|
|
|
- // 考察模块得分率
|
|
|
- for (String s : moduleToPaper.keySet()) { // 遍历考察模块对应的题目集合键值对
|
|
|
+ // 考查模块得分率
|
|
|
+ for (String s : moduleToPaper.keySet()) { // 遍历考查模块对应的题目集合键值对
|
|
|
List<TBPaperStruct> paperStructList = moduleToPaper.get(s);
|
|
|
|
|
|
final String split = SystemConstant.HYPHEN;
|
|
@@ -656,13 +656,13 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
Set<String> questionIndex = paperStructList
|
|
|
.stream()
|
|
|
.map(e -> e.getNumberType() + split + e.getBigQuestionNumber() + split + e.getSmallQuestionNumber())
|
|
|
- .collect(Collectors.toSet()); // 该考察点考察到的所有试题在试卷结构(paper)中'题号类型-大题号-小题号'组成的索引集合
|
|
|
+ .collect(Collectors.toSet()); // 该考查点考查到的所有试题在试卷结构(paper)中'题号类型-大题号-小题号'组成的索引集合
|
|
|
|
|
|
// 获取学生在该知识点的总得分
|
|
|
double studentScore = oneStudentAnswerDetailDataSource.stream()
|
|
|
.filter(e -> questionIndex.contains(e.getNumberType() + split + e.getMainNumber() + split + e.getSubNumber()))
|
|
|
.collect(Collectors.summarizingDouble(e -> e.getScore().doubleValue()))
|
|
|
- .getSum(); // 查找该考察点所考察的所有试题在试卷结构(paper)中的索引('题号类型-大题号-小题号')包含该学生每题答题记录的索引的答题记录信息,计算描述统计
|
|
|
+ .getSum(); // 查找该考查点所考查的所有试题在试卷结构(paper)中的索引('题号类型-大题号-小题号')包含该学生每题答题记录的索引的答题记录信息,计算描述统计
|
|
|
|
|
|
|
|
|
// 获取该知识点在试卷中的总得分
|
|
@@ -698,12 +698,12 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
taExamCourseRecordDioService.saveBatch(taExamCourseRecordDioList);
|
|
|
taExamCourseRecordModService.saveBatch(taExamCourseRecordModList);
|
|
|
|
|
|
- // 8.计算此次考试各个考察点得分率并插入't_a_exam_course_dio'表
|
|
|
+ // 8.计算此次考试各个考查点得分率并插入't_a_exam_course_dio'表
|
|
|
List<TAExamCourseDio> taExamCourseDioList = new ArrayList<>();
|
|
|
for (String s : everyPointTotalScore.keySet()) {
|
|
|
String[] dimCodeArr = s.split("-");
|
|
|
if (dimCodeArr.length != 2) {
|
|
|
- throw ExceptionResultEnum.ERROR.exception("获得的考察点标识不符合标准,标准为 type-dimensionCode,结果为: " + s);
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("获得的考查点标识不符合标准,标准为 type-dimensionCode,结果为: " + s);
|
|
|
}
|
|
|
String dimensionType = dimCodeArr[0];
|
|
|
String dimensionCode = dimCodeArr[1];
|
|
@@ -983,11 +983,11 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
List<TAExamCourseRecord> taExamCourseRecordList = taExamCourseRecordService.list(new QueryWrapper<TAExamCourseRecord>().lambda()
|
|
|
.eq(TAExamCourseRecord::getExamId, examId));
|
|
|
|
|
|
- //考察学院
|
|
|
+ //考查学院
|
|
|
// TODO: 2021/6/8 是否计算只有缺考的学院 是否计算只有往届的学院
|
|
|
List<Long> inspectCollegeInfo = taExamCourseRecordList.stream()
|
|
|
.map(TAExamCourseRecord::getInspectCollegeId).distinct().collect(Collectors.toList());
|
|
|
- // 考察学院数量
|
|
|
+ // 考查学院数量
|
|
|
int collegeCount = inspectCollegeInfo.size();
|
|
|
String inspectCollegeNames = "";
|
|
|
if (collegeCount > 0) {
|
|
@@ -995,7 +995,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
SysOrg college = sysOrgService.getById(inspectCollegeId);
|
|
|
inspectCollegeNames = inspectCollegeNames + college.getName() + "、";
|
|
|
}
|
|
|
- // 考察学院名称
|
|
|
+ // 考查学院名称
|
|
|
inspectCollegeNames = inspectCollegeNames.substring(0, inspectCollegeNames.length() - 1);
|
|
|
}
|
|
|
|
|
@@ -1063,14 +1063,14 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
.eq(TAExamCourseRecord::getExamId, examId)
|
|
|
.eq(TAExamCourseRecord::getCourseCode, effectiveCourseCode));
|
|
|
|
|
|
- // 考察学院
|
|
|
+ // 考查学院
|
|
|
Set<Long> inspectCollegeIdSet = dataSource.stream().map(TAExamCourseRecord::getInspectCollegeId).collect(Collectors.toSet());
|
|
|
|
|
|
|
|
|
for (Long inspectCollegeId : inspectCollegeIdSet) {
|
|
|
// 算教师排名用
|
|
|
List<TAExamCourseCollegeTeacher> rankTempList = new ArrayList<>();
|
|
|
- // 该考察学院维度下授课教师
|
|
|
+ // 该考查学院维度下授课教师
|
|
|
Set<Long> teacherIdSet = dataSource.stream()
|
|
|
.filter(e -> inspectCollegeId.equals(e.getInspectCollegeId()))
|
|
|
.map(TAExamCourseRecord::getTeacherId)
|
|
@@ -1355,7 +1355,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
|
|
|
//查询出该学生所在学院的全体学生在该科目的考试情况
|
|
|
List<TAExamCourseRecord> examRecordSameCol = taExamCourseRecordList.stream()
|
|
|
- .filter(e -> taExamCourseRecord.getInspectCollegeId().equals(e.getInspectCollegeId())).collect(Collectors.toList()); // 同考察学院考生数据
|
|
|
+ .filter(e -> taExamCourseRecord.getInspectCollegeId().equals(e.getInspectCollegeId())).collect(Collectors.toList()); // 同考查学院考生数据
|
|
|
|
|
|
//计算超过学院百分比
|
|
|
double lowCount = examRecordSameCol.stream().filter(e -> e.getAssignedScore().compareTo(taExamCourseRecord.getAssignedScore()) < 0).count();
|
|
@@ -1415,14 +1415,14 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 计算每个考察点所对应的该考试所有题目信息集合(如果要仅记录本次考试匹配到的考察点,那么要判断只有当paperList.size() > 0的结果才put进Map键值对)
|
|
|
+ * 计算每个考查点所对应的该考试所有题目信息集合(如果要仅记录本次考试匹配到的考查点,那么要判断只有当paperList.size() > 0的结果才put进Map键值对)
|
|
|
* 通过模块枚举类进行匹配,可以在枚举类横向扩展维度但要和paper表结构对应
|
|
|
*
|
|
|
* @param dimensionDatasource 知识点数据源
|
|
|
* @param tbPaperStructList 试卷结构数据源
|
|
|
* @param examId 考试id
|
|
|
* @param courseCode 课程编号
|
|
|
- * @return 键值对 (类型-考察点 -> 考察此考察点的题目信息集合) 例如 :”知识模块-A“,List<>
|
|
|
+ * @return 键值对 (类型-考查点 -> 考查此考查点的题目信息集合) 例如 :”知识模块-A“,List<>
|
|
|
*/
|
|
|
private Map<String, List<TBPaperStruct>> handlePointToPaper(List<TBDimension> dimensionDatasource, List<TBPaperStruct> tbPaperStructList, Long examId, String courseCode) throws NoSuchFieldException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
|
|
|
Map<String, List<TBPaperStruct>> pointToPaper = new HashMap<>();
|
|
@@ -1435,27 +1435,27 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
|
|
|
for (TBModuleConfig value : tbModuleConfigList) {
|
|
|
|
|
|
- //每个考察点所对应的题目集合
|
|
|
+ //每个考查点所对应的题目集合
|
|
|
List<TBDimension> pointList = dimensionDatasource
|
|
|
- .stream().filter(e -> value.getModuleType().equals(e.getDimensionType())).collect(Collectors.toList()); //对应某个模块的考察点集合
|
|
|
+ .stream().filter(e -> value.getModuleType().equals(e.getDimensionType())).collect(Collectors.toList()); //对应某个模块的考查点集合
|
|
|
|
|
|
- Set<String> keysOne = pointList.stream().map(TBDimension::getCodePrimary).collect(Collectors.toSet()); //考察点一级维度不重复的code集合
|
|
|
- Set<String> keysTwo = pointList.stream().map(TBDimension::getCodeSecond).collect(Collectors.toSet()); //考察点二级维度不重复的code集合
|
|
|
+ Set<String> keysOne = pointList.stream().map(TBDimension::getCodePrimary).collect(Collectors.toSet()); //考查点一级维度不重复的code集合
|
|
|
+ Set<String> keysTwo = pointList.stream().map(TBDimension::getCodeSecond).collect(Collectors.toSet()); //考查点二级维度不重复的code集合
|
|
|
|
|
|
for (String tmpOne : keysOne) {
|
|
|
List<TBPaperStruct> paperStructList = new ArrayList<>();
|
|
|
for (TBPaperStruct paperStruct : tbPaperStructList) {
|
|
|
Field field = paperStruct.getClass().getDeclaredField(value.getAttribute()); //获取该模块对应试卷结构中的属性
|
|
|
Method getMethod = paperStruct.getClass().getDeclaredMethod("get" + ConversionUtils.initCap(field.getName())); //获取该属性的get方法
|
|
|
- String dimensions = (String) getMethod.invoke(paperStruct); //调用该属性的get方法获取改题目的考察点
|
|
|
+ String dimensions = (String) getMethod.invoke(paperStruct); //调用该属性的get方法获取改题目的考查点
|
|
|
if (dimensions != null && dimensions.length() > 0) {
|
|
|
if (dimensions.contains(tmpOne)) {
|
|
|
- paperStructList.add(paperStruct); //如果该题目包含考察点,则记录该题目
|
|
|
+ paperStructList.add(paperStruct); //如果该题目包含考查点,则记录该题目
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (paperStructList.size() > 0) {
|
|
|
- // 只记录试卷结构中出现的考察点包含的题目
|
|
|
+ // 只记录试卷结构中出现的考查点包含的题目
|
|
|
pointToPaper.put(value.getModuleType() + "-" + tmpOne, paperStructList);
|
|
|
}
|
|
|
}
|
|
@@ -1473,7 +1473,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
}
|
|
|
}
|
|
|
if (paperStructList.size() > 0) {
|
|
|
- // 只记录试卷结构中出现的考察点包含的题目
|
|
|
+ // 只记录试卷结构中出现的考查点包含的题目
|
|
|
pointToPaper.put(value.getModuleType() + "-" + tmpTwo, paperStructList);
|
|
|
}
|
|
|
}
|
|
@@ -1482,13 +1482,13 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 计算每个考察模块对应的题目集合
|
|
|
+ * 计算每个考查模块对应的题目集合
|
|
|
*
|
|
|
* @param dimensionDatasource 知识点数据源
|
|
|
* @param tbPaperStructList 试卷结构数据源
|
|
|
* @param examId 考试id
|
|
|
* @param courseCode 课程编号
|
|
|
- * @return 键值对 (考察模块 -> 考察此考模块的题目信息集合) 例如 :”知识模块“,List<>
|
|
|
+ * @return 键值对 (考查模块 -> 考查此考模块的题目信息集合) 例如 :”知识模块“,List<>
|
|
|
* @throws Exception 反射异常
|
|
|
*/
|
|
|
private Map<String, List<TBPaperStruct>> handleModuleToPaper(List<TBDimension> dimensionDatasource, List<TBPaperStruct> tbPaperStructList, Long examId, String courseCode) throws Exception {
|
|
@@ -1524,11 +1524,11 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 计算每个模块或考察点在该考试中的分数
|
|
|
+ * 计算每个模块或考查点在该考试中的分数
|
|
|
* (其实就是计算试题集合总分)
|
|
|
*
|
|
|
- * @param questionMap 考察点或模块对应的题目信息集合
|
|
|
- * @return 键值对 (考察点 -> 该考察点在此次考试所占分数) 例如 :”知识模块-A“,46.0000、(模块 -> 该考察点在此次考试所占分数) 例如 :”能力模块“,75.0000
|
|
|
+ * @param questionMap 考查点或模块对应的题目信息集合
|
|
|
+ * @return 键值对 (考查点 -> 该考查点在此次考试所占分数) 例如 :”知识模块-A“,46.0000、(模块 -> 该考查点在此次考试所占分数) 例如 :”能力模块“,75.0000
|
|
|
*/
|
|
|
private Map<String, Object> handleEveryPointTotalScore(Map<String, List<TBPaperStruct>> questionMap) {
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
@@ -1541,11 +1541,11 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 根据考察点得分率计算该考察点的熟练度
|
|
|
+ * 根据考查点得分率计算该考查点的熟练度
|
|
|
*
|
|
|
* @param examId 考试id
|
|
|
* @param courseCode 课程编号
|
|
|
- * @param dimensionType 考察点类型
|
|
|
+ * @param dimensionType 考查点类型
|
|
|
* @param value 得分率
|
|
|
* @return 熟练度等级
|
|
|
*/
|