|
@@ -64,6 +64,9 @@ public class ExamPrintPlanServiceImpl extends ServiceImpl<ExamPrintPlanMapper, E
|
|
@Autowired
|
|
@Autowired
|
|
private BasicAttachmentService basicAttachmentService;
|
|
private BasicAttachmentService basicAttachmentService;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ private BasicExamRuleService basicExamRuleService;
|
|
|
|
+
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Override
|
|
@Override
|
|
public IPage<PrintPlanResult> printPlanPage(Long schoolId, Long printPlanId, PrintPlanStatusEnum status, Long startTime, Long endTime, int pageNumber, int pageSize) {
|
|
public IPage<PrintPlanResult> printPlanPage(Long schoolId, Long printPlanId, PrintPlanStatusEnum status, Long startTime, Long endTime, int pageNumber, int pageSize) {
|
|
@@ -194,7 +197,15 @@ public class ExamPrintPlanServiceImpl extends ServiceImpl<ExamPrintPlanMapper, E
|
|
throw ExceptionResultEnum.ERROR.exception("输入的学校id不满足条件 schoolId = " + schoolId);
|
|
throw ExceptionResultEnum.ERROR.exception("输入的学校id不满足条件 schoolId = " + schoolId);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // 校验是否印试卷和题卡
|
|
List<String> printContentList = printPlanParams.getPrintContent();
|
|
List<String> printContentList = printPlanParams.getPrintContent();
|
|
|
|
+ BasicExamRule basicExamRule = basicExamRuleService.getBySchoolId(schoolId);
|
|
|
|
+ if (Objects.isNull(basicExamRule)){
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("未找到学校的通用规则! schoolId : " + schoolId);
|
|
|
|
+ }
|
|
|
|
+ if (basicExamRule.getIncludePaper() && !printContentList.contains("PAPER")){
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("学校通用规则设置了强制包含试卷的必须选择试卷印品! schoolId : " + schoolId);
|
|
|
|
+ }
|
|
if (printContentList.contains("PAPER") && !printContentList.contains("CARD")) {
|
|
if (printContentList.contains("PAPER") && !printContentList.contains("CARD")) {
|
|
throw ExceptionResultEnum.ERROR.exception("如果试卷题卡印品选择了试卷,题卡必须被选择");
|
|
throw ExceptionResultEnum.ERROR.exception("如果试卷题卡印品选择了试卷,题卡必须被选择");
|
|
}
|
|
}
|