|
@@ -1830,10 +1830,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
|
throw ExceptionResultEnum.ERROR.exception("未找到命题任务");
|
|
|
}
|
|
|
|
|
|
- List<PrintPlanStatusEnum> printPlanStatusEnumList = new ArrayList<>();
|
|
|
- printPlanStatusEnumList.add(PrintPlanStatusEnum.NEW);
|
|
|
- printPlanStatusEnumList.add(PrintPlanStatusEnum.READY);
|
|
|
- List<ExamPackageDetail> examPackageDetailDatasource = this.baseMapper.findExamPackageDetailByPaperNumber(schoolId,examTask.getCourseCode(),paperNumber, printPlanStatusEnumList);
|
|
|
+ List<ExamPackageDetail> examPackageDetailDatasource = this.baseMapper.findExamPackageDetailByPaperNumber(schoolId,examTask.getCourseCode(),paperNumber, null);
|
|
|
ExamObjectDto examObjectDto = this.buildExamObjectDtoByPackageDatasource(examPackageDetailDatasource);
|
|
|
|
|
|
|
|
@@ -1921,8 +1918,8 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
|
// 试卷该考场备份数量
|
|
|
Integer backupCount = backupCountList.get(0);
|
|
|
// 班级主键','隔开
|
|
|
- String clazzIds = "";
|
|
|
- final String separator = ",";
|
|
|
+ List<Long> clazzIds = new ArrayList<>();
|
|
|
+ String separator = ",";
|
|
|
for (ExamPackageDetail examPackageDetail : examPackageDetailCell) {
|
|
|
// 处理考试开始结束时间
|
|
|
Long cellStartTime = examPackageDetail.getExamStartTime();
|
|
@@ -1935,21 +1932,27 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
|
}
|
|
|
// 处理班级和数量
|
|
|
Integer studentCellCount = examPackageDetail.getExamDetailCourseTotalSubjects();
|
|
|
- String clazzIdCell = examPackageDetail.getClazzIds();
|
|
|
studentCount = studentCount + studentCellCount;
|
|
|
- clazzIds = clazzIds + clazzIdCell + separator;
|
|
|
+ String clazzIdCell = examPackageDetail.getClazzIds();
|
|
|
+ if(StringUtils.isNotBlank(clazzIdCell)){
|
|
|
+ for (String s : clazzIdCell.split(separator)) {
|
|
|
+ clazzIds.add(Long.valueOf(s));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!CollectionUtils.isEmpty(clazzIds)) {
|
|
|
+ classNames = basicClazzService.findClazzNamesByClazzIds(clazzIds, separator);
|
|
|
+ printCount = studentCount + " + " + backupCount;
|
|
|
+ printTotalCount = printTotalCount + studentCount + backupCount;
|
|
|
+
|
|
|
+ // 组装examRoom
|
|
|
+ ExamRoomInfo examRoomInfo = new ExamRoomInfo();
|
|
|
+ examRoomInfo.setClazzNames(classNames);
|
|
|
+ examRoomInfo.setStudentCount(studentCount);
|
|
|
+ examRoomInfo.setPrintCount(printCount);
|
|
|
+ examRoomInfoList.add(examRoomInfo);
|
|
|
}
|
|
|
- clazzIds = clazzIds.substring(0, clazzIds.length() - separator.length());
|
|
|
- classNames = basicClazzService.findClazzNamesByClazzIds(clazzIds, separator);
|
|
|
- printCount = studentCount + " + " + backupCount;
|
|
|
- printTotalCount = printTotalCount + studentCount + backupCount;
|
|
|
-
|
|
|
- // 组装examRoom
|
|
|
- ExamRoomInfo examRoomInfo = new ExamRoomInfo();
|
|
|
- examRoomInfo.setClazzNames(classNames);
|
|
|
- examRoomInfo.setStudentCount(studentCount);
|
|
|
- examRoomInfo.setPrintCount(printCount);
|
|
|
- examRoomInfoList.add(examRoomInfo);
|
|
|
}
|
|
|
}
|
|
|
ExamObjectDto examObjectDto = new ExamObjectDto();
|