|
@@ -269,19 +269,22 @@ public class PaperDetailUnitServiceImpl implements PaperDetailUnitService {
|
|
|
|
|
|
Question sub = baseQuestion.getSubQuestions().get(index - 1);
|
|
|
if (updateQuestion.getId().equals(sub.getId())) {
|
|
|
+ if(updateQuestion.getScore().doubleValue()!=baseUnit.getSubScoreList().get(index - 1).doubleValue()) {
|
|
|
+ throw new StatusException("500", "试卷已调用,不能修改分数");
|
|
|
+ }
|
|
|
checkUpdate(updateQuestion, sub);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
+ if(updateUnit.getScore().doubleValue()!=baseUnit.getScore().doubleValue()) {
|
|
|
+ throw new StatusException("500", "试卷已调用,不能修改分数");
|
|
|
+ }
|
|
|
checkUpdate(updateQuestion, baseQuestion);
|
|
|
}
|
|
|
}
|
|
|
private void checkUpdate(Question update,Question base) {
|
|
|
- if(update.getScore().doubleValue()!=base.getScore().doubleValue()) {
|
|
|
- throw new StatusException("500", "试卷已调用,不能修改分数");
|
|
|
- }
|
|
|
if(QuesStructType.SINGLE_ANSWER_QUESTION.equals(base.getQuestionType())
|
|
|
||QuesStructType.MULTIPLE_ANSWER_QUESTION.equals(base.getQuestionType())){
|
|
|
if(update.getQuesOptions().size()!=base.getQuesOptions().size()) {
|