|
@@ -82,9 +82,6 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
@Resource
|
|
|
ExamDetailService detailService;
|
|
|
|
|
|
- @Resource
|
|
|
- ExamDetailCourseService detailCourseService;
|
|
|
-
|
|
|
@Resource
|
|
|
ExamPrintPlanService examPrintPlanService;
|
|
|
|
|
@@ -121,24 +118,15 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
@Resource
|
|
|
CreatePdfUtil createPdfUtil;
|
|
|
|
|
|
- @Resource
|
|
|
- CreatePrintPdfUtil createPrintPdfUtil;
|
|
|
-
|
|
|
@Resource
|
|
|
RedisTemplate<String, Object> redisTemplate;
|
|
|
|
|
|
- @Resource
|
|
|
- BasicExamRuleService basicExamRuleService;
|
|
|
-
|
|
|
@Resource
|
|
|
TBTaskService tbTaskService;
|
|
|
|
|
|
@Resource
|
|
|
BasicCardRuleService basicCardRuleService;
|
|
|
|
|
|
- @Resource
|
|
|
- TeachcloudCommonService teachcloudCommonService;
|
|
|
-
|
|
|
@Resource
|
|
|
ConvertUtil convertUtil;
|
|
|
|
|
@@ -188,6 +176,9 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
@Resource
|
|
|
BasicPrintConfigService basicPrintConfigService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ ExamDetailCoursePaperTypeService examDetailCoursePaperTypeService;
|
|
|
+
|
|
|
/**
|
|
|
* 创建pdf前置条件
|
|
|
*
|
|
@@ -263,6 +254,8 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
List<PdfDto> backupPaperPdfList = new ArrayList<>();//备份试卷
|
|
|
List<PdfDto> backupCardPdfList = new ArrayList<>();//备份题卡
|
|
|
|
|
|
+ List<ExamDetailCoursePaperType> examDetailCoursePaperTypes = new ArrayList<>();
|
|
|
+
|
|
|
String printContent = examPrintPlan.getPrintContent();
|
|
|
if (StringUtils.isBlank(printContent)) {
|
|
|
return null;
|
|
@@ -366,6 +359,14 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
examTaskDetail.setRelatePaperType(String.join(",", relatePaperTypes));
|
|
|
examDetailCourse.setPaperType(String.join(",", studentPaperTypes));
|
|
|
|
|
|
+ studentPaperTypes.forEach(m->{
|
|
|
+ ExamDetailCoursePaperType examDetailCoursePaperType = new ExamDetailCoursePaperType();
|
|
|
+ examDetailCoursePaperType.setId(SystemConstant.getDbUuid());
|
|
|
+ examDetailCoursePaperType.setExamDetailCourseId(examDetailCourse.getId());
|
|
|
+ examDetailCoursePaperType.setPaperType(m);
|
|
|
+ examDetailCoursePaperTypes.add(examDetailCoursePaperType);
|
|
|
+ });
|
|
|
+
|
|
|
// 试卷数据组装
|
|
|
if (printContent.contains("PAPER")) {
|
|
|
List<PaperPdfDto> paperPdfDto = createPdfUtil.getPaperPdfFile(examDetailCourse.getPaperType(), examTaskDetail, fileTempList);
|
|
@@ -474,8 +475,12 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
}
|
|
|
examDetailCourse.setAttachmentId(jsonObject.toJSONString());
|
|
|
examTaskDetailService.saveOrUpdateBatch(examTaskDetailList);
|
|
|
+
|
|
|
+ examDetailCoursePaperTypeService.deleteByExamDetailCourseId(examDetailCourse.getId());
|
|
|
+ examDetailCoursePaperTypeService.saveBatch(examDetailCoursePaperTypes);
|
|
|
}
|
|
|
- detailCourseService.saveOrUpdateBatch(examDetailCourseList);
|
|
|
+ examDetailCourseService.saveOrUpdateBatch(examDetailCourseList);
|
|
|
+
|
|
|
}
|
|
|
return basicAttachmentList;
|
|
|
}
|
|
@@ -587,7 +592,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
} else {
|
|
|
examDetailCourseQueryWrapper.lambda().eq(ExamDetailCourse::getExamDetailId, examDetail.getId());
|
|
|
}
|
|
|
- List<ExamDetailCourse> examDetailCourseList = detailCourseService.list(examDetailCourseQueryWrapper);
|
|
|
+ List<ExamDetailCourse> examDetailCourseList = examDetailCourseService.list(examDetailCourseQueryWrapper);
|
|
|
|
|
|
// 考场内没有任务课程数据,直接跳过
|
|
|
if(CollectionUtils.isEmpty(examDetailCourseList)){
|
|
@@ -1630,7 +1635,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
for (int y = 0; y < Objects.requireNonNull(statisticsTempList).size(); y++) {
|
|
|
StatisticsImportDto statisticsImportDto = (StatisticsImportDto) statisticsTempList.get(y);
|
|
|
SysOrg collegeOrg = this.validSysOrgExists(collegeOrgMap, statisticsImportDto.getCollegeName(), sysUser.getSchoolId(), excelErrorTemp, (y + 1), (i + 1), "开课学院");
|
|
|
- SysOrg teachingRoomOrg = this.validSysOrgExists(teachingRoomMap, statisticsImportDto.getTeachingRoomName(), sysUser.getSchoolId(), excelErrorTemp, (y + 1), (i + 1), "开课部门");
|
|
|
+ SysOrg teachingRoomOrg = this.validSysOrgExists(teachingRoomMap, statisticsImportDto.getTeachingRoomName(), sysUser.getSchoolId(), excelErrorTemp, (y + 1), (i + 1), "开课学院");
|
|
|
BasicCourse basicCourse = this.validBasicCourseExists(courseMap, statisticsImportDto.getCourseName(), sysUser.getSchoolId(), statisticsImportDto.getCourseCode(), excelErrorTemp, (y + 1), (i + 1));
|
|
|
String teacherName = statisticsImportDto.getTeacherName();
|
|
|
String clazzNames = statisticsImportDto.getClazzName();
|