|
|
|
@ -91,6 +91,8 @@ public class SaveOrUpdateTaskDomainServiceImpl implements SaveOrUpdateTaskDomain |
|
|
|
dto.setSingleChoiceScore(Math.round(configTotal / dto.getSingleChoiceNum() * 100) / 100.0); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dto.setTotalScore((int) configTotal); |
|
|
|
// 补全冗余字段
|
|
|
|
ProductLineEntity subProductLine = productLineBaseService.getById(dto.getSubLineId()); |
|
|
|
@ -191,6 +193,12 @@ public class SaveOrUpdateTaskDomainServiceImpl implements SaveOrUpdateTaskDomain |
|
|
|
if (Objects.isNull(dto.getDuration())) { |
|
|
|
throw new BusinessErrorException("考试时长不能为空"); |
|
|
|
} |
|
|
|
if (Objects.isNull(dto.getRemindTimePoint())) { |
|
|
|
throw new BusinessErrorException("剩余时间提示点不能为空"); |
|
|
|
} |
|
|
|
if (dto.getRemindTimePoint() > dto.getDuration()) { |
|
|
|
throw new BusinessErrorException("剩余时间提示点不能大于考试时长"); |
|
|
|
} |
|
|
|
if (Objects.isNull(dto.getPassScore())) { |
|
|
|
throw new BusinessErrorException("通过考试分数线不能为空"); |
|
|
|
} |
|
|
|
|