|
@@ -9,6 +9,7 @@ import com.qmth.themis.business.annotation.ExcelDynamicExport;
|
|
|
import com.qmth.themis.business.annotation.ExcelNotExport;
|
|
|
import com.qmth.themis.business.annotation.ExcelNote;
|
|
|
import com.qmth.themis.business.cache.bean.ExamCacheBean;
|
|
|
+import com.qmth.themis.business.cache.bean.ExamPaperCacheBean;
|
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
|
import com.qmth.themis.business.dto.ExcelDto;
|
|
|
import com.qmth.themis.business.dto.MarkResultSimpleExportDto;
|
|
@@ -128,10 +129,14 @@ public class TaskMarkResultStandardExportTemplete implements TaskExportTemplete
|
|
|
TOeExamRecord tOeExamRecord = tOeExamRecordService
|
|
|
.findMarkResult(markResultDto, examCacheBean.getRecordSelectStrategy());
|
|
|
if (Objects.nonNull(tOeExamRecord)) {
|
|
|
+ ExamPaperCacheBean examPaperCacheBean = teExamPaperService.getExamPaperCacheBean(tOeExamRecord.getPaperId());
|
|
|
examRecordIdsSet.add(String.valueOf(tOeExamRecord.getId()));
|
|
|
markResultSimpleExportDto.setObjectiveScore(Objects.isNull(tOeExamRecord.getObjectiveScore()) ? "0" : String.valueOf(tOeExamRecord.getObjectiveScore()));
|
|
|
markResultSimpleExportDto.setRecordId(tOeExamRecord.getId());
|
|
|
markResultSimpleExportDto.setPaperId(tOeExamRecord.getPaperId());
|
|
|
+ if (Objects.nonNull(examPaperCacheBean)) {
|
|
|
+ markResultSimpleExportDto.setPaperName(examPaperCacheBean.getName());
|
|
|
+ }
|
|
|
markResultSimpleExportDto.setSubjectiveScore(Objects.isNull(markResultSimpleExportDto.getSubjectiveScore()) ? "0" : String.valueOf(markResultSimpleExportDto.getSubjectiveScore()));
|
|
|
markResultSimpleExportDto.setSumScore(String.valueOf(Double.parseDouble(markResultSimpleExportDto.getObjectiveScore()) + Double.parseDouble(markResultSimpleExportDto.getSubjectiveScore())));
|
|
|
}
|
|
@@ -363,7 +368,7 @@ public class TaskMarkResultStandardExportTemplete implements TaskExportTemplete
|
|
|
byte[] bookByteAry = out.toByteArray();
|
|
|
inputStream = new ByteArrayInputStream(bookByteAry);
|
|
|
StringBuilder stringBuilder = new StringBuilder(excelSj.toString());
|
|
|
- File finalFile = new File(stringBuilder.append(File.separator).append(markResultStandardExportDtoTempList.get(0).getCourseName() + "_" + markResultStandardExportDtoTempList.get(0).getCourseCode()).append(SystemConstant.EXCEL_PREFIX).toString());
|
|
|
+ File finalFile = new File(stringBuilder.append(File.separator).append(markResultStandardExportDtoTempList.get(0).getPaperId() + "_" + markResultStandardExportDtoTempList.get(0).getPaperName() + "_" + markResultStandardExportDtoTempList.get(0).getCourseName() + "_" + markResultStandardExportDtoTempList.get(0).getCourseCode()).append(SystemConstant.EXCEL_PREFIX).toString());
|
|
|
if (!finalFile.exists()) {
|
|
|
finalFile.getParentFile().mkdirs();
|
|
|
finalFile.createNewFile();
|
|
@@ -409,11 +414,11 @@ public class TaskMarkResultStandardExportTemplete implements TaskExportTemplete
|
|
|
taskExportCommon.getTxtList().removeAll(taskExportCommon.getTxtList().subList(1, taskExportCommon.getTxtList().size()));
|
|
|
taskExportCommon.getTxtList().add(DateUtil.format(new Date(), Constants.DEFAULT_DATE_PATTERN) + "->数据导出完毕," + taskExportCommon.getTbTaskHistory().getSummary());
|
|
|
taskExportCommon.writeExportResultTxt(stringJoiner.toString(), taskExportCommon.getTxtList().toString(), zipPath);
|
|
|
- if (Objects.nonNull(files)) {
|
|
|
- for (File file : files) {
|
|
|
- file.delete();
|
|
|
- }
|
|
|
- }
|
|
|
+// if (Objects.nonNull(files)) {
|
|
|
+// for (File file : files) {
|
|
|
+// file.delete();
|
|
|
+// }
|
|
|
+// }
|
|
|
}
|
|
|
return ResultUtil.ok(true);
|
|
|
}
|