소스 검색

答案文件分数题型

xiatian 4 년 전
부모
커밋
a03f28e559
1개의 변경된 파일8개의 추가작업 그리고 7개의 파일을 삭제
  1. 8 7
      themis-business/src/main/java/com/qmth/themis/business/templete/impl/TaskExamPaperImportTemplete.java

+ 8 - 7
themis-business/src/main/java/com/qmth/themis/business/templete/impl/TaskExamPaperImportTemplete.java

@@ -480,10 +480,10 @@ public class TaskExamPaperImportTemplete implements TaskImportTemplete {
             for (int j = 0; j < answerdetailquestions.size(); j++) {
                 JSONObject answerquestion = answerdetailquestions.getJSONObject(j);
                 JSONObject structquestion = structdetailquestions.getJSONObject(j);
-                if (structquestion.getInteger("structType").intValue() != 1
-                        && structquestion.getInteger("structType").intValue() != 2
-                        && structquestion.getInteger("structType").intValue() != 3
-                        && structquestion.getInteger("structType").intValue() != 6) {
+                int structType=structquestion.getInteger("structType").intValue();
+                answerquestion.put("structType", structType);
+                answerquestion.put("score", structquestion.getDouble("score"));
+                if (structType != 1&& structType != 2&& structType != 3&& structType != 6) {
                     JSONArray answer = answerquestion.getJSONArray("answer");
                     disposeAnswerUrl(rootDir, answer, paper.getId(), attachmentDir);
                 }
@@ -493,9 +493,10 @@ public class TaskExamPaperImportTemplete implements TaskImportTemplete {
                     for (int k = 0; k < answersubQuestions.size(); k++) {
                         JSONObject answersubquestion = answersubQuestions.getJSONObject(k);
                         JSONObject structsubquestion = structsubQuestions.getJSONObject(k);
-                        if (structsubquestion.getInteger("structType").intValue() != 1
-                                && structsubquestion.getInteger("structType").intValue() != 2
-                                && structsubquestion.getInteger("structType").intValue() != 3) {
+                        int subStructType=structsubquestion.getInteger("structType").intValue();
+                        answersubquestion.put("structType", subStructType);
+                        answersubquestion.put("score", structsubquestion.getDouble("score"));
+                        if (subStructType != 1&& subStructType != 2&& subStructType != 3) {
                             JSONArray answer = answersubquestion.getJSONArray("answer");
                             disposeAnswerUrl(rootDir, answer, paper.getId(), attachmentDir);
                         }