|
@@ -369,6 +369,24 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
|
|
|
dimensionResult.setDioFullScore(taExamCourseRecordMod.getFullScore().setScale(1, BigDecimal.ROUND_HALF_UP));
|
|
|
|
|
|
List<DimensionDetailResult> subDios = taExamCourseRecordDioMapper.listSubDiosBySchoolIdAndExamIdAndStudentCodeAndCourseCodeAndModuleName(schoolId, examId, studentCode, courseCode, moduleName);
|
|
|
+ // 按二级维度code排序
|
|
|
+ Collections.sort(subDios, new Comparator<DimensionDetailResult>() {
|
|
|
+ @Override
|
|
|
+ public int compare(DimensionDetailResult o1, DimensionDetailResult o2) {
|
|
|
+ String o1StringPart = o1.getCode().replaceAll("\\d","");
|
|
|
+ String o2StringPart = o2.getCode().replaceAll("\\d","");
|
|
|
+ if(o1StringPart.equalsIgnoreCase(o2StringPart))
|
|
|
+ {
|
|
|
+ return extractInt(o1.getCode()) - extractInt(o2.getCode());
|
|
|
+ }
|
|
|
+ return o1.getCode().compareTo(o2.getCode());
|
|
|
+ }
|
|
|
+ int extractInt(String s) {
|
|
|
+ String num = s.replaceAll("\\D","");
|
|
|
+ return num.isEmpty() ? 0 : Integer.parseInt(num);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
dimensionResult.setSubDios(subDios);
|
|
|
|
|
|
List<DimensionMasterysResult> dimensionMasterysResults = new ArrayList<>();
|