|
@@ -38,7 +38,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|
|
public class MarkStudent implements Serializable {
|
|
|
|
|
|
public static final String SPLIT = ";";
|
|
|
-
|
|
|
+
|
|
|
public static final String ANSWER_SPLIT = ",";
|
|
|
|
|
|
public static final int SECRET_NUMBER_START = 10000000;
|
|
@@ -580,13 +580,16 @@ public class MarkStudent implements Serializable {
|
|
|
}
|
|
|
return list;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public List<String> getSheetPathList() {
|
|
|
- List<String> list = new ArrayList<String>();
|
|
|
- List<FilePathVo> vos = JSON.parseArray(StringUtils.trimToNull(sheetPath),FilePathVo.class);
|
|
|
- for (FilePathVo filePathVo : vos) {
|
|
|
- list.add(JSON.toJSONString(filePathVo));
|
|
|
- }
|
|
|
+ List<String> list = new ArrayList<String>();
|
|
|
+ String trimSheetPath = StringUtils.trimToNull(sheetPath);
|
|
|
+ if (StringUtils.isNotBlank(trimSheetPath)) {
|
|
|
+ List<FilePathVo> vos = JSON.parseArray(trimSheetPath, FilePathVo.class);
|
|
|
+ for (FilePathVo filePathVo : vos) {
|
|
|
+ list.add(JSON.toJSONString(filePathVo));
|
|
|
+ }
|
|
|
+ }
|
|
|
return list;
|
|
|
}
|
|
|
|
|
@@ -616,20 +619,20 @@ public class MarkStudent implements Serializable {
|
|
|
return scoreList;
|
|
|
}
|
|
|
|
|
|
- public List<ScoreItem> getScoreList(boolean objective,List<MarkQuestion> questionList) {
|
|
|
+ public List<ScoreItem> getScoreList(boolean objective, List<MarkQuestion> questionList) {
|
|
|
List<ScoreItem> scoreList = new LinkedList<ScoreItem>();
|
|
|
try {
|
|
|
String[] values = StringUtils.split(objective ? objectiveScoreList : subjectiveScoreList, SPLIT);
|
|
|
int i = 0;
|
|
|
for (String value : values) {
|
|
|
- i++;
|
|
|
- if (questionList.size() < i) {
|
|
|
- break;
|
|
|
- }
|
|
|
- MarkQuestion question = questionList.get(i - 1);
|
|
|
- if (question.getTotalScore() == null || question.getTotalScore() == 0) {
|
|
|
- continue;
|
|
|
- }
|
|
|
+ i++;
|
|
|
+ if (questionList.size() < i) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ MarkQuestion question = questionList.get(i - 1);
|
|
|
+ if (question.getTotalScore() == null || question.getTotalScore() == 0) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
ScoreItem item = ScoreItem.parse(value, objective);
|
|
|
item.setObjective(objective);
|
|
|
item.setMainNumber(question.getMainNumber());
|
|
@@ -697,5 +700,5 @@ public class MarkStudent implements Serializable {
|
|
|
", coursePaperId=" + coursePaperId +
|
|
|
"}";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|