|
@@ -129,10 +129,15 @@ public class TaskMarkResultStandardExportTemplete implements TaskExportTemplete
|
|
objectiveAnswerCacheBeanMap.forEach((k, v) -> {
|
|
objectiveAnswerCacheBeanMap.forEach((k, v) -> {
|
|
if (v != 6) {//套题暂不展现
|
|
if (v != 6) {//套题暂不展现
|
|
String title = QuestionTypeEnum.convertToTitle(v) + k;
|
|
String title = QuestionTypeEnum.convertToTitle(v) + k;
|
|
- ExcelDto excelAnswerDto = new ExcelDto(title + "作答");
|
|
|
|
- ExcelDto excelScoreDto = new ExcelDto(title + "得分");
|
|
|
|
- dynamicExcelHead.add(excelAnswerDto);
|
|
|
|
- dynamicExcelHead.add(excelScoreDto);
|
|
|
|
|
|
+ if (v >= 1 && v < 4) {
|
|
|
|
+ ExcelDto excelAnswerDto = new ExcelDto(title + "作答");
|
|
|
|
+ ExcelDto excelScoreDto = new ExcelDto(title + "得分");
|
|
|
|
+ dynamicExcelHead.add(excelAnswerDto);
|
|
|
|
+ dynamicExcelHead.add(excelScoreDto);
|
|
|
|
+ } else {
|
|
|
|
+ ExcelDto excelScoreDto = new ExcelDto(title + "得分");
|
|
|
|
+ dynamicExcelHead.add(excelScoreDto);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -152,6 +157,7 @@ public class TaskMarkResultStandardExportTemplete implements TaskExportTemplete
|
|
if (Objects.nonNull(structType)) {
|
|
if (Objects.nonNull(structType)) {
|
|
String title = QuestionTypeEnum.convertToTitle(structType) + questionsTitle;
|
|
String title = QuestionTypeEnum.convertToTitle(structType) + questionsTitle;
|
|
String answer = null;
|
|
String answer = null;
|
|
|
|
+ ExcelDto excelAnswerDto = null;
|
|
if (structType.intValue() == 1 || structType.intValue() == 2) {
|
|
if (structType.intValue() == 1 || structType.intValue() == 2) {
|
|
String string = s.getAnswer().replace("[", "").replace("]", "").replaceAll(" ", "").replaceAll("\n", "");
|
|
String string = s.getAnswer().replace("[", "").replace("]", "").replaceAll(" ", "").replaceAll("\n", "");
|
|
if (Objects.nonNull(string) && !Objects.equals(string, "")) {
|
|
if (Objects.nonNull(string) && !Objects.equals(string, "")) {
|
|
@@ -162,10 +168,11 @@ public class TaskMarkResultStandardExportTemplete implements TaskExportTemplete
|
|
}
|
|
}
|
|
answer = answerList.toString();
|
|
answer = answerList.toString();
|
|
}
|
|
}
|
|
|
|
+ excelAnswerDto = new ExcelDto(title + "作答", answer);
|
|
} else if (structType.intValue() == 3) {
|
|
} else if (structType.intValue() == 3) {
|
|
answer = AnswerTypeEnum.convertToTitle(s.getAnswer().replaceAll("\n", "").toUpperCase());
|
|
answer = AnswerTypeEnum.convertToTitle(s.getAnswer().replaceAll("\n", "").toUpperCase());
|
|
|
|
+ excelAnswerDto = new ExcelDto(title + "作答", answer);
|
|
}
|
|
}
|
|
- ExcelDto excelAnswerDto = new ExcelDto(title + "作答", answer);
|
|
|
|
ExcelDto excelScoreDto = new ExcelDto(title + "得分", Objects.nonNull(s.getScore()) ? String.valueOf(s.getScore()) : null);
|
|
ExcelDto excelScoreDto = new ExcelDto(title + "得分", Objects.nonNull(s.getScore()) ? String.valueOf(s.getScore()) : null);
|
|
List<ExcelDto> excelDtoList = null;
|
|
List<ExcelDto> excelDtoList = null;
|
|
if (!excelDtoMap.containsKey(m.getExamStudentId())) {
|
|
if (!excelDtoMap.containsKey(m.getExamStudentId())) {
|
|
@@ -248,7 +255,9 @@ public class TaskMarkResultStandardExportTemplete implements TaskExportTemplete
|
|
List<ExcelDto> excelDtoList = answerExcetDto.get(markResultStandardExportDto.getExamStudentId());
|
|
List<ExcelDto> excelDtoList = answerExcetDto.get(markResultStandardExportDto.getExamStudentId());
|
|
if (Objects.nonNull(excelDtoList) && excelDtoList.size() > 0) {
|
|
if (Objects.nonNull(excelDtoList) && excelDtoList.size() > 0) {
|
|
excelDtoList.forEach(s -> {
|
|
excelDtoList.forEach(s -> {
|
|
- taskExportCommon.createExcelCell(sxssfRow, position.get(s.getTitle()), s.getContent(), style);
|
|
|
|
|
|
+ if (Objects.nonNull(s) && Objects.nonNull(s.getTitle())) {
|
|
|
|
+ taskExportCommon.createExcelCell(sxssfRow, position.get(s.getTitle()), s.getContent(), style);
|
|
|
|
+ }
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|