修改试卷定义时间判断
This commit is contained in:
parent
d29a869c26
commit
a20a57b5c0
@ -64,7 +64,9 @@ public class PaperUserCreateService {
|
||||
PaperExceptionAssert.PcExisted.assertNotNull(composition, "创建试卷的试卷定义不存在,pcId = " + pcId);
|
||||
PaperExceptionAssert.PcCanCreatePu.assertTrue(!PaperCompositionState.Editing.equals(PaperCompositionState.getItem(composition.getState())), "编辑中的试卷定义无法用于生成用户试卷,pcId = " + pcId);
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
PaperExceptionAssert.PcCanCreatePu.assertTrue(now.isAfter(composition.getStartTime()) && now.isBefore(composition.getEndTime()), "当前时间未在试卷启用时间内,不能创建试卷");
|
||||
if (null != composition.getStartTime() && null != composition.getEndTime()) {
|
||||
PaperExceptionAssert.PcCanCreatePu.assertTrue(now.isAfter(composition.getStartTime()) && now.isBefore(composition.getEndTime()), "当前时间未在试卷启用时间内,不能创建试卷");
|
||||
}
|
||||
// 试卷蓝图规则
|
||||
List<PaperRule> ruleList = compositionService.findRuleByPcId(pcId);
|
||||
PaperExceptionAssert.PcHavePr.assertCollectionNotEmpty(ruleList, "试卷定义没有规则定义,无法生成用户试卷,pcId = " + pcId);
|
||||
|
Loading…
Reference in New Issue
Block a user