|
|
|
@ -50,7 +50,6 @@ import static cn.hutool.core.date.DateUnit.MINUTE;
|
|
|
|
|
import static cn.hutool.core.util.ArrayUtil.join;
|
|
|
|
|
import static cn.jlw.util.CacheUserUtil.getStudent;
|
|
|
|
|
import static com.ibeetl.admin.core.util.ExcelUtil.getCellFormatValue;
|
|
|
|
|
import static com.ibeetl.jlw.enums.ResourcesQuestionSnapshotFromTypeEnum.EXAM;
|
|
|
|
|
import static java.util.stream.Collectors.groupingBy;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -603,13 +602,16 @@ public class GeneralQuestionLogService extends CoreBaseService<GeneralQuestionLo
|
|
|
|
|
/**
|
|
|
|
|
* 日志关联学生信息和配置ID信息
|
|
|
|
|
*
|
|
|
|
|
* @param studentId
|
|
|
|
|
* @param setting
|
|
|
|
|
* @param resourcesQuestionSnapshots
|
|
|
|
|
* @param studentId 学生ID
|
|
|
|
|
* @param setting 题目配置
|
|
|
|
|
* @param resourcesQuestionSnapshots 题目快照结合
|
|
|
|
|
* @param isReSend 是否根据题目快照强制重新发题
|
|
|
|
|
*/
|
|
|
|
|
public void preSubmitStudentQuestionLog(@NotNull(message = "学生ID不能为空!") final Long studentId,
|
|
|
|
|
@NotNull(message = "题目配置不能为空!") final GeneralQuestionSetting setting,
|
|
|
|
|
@NotEmpty(message = "题目快照列表不能为空!") List<GeneralResourcesQuestionSnapshot> resourcesQuestionSnapshots) {
|
|
|
|
|
@NotEmpty(message = "题目快照列表不能为空!") List<GeneralResourcesQuestionSnapshot> resourcesQuestionSnapshots,
|
|
|
|
|
boolean isReSend
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
|
|
if (CollectionUtil.isEmpty(resourcesQuestionSnapshots)) {
|
|
|
|
|
return;
|
|
|
|
@ -619,12 +621,12 @@ public class GeneralQuestionLogService extends CoreBaseService<GeneralQuestionLo
|
|
|
|
|
// 逻辑删除之前的题目日志,防止学生做题统计数据异常
|
|
|
|
|
// 保证试卷是最新的
|
|
|
|
|
// 考试逻辑删除记录,作业或者章节测试都是直接删除记录。
|
|
|
|
|
if (setting.getGeneralQuestionSettingType().equals(EXAM)) {
|
|
|
|
|
logicDeleteBySettingIds(setting.getGeneralQuestionSettingId().toString());
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
deleteBySettingIds(setting.getGeneralQuestionSettingId().toString());
|
|
|
|
|
}
|
|
|
|
|
// if (setting.getGeneralQuestionSettingType().equals(EXAM)) {
|
|
|
|
|
// logicDeleteBySettingIds(setting.getGeneralQuestionSettingId().toString());
|
|
|
|
|
// }
|
|
|
|
|
// else {
|
|
|
|
|
// deleteBySettingIds(setting.getGeneralQuestionSettingId().toString());
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// 断言
|
|
|
|
|
Assert.notBlank(resourcesQuestionSnapshots.get(0).getQuestionAnswer(), "题目快照选项不能为空!");
|
|
|
|
|