|
@@ -25,7 +25,6 @@ import org.springframework.context.annotation.Lazy;
|
|
import org.springframework.context.annotation.Scope;
|
|
import org.springframework.context.annotation.Scope;
|
|
import org.springframework.context.annotation.ScopedProxyMode;
|
|
import org.springframework.context.annotation.ScopedProxyMode;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
-import org.springframework.util.CollectionUtils;
|
|
|
|
import org.springframework.util.LinkedMultiValueMap;
|
|
import org.springframework.util.LinkedMultiValueMap;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
@@ -116,22 +115,35 @@ public class ExamPaperTempServiceImpl extends ServiceImpl<ExamPaperTempDao, Exam
|
|
UnZipUtils.doUnZip(paperAnswerTarget, answerDir, paperAnswerTarget.getParent());
|
|
UnZipUtils.doUnZip(paperAnswerTarget, answerDir, paperAnswerTarget.getParent());
|
|
deletePaths.add(answerDir.getAbsolutePath());
|
|
deletePaths.add(answerDir.getAbsolutePath());
|
|
|
|
|
|
- Map<String, Object> map = new LinkedHashMap<>();
|
|
|
|
- map = SystemConstant.getFileDirectoryCount(answerDir, map);
|
|
|
|
|
|
+// Map<String, Object> map = new LinkedHashMap<>();
|
|
|
|
+// map = SystemConstant.getFileDirectoryCount(answerDir, map);
|
|
|
|
|
|
- File finalAnswerDir = null;
|
|
|
|
- if (!CollectionUtils.isEmpty(map)) {
|
|
|
|
- for (Map.Entry<String, Object> entry : map.entrySet()) {
|
|
|
|
- if (!Objects.equals(entry.getKey(), "fileDirectoryCount")) {
|
|
|
|
- finalAnswerDir = new File((String) entry.getValue());
|
|
|
|
- if (finalAnswerDir.getAbsolutePath().endsWith("answer")) {
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- finalAnswerDir = answerDir;
|
|
|
|
- }
|
|
|
|
|
|
+// File finalAnswerDir = answerDir;
|
|
|
|
+// if (!CollectionUtils.isEmpty(map)) {
|
|
|
|
+// for (Map.Entry<String, Object> entry : map.entrySet()) {
|
|
|
|
+// if (!Objects.equals(entry.getKey(), "fileDirectoryCount")) {
|
|
|
|
+// finalAnswerDir = new File((String) entry.getValue());
|
|
|
|
+// if (finalAnswerDir.getAbsolutePath().endsWith("answer")) {
|
|
|
|
+// break;
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// } else {
|
|
|
|
+// finalAnswerDir = answerDir;
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+// File finalAnswerDir = null;
|
|
|
|
+// if (!CollectionUtils.isEmpty(map)) {
|
|
|
|
+// log.info("fileDirectoryCount:{}", JacksonUtil.parseJson(map));
|
|
|
|
+// int fileDirectoryCount = (int) map.get("fileDirectoryCount");
|
|
|
|
+// if (fileDirectoryCount == 3) {
|
|
|
|
+// finalAnswerDir = new File((String) map.get("1"));
|
|
|
|
+// } else if (fileDirectoryCount == 4) {
|
|
|
|
+// finalAnswerDir = new File((String) map.get("2"));
|
|
|
|
+// }
|
|
|
|
+// } else {
|
|
|
|
+// finalAnswerDir = answerDir;
|
|
|
|
+// }
|
|
|
|
|
|
//获取开卷密码
|
|
//获取开卷密码
|
|
List<ExamPaperUncoiling> examPaperUncoilingList = kwService.queryExamPaperUncoiling(new ExamPaperUncoilingParams(examCode));
|
|
List<ExamPaperUncoiling> examPaperUncoilingList = kwService.queryExamPaperUncoiling(new ExamPaperUncoilingParams(examCode));
|
|
@@ -145,7 +157,7 @@ public class ExamPaperTempServiceImpl extends ServiceImpl<ExamPaperTempDao, Exam
|
|
Map<String, File> finalMapFile = mapFile;
|
|
Map<String, File> finalMapFile = mapFile;
|
|
paperAnswerFile = Objects.isNull(paperAnswerFile) ? new ArrayList<>() : paperAnswerFile;
|
|
paperAnswerFile = Objects.isNull(paperAnswerFile) ? new ArrayList<>() : paperAnswerFile;
|
|
List<File> finalPaperAnswerFile = paperAnswerFile;
|
|
List<File> finalPaperAnswerFile = paperAnswerFile;
|
|
- File finalAnswerDir1 = finalAnswerDir;
|
|
|
|
|
|
+ File finalAnswerDir1 = answerDir;
|
|
paperCourseCodeTempMap.forEach((k, v) -> {
|
|
paperCourseCodeTempMap.forEach((k, v) -> {
|
|
finalPaperAnswerFile.add(createPaperAnswerFile(k, finalMapFile, finalAnswerDir1));
|
|
finalPaperAnswerFile.add(createPaperAnswerFile(k, finalMapFile, finalAnswerDir1));
|
|
});
|
|
});
|