|
@@ -77,7 +77,7 @@ public class CreateRandomPaperTemplateTask {
|
|
index++;
|
|
index++;
|
|
|
|
|
|
if (this.existRandomPaperTemplate(user, course.getCourseId())) {
|
|
if (this.existRandomPaperTemplate(user, course.getCourseId())) {
|
|
- String msg = String.format("【%s】 课程代码:%s 已存在随机抽卷模板!", index, course.getCourseCode());
|
|
|
|
|
|
+ String msg = String.format("【%s】 课程代码:%s 已存在随机抽卷模板!", index, course.getCourseCode());
|
|
messages.add(msg);
|
|
messages.add(msg);
|
|
log.warn(msg);
|
|
log.warn(msg);
|
|
continue;
|
|
continue;
|
|
@@ -86,7 +86,7 @@ public class CreateRandomPaperTemplateTask {
|
|
// 获取试卷结构
|
|
// 获取试卷结构
|
|
String paperStructId = this.getPaperStructId(user, course.getCourseCode(), structType, structName);
|
|
String paperStructId = this.getPaperStructId(user, course.getCourseCode(), structType, structName);
|
|
if (paperStructId == null) {
|
|
if (paperStructId == null) {
|
|
- String msg = String.format("【%s】 课程代码:%s 未找到试卷结构!", index, course.getCourseCode());
|
|
|
|
|
|
+ String msg = String.format("【%s】 课程代码:%s 未找到试卷结构!", index, course.getCourseCode());
|
|
messages.add(msg);
|
|
messages.add(msg);
|
|
log.warn(msg);
|
|
log.warn(msg);
|
|
continue;
|
|
continue;
|
|
@@ -95,7 +95,7 @@ public class CreateRandomPaperTemplateTask {
|
|
// 获取试卷列表
|
|
// 获取试卷列表
|
|
List<String> paperIds = this.getPapers(user, course.getCourseCode(), questionPool, paperKeywords);
|
|
List<String> paperIds = this.getPapers(user, course.getCourseCode(), questionPool, paperKeywords);
|
|
if (paperIds.isEmpty()) {
|
|
if (paperIds.isEmpty()) {
|
|
- String msg = String.format("【%s】 课程代码:%s 未找到相关试卷!", index, course.getCourseCode());
|
|
|
|
|
|
+ String msg = String.format("【%s】 课程代码:%s 未找到相关试卷!", index, course.getCourseCode());
|
|
messages.add(msg);
|
|
messages.add(msg);
|
|
log.warn(msg);
|
|
log.warn(msg);
|
|
continue;
|
|
continue;
|
|
@@ -105,14 +105,14 @@ public class CreateRandomPaperTemplateTask {
|
|
try {
|
|
try {
|
|
this.saveRandomPaperTemplate(user, course, structType, paperStructId, questionPool, paperIds);
|
|
this.saveRandomPaperTemplate(user, course, structType, paperStructId, questionPool, paperIds);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- String msg = String.format("【%s】 课程代码:%s 处理失败!%s", index, course.getCourseCode(),
|
|
|
|
|
|
+ String msg = String.format("【%s】 课程代码:%s 处理失败!%s", index, course.getCourseCode(),
|
|
e.getMessage());
|
|
e.getMessage());
|
|
messages.add(msg);
|
|
messages.add(msg);
|
|
log.warn(msg);
|
|
log.warn(msg);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
|
|
- String msg = String.format("【%s】 课程代码:%s 处理完成!", index, course.getCourseCode());
|
|
|
|
|
|
+ String msg = String.format("【%s】 课程代码:%s 处理完成!", index, course.getCourseCode());
|
|
log.info(msg);
|
|
log.info(msg);
|
|
}
|
|
}
|
|
|
|
|