|
@@ -96,8 +96,8 @@ public class PaperServiceImpl extends ServiceImpl<PaperMapper, Paper> implements
|
|
|
public void checkQuestionScore(PaperDTO paperDTO) {
|
|
|
if (paperDTO.getJoinType().equals(JoinType.SJ.getCode())) {//随机组卷
|
|
|
for (PaperRuleGroup group : paperDTO.getGroupList()) {
|
|
|
- if (Objects.isNull(group.getPerScore()) || group.getPerScore() == 0.0) {
|
|
|
- throw new JeecgBootException("题目组: " + group.getTitle() + "分值须大于0!");
|
|
|
+ if (Objects.isNull(group.getTotalScore()) || group.getTotalScore() == 0.0) {
|
|
|
+ throw new JeecgBootException("题目组: " + group.getTitle() + ",分值须大于0!");
|
|
|
}
|
|
|
}
|
|
|
} else if (paperDTO.getJoinType().equals(JoinType.XT.getCode()) || paperDTO.getJoinType().equals(JoinType.CT.getCode())) {
|
|
@@ -105,7 +105,7 @@ public class PaperServiceImpl extends ServiceImpl<PaperMapper, Paper> implements
|
|
|
for (PaperRuleGroup group : paperDTO.getGroupList()) {
|
|
|
List<Question> questionList = group.getQuestionList();
|
|
|
if (CollectionUtils.isEmpty(questionList)) {
|
|
|
- throw new JeecgBootException(group.getTitle() + "题目列表不能为空!");
|
|
|
+ throw new JeecgBootException("题目组: " + group.getTitle() + ",题目列表不能为空!");
|
|
|
}
|
|
|
if (QuestionType.COMBINATION.getCode().equals(group.getQuestionType())) {//组合题
|
|
|
for (Question question : questionList) {
|