浏览代码

3.3.0 update

ting.yin 1 年之前
父节点
当前提交
a409c0f59d

+ 22 - 7
teachcloud-common/src/main/java/com/qmth/teachcloud/common/enums/mark/MarkProblemType.java

@@ -1,29 +1,33 @@
 package com.qmth.teachcloud.common.enums.mark;
 
+import java.util.ArrayList;
 import java.util.LinkedList;
 import java.util.List;
 
+import com.qmth.teachcloud.common.enums.EnumResult;
+
 public enum MarkProblemType {
     WRONG("答错位置", 0),
     BLUR("试卷模糊", 1),
     OTHER("其它", 2);
 
-    private String name;
+    private String desc;
 
     private int value;
 
     private static List<MarkProblemType> options;
 
-    private MarkProblemType(String name, int value) {
-        this.name = name;
+    private MarkProblemType(String desc, int value) {
+        this.desc = desc;
         this.value = value;
     }
 
-    public String getName() {
-        return name;
-    }
 
-    public int getValue() {
+    public String getDesc() {
+		return desc;
+	}
+
+	public int getValue() {
         return value;
     }
 
@@ -45,5 +49,16 @@ public enum MarkProblemType {
         }
         return options;
     }
+    
+    public static List<EnumResult> listTypes() {
+        List<EnumResult> list = new ArrayList<EnumResult>();
+        for (MarkProblemType value : MarkProblemType.values()) {
+            EnumResult result = new EnumResult();
+            result.setName(value.getDesc());
+            result.setCode(value.toString());
+            list.add(result);
+        }
+        return list;
+    }
 
 }

+ 4 - 4
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/dto/mark/mark/MarkSettingDto.java

@@ -2,9 +2,9 @@ package com.qmth.teachcloud.mark.dto.mark.mark;
 
 import java.util.List;
 
+import com.qmth.teachcloud.common.enums.EnumResult;
 import com.qmth.teachcloud.common.enums.mark.MarkMode;
 import com.qmth.teachcloud.common.enums.mark.MarkPaperStatus;
-import com.qmth.teachcloud.common.enums.mark.MarkProblemType;
 import com.qmth.teachcloud.mark.enums.ExamType;
 
 public class MarkSettingDto {
@@ -20,7 +20,7 @@ public class MarkSettingDto {
 	private Boolean forceSpecialTag;
 	private String uiSetting;
 	private MarkPaperStatus statusValue;
-	private List<MarkProblemType> problemTypes;
+	private List<EnumResult> problemTypes;
 	private Integer groupNumber;
 	private Integer topCount;
 	private Double[] splitConfig;
@@ -107,10 +107,10 @@ public class MarkSettingDto {
 	public void setStatusValue(MarkPaperStatus statusValue) {
 		this.statusValue = statusValue;
 	}
-	public List<MarkProblemType> getProblemTypes() {
+	public List<EnumResult> getProblemTypes() {
 		return problemTypes;
 	}
-	public void setProblemTypes(List<MarkProblemType> problemTypes) {
+	public void setProblemTypes(List<EnumResult> problemTypes) {
 		this.problemTypes = problemTypes;
 	}
 	public Integer getGroupNumber() {

+ 1 - 1
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkProblemHistoryServiceImpl.java

@@ -64,7 +64,7 @@ public class MarkProblemHistoryServiceImpl extends ServiceImpl<MarkProblemHistor
 			MarkStudent markStudent = markStudentService.getById(problemDto.getStudentId());
 			problemDto.setStudentName(markStudent.getStudentName());
 			problemDto.setStudentCode(markStudent.getStudentCode());
-			problemDto.setProblemTypeName(problemDto.getType().getName());
+			problemDto.setProblemTypeName(problemDto.getType().getDesc());
 			problemDto.setStatusName(problemDto.getStatus().getName());
 			problemDto.setGroupQuestions(markQuestionService
 					.assembleGroupQuestionsByExamIdAndPaperNumberAndNumber(examId, paperNumber, groupNumber));

+ 1 - 1
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkServiceImpl.java

@@ -744,7 +744,7 @@ public class MarkServiceImpl implements MarkService {
 		dto.setForceSpecialTag(true);
 		dto.setUiSetting(user.getUiSetting());
 		dto.setStatusValue(markPaper.getStatus());
-		dto.setProblemTypes(MarkProblemType.getOptionList());
+		dto.setProblemTypes(MarkProblemType.listTypes());
 		dto.setGroupNumber(groupNumber);
 		dto.setTopCount(markUserGroup.getTopCount());
 		dto.setSplitConfig(new Double[0]);