فهرست منبع

新增段落匹配卷型

wangliang 3 سال پیش
والد
کامیت
70b19af7c7

+ 2 - 2
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamPaperServiceImpl.java

@@ -216,7 +216,7 @@ public class TEExamPaperServiceImpl extends ServiceImpl<TEExamPaperMapper, TEExa
                     }
                     map.put(RedisKeyHelper.examAnswerHashKey(mainNum, subNum, null), bean);
                 }
-                if (structType.intValue() == 6) {
+                if (structType.intValue() == 6 || structType.intValue() == 8) {
                     JSONArray answersubQuestions = answerquestion.getJSONArray("subQuestions");
                     for (int k = 0; k < answersubQuestions.size(); k++) {
                         JSONObject answersubquestion = answersubQuestions.getJSONObject(k);
@@ -363,7 +363,7 @@ public class TEExamPaperServiceImpl extends ServiceImpl<TEExamPaperMapper, TEExa
                 Integer subNum = structquestion.getInteger("number");
                 Integer structType = structquestion.getInteger("structType");
                 map.put(RedisKeyHelper.examAnswerHashKey(mainNum, subNum, null), structType);
-                if (structType.intValue() == 6) {
+                if (structType.intValue() == 6 || structType.intValue() == 8) {
                     JSONArray structsubQuestions = structquestion.getJSONArray("subQuestions");
                     for (int k = 0; k < structsubQuestions.size(); k++) {
                         JSONObject structsubquestion = structsubQuestions.getJSONObject(k);

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

@@ -315,7 +315,7 @@ public class TaskExamPaperImportTemplete implements TaskImportTemplete {
                     disposeQuestionBodyUrl(rootDir, body, paper.getId(), attachmentDir);
                     JSONArray options = structquestion.getJSONArray("options");
                     disposeQuestionOptionsUrl(rootDir, options, paper.getId(), attachmentDir);
-                    if (structquestion.getInteger("structType").intValue() == 6) {
+                    if (structquestion.getInteger("structType").intValue() == 6 || structquestion.getInteger("structType").intValue() == 8) {
                         JSONArray structsubQuestions = structquestion.getJSONArray("subQuestions");
                         for (int k = 0; k < structsubQuestions.size(); k++) {
                             JSONObject structsubquestion = structsubQuestions.getJSONObject(k);
@@ -426,12 +426,12 @@ public class TaskExamPaperImportTemplete implements TaskImportTemplete {
                 }
                 Integer structType = question.getInteger("structType");
                 if (structType.intValue() != 1 && structType.intValue() != 2 && structType.intValue() != 3
-                        && structType.intValue() != 6) {//主观题
+                        && structType.intValue() != 6 && structType.intValue() != 8) {//主观题
                     subTotal = subTotal.add(new BigDecimal(score));
                 } else {//客观题
                     obTotal = obTotal.add(new BigDecimal(score));
                 }
-                if (structType.intValue() == 6) {
+                if (structType.intValue() == 6 || structType.intValue() == 8) {
                     JSONArray subQuestions = question.getJSONArray("subQuestions");
                     for (int k = 0; k < subQuestions.size(); k++) {
                         JSONObject subquestion = subQuestions.getJSONObject(k);
@@ -491,11 +491,11 @@ public class TaskExamPaperImportTemplete implements TaskImportTemplete {
                 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) {
+                if (structType != 1 && structType != 2 && structType != 3 && structType != 6 && structType != 8) {
                     JSONArray answer = answerquestion.getJSONArray("answer");
                     disposeAnswerUrl(rootDir, answer, paper.getId(), attachmentDir);
                 }
-                if (structquestion.getInteger("structType").intValue() == 6) {
+                if (structquestion.getInteger("structType").intValue() == 6 || structquestion.getInteger("structType").intValue() == 8) {
                     JSONArray answersubQuestions = answerquestion.getJSONArray("subQuestions");
                     JSONArray structsubQuestions = structquestion.getJSONArray("subQuestions");
                     for (int k = 0; k < answersubQuestions.size(); k++) {