|
@@ -430,13 +430,20 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
|
cell.setPaperType(null);
|
|
|
}
|
|
|
|
|
|
- Set<String> knowledgeDimensionSet = new HashSet<>();
|
|
|
+ Set<String> knowledgeDimensionSet = new HashSet<>(), abilityDimensionSet = new HashSet<>();
|
|
|
for (TBPaperStructResult cell : cellList) {
|
|
|
String knowledgeDimension = cell.getKnowledgeDimension();
|
|
|
String[] arr = knowledgeDimension.split(",");
|
|
|
knowledgeDimensionSet.addAll(Arrays.asList(arr));
|
|
|
+
|
|
|
+ if (Objects.nonNull(cell.getAbilityDimension())) {
|
|
|
+ String abilityDimension = cell.getAbilityDimension();
|
|
|
+ String[] arrAbilityDimension = abilityDimension.split(",");
|
|
|
+ abilityDimensionSet.addAll(Arrays.asList(arrAbilityDimension));
|
|
|
+ }
|
|
|
}
|
|
|
List<String> knowledgeDimensionSort = MathUtil.sortDimension(new ArrayList<>(knowledgeDimensionSet)); // 经过特殊排序的知识点集合
|
|
|
+ List<String> abilityDimensionSort = MathUtil.sortDimension(new ArrayList<>(abilityDimensionSet)); // 经过特殊排序的知识点集合
|
|
|
|
|
|
List<DimensionInfoResult> dimensionList = new ArrayList<>();
|
|
|
for (String dimensionCode : knowledgeDimensionSort) {
|
|
@@ -455,11 +462,29 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
|
} else {
|
|
|
dimensionName = nameTwoList.get(0);
|
|
|
}
|
|
|
-
|
|
|
dimensionList.add(new DimensionInfoResult(dimensionCode, dimensionName));
|
|
|
}
|
|
|
- questionList.add(new QuestionResult(paperType, cellList, dimensionList));
|
|
|
|
|
|
+ List<DimensionInfoResult> abilityDimensionList = new ArrayList<>();
|
|
|
+ for (String dimensionCode : abilityDimensionSort) {
|
|
|
+ String dimensionName = "";
|
|
|
+ List<String> nameTwoList = dimensionDataSource.stream()
|
|
|
+ .filter(e -> dimensionCode.equals(e.getCodeSecond()))
|
|
|
+ .map(e -> e.getNameSecond()).collect(Collectors.toList());
|
|
|
+ if (nameTwoList.size() < 1) {
|
|
|
+ List<String> tmpList = dimensionDataSource.stream()
|
|
|
+ .filter(e -> dimensionCode.equals(e.getCodePrimary()))
|
|
|
+ .map(e -> e.getNamePrimary()).collect(Collectors.toList());
|
|
|
+ if (tmpList.size() == 0) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ dimensionName = tmpList.get(0);
|
|
|
+ } else {
|
|
|
+ dimensionName = nameTwoList.get(0);
|
|
|
+ }
|
|
|
+ abilityDimensionList.add(new DimensionInfoResult(dimensionCode, dimensionName));
|
|
|
+ }
|
|
|
+ questionList.add(new QuestionResult(paperType, cellList, dimensionList, abilityDimensionList));
|
|
|
}
|
|
|
return new QuestionListResult(questionList);
|
|
|
}
|