|
@@ -1,12 +1,26 @@
|
|
package cn.com.qmth.examcloud.core.oe.admin.service.impl;
|
|
package cn.com.qmth.examcloud.core.oe.admin.service.impl;
|
|
|
|
|
|
|
|
+import java.text.DecimalFormat;
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.List;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
+
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
+
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
|
+
|
|
import cn.com.qmth.examcloud.commons.util.StringUtil;
|
|
import cn.com.qmth.examcloud.commons.util.StringUtil;
|
|
import cn.com.qmth.examcloud.core.oe.admin.base.utils.QuestionTypeUtil;
|
|
import cn.com.qmth.examcloud.core.oe.admin.base.utils.QuestionTypeUtil;
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordDataRepo;
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordDataRepo;
|
|
-import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordQuestionsRepo;
|
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.ExamScoreRepo;
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.ExamScoreRepo;
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.ExamStudentRepo;
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.ExamStudentRepo;
|
|
-import cn.com.qmth.examcloud.core.oe.admin.dao.entity.*;
|
|
|
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamQuestionEntity;
|
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
|
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordPaperStructEntity;
|
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordQuestionsEntity;
|
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamScoreEntity;
|
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamStudentEntity;
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamRecordStatus;
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamRecordStatus;
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordPaperStructService;
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordPaperStructService;
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordQuestionsService;
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordQuestionsService;
|
|
@@ -24,14 +38,6 @@ import cn.com.qmth.examcloud.support.cache.bean.ExamSettingsCacheBean;
|
|
import cn.com.qmth.examcloud.support.enums.ExamProperties;
|
|
import cn.com.qmth.examcloud.support.enums.ExamProperties;
|
|
import cn.com.qmth.examcloud.support.helper.ExamCacheTransferHelper;
|
|
import cn.com.qmth.examcloud.support.helper.ExamCacheTransferHelper;
|
|
import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
|
|
import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
|
-
|
|
|
|
-import java.text.DecimalFormat;
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -52,9 +58,6 @@ public class PracticeServiceImpl implements PracticeService {
|
|
@Autowired
|
|
@Autowired
|
|
private ExamScoreRepo examScoreRepo;
|
|
private ExamScoreRepo examScoreRepo;
|
|
|
|
|
|
- @Autowired
|
|
|
|
- private ExamRecordQuestionsRepo examRecordQuestionsRepo;
|
|
|
|
-
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private ExamRecordPaperStructService examRecordPaperStructService;
|
|
private ExamRecordPaperStructService examRecordPaperStructService;
|
|
|
|
|
|
@@ -89,6 +92,16 @@ public class PracticeServiceImpl implements PracticeService {
|
|
} else {
|
|
} else {
|
|
practiceCourseInfo.setExamCycleEnabled(false);
|
|
practiceCourseInfo.setExamCycleEnabled(false);
|
|
}
|
|
}
|
|
|
|
+ ExamPropertyCacheBean showUndertaking = CacheHelper.getExamProperty(practiceCourseInfo.getExamId(), ExamProperties.SHOW_UNDERTAKING.name());
|
|
|
|
+ if (showUndertaking != null && StringUtil.isTrue(showUndertaking.getValue())) {
|
|
|
|
+ practiceCourseInfo.setShowUndertaking(true);
|
|
|
|
+ ExamPropertyCacheBean undertaking = CacheHelper.getExamProperty(practiceCourseInfo.getExamId(), ExamProperties.UNDERTAKING.name());
|
|
|
|
+ if (undertaking != null) {
|
|
|
|
+ practiceCourseInfo.setUndertaking(undertaking.getValue());
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ practiceCourseInfo.setShowUndertaking(false);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return practiceCourseInfos;
|
|
return practiceCourseInfos;
|
|
}
|
|
}
|