|
@@ -317,6 +317,8 @@ public class ExamController extends ControllerSupport {
|
|
bean.setCreationTime(next.getCreationTime());
|
|
bean.setCreationTime(next.getCreationTime());
|
|
bean.setUpdateTime(next.getUpdateTime());
|
|
bean.setUpdateTime(next.getUpdateTime());
|
|
bean.setExamLimit(next.getExamLimit());
|
|
bean.setExamLimit(next.getExamLimit());
|
|
|
|
+ bean.setSpecialSettingsEnabled(next.getSpecialSettingsEnabled());
|
|
|
|
+ bean.setSpecialSettingsType(next.getSpecialSettingsType());
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(propertyKeyList)) {
|
|
if (CollectionUtils.isNotEmpty(propertyKeyList)) {
|
|
Map<String, String> properties = getProperties(bean.getId(), propertyKeyList);
|
|
Map<String, String> properties = getProperties(bean.getId(), propertyKeyList);
|
|
@@ -480,6 +482,9 @@ public class ExamController extends ControllerSupport {
|
|
domain.setRootOrgId(cache.getRootOrgId());
|
|
domain.setRootOrgId(cache.getRootOrgId());
|
|
domain.setStarted(isStarted(cache.getId()));
|
|
domain.setStarted(isStarted(cache.getId()));
|
|
domain.setExamLimit(cache.getExamLimit());
|
|
domain.setExamLimit(cache.getExamLimit());
|
|
|
|
+ domain.setSpecialSettingsEnabled(cache.getSpecialSettingsEnabled());
|
|
|
|
+ domain.setSpecialSettingsType(cache.getSpecialSettingsType());
|
|
|
|
+
|
|
return domain;
|
|
return domain;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -555,6 +560,8 @@ public class ExamController extends ControllerSupport {
|
|
examInfo.setRemark(domain.getRemark());
|
|
examInfo.setRemark(domain.getRemark());
|
|
examInfo.setRootOrgId(accessUser.getRootOrgId());
|
|
examInfo.setRootOrgId(accessUser.getRootOrgId());
|
|
examInfo.setExamLimit(domain.getExamLimit());
|
|
examInfo.setExamLimit(domain.getExamLimit());
|
|
|
|
+ examInfo.setSpecialSettingsEnabled(domain.getSpecialSettingsEnabled());
|
|
|
|
+ examInfo.setSpecialSettingsType(domain.getSpecialSettingsType());
|
|
|
|
|
|
Map<String, String> properties = domain.getProperties();
|
|
Map<String, String> properties = domain.getProperties();
|
|
if (null == properties) {
|
|
if (null == properties) {
|
|
@@ -572,7 +579,7 @@ public class ExamController extends ControllerSupport {
|
|
@ApiOperation(value = "复制考试批次", notes = "")
|
|
@ApiOperation(value = "复制考试批次", notes = "")
|
|
@PostMapping("copyExam")
|
|
@PostMapping("copyExam")
|
|
@Transactional
|
|
@Transactional
|
|
- public void copyExam(@RequestBody CopyExamDomain domain) {
|
|
|
|
|
|
+ public ExamEntity copyExam(@RequestBody CopyExamDomain domain) {
|
|
|
|
|
|
Long srcExamId = domain.getSrcExamId();
|
|
Long srcExamId = domain.getSrcExamId();
|
|
|
|
|
|
@@ -594,6 +601,8 @@ public class ExamController extends ControllerSupport {
|
|
ed.setRootOrgId(srcExam.getRootOrgId());
|
|
ed.setRootOrgId(srcExam.getRootOrgId());
|
|
ed.setStarted(isStarted(srcExam.getId()));
|
|
ed.setStarted(isStarted(srcExam.getId()));
|
|
ed.setExamLimit(srcExam.getExamLimit());
|
|
ed.setExamLimit(srcExam.getExamLimit());
|
|
|
|
+ ed.setSpecialSettingsEnabled(srcExam.getSpecialSettingsEnabled());
|
|
|
|
+ ed.setSpecialSettingsType(srcExam.getSpecialSettingsType());
|
|
|
|
|
|
ed.setName(domain.getDestExamName());
|
|
ed.setName(domain.getDestExamName());
|
|
ed.setCode(domain.getDestExamCode());
|
|
ed.setCode(domain.getDestExamCode());
|
|
@@ -609,40 +618,7 @@ public class ExamController extends ControllerSupport {
|
|
ed.setProperties(map);
|
|
ed.setProperties(map);
|
|
|
|
|
|
ExamEntity savedExam = saveExam(ed, CURD.CREATION);
|
|
ExamEntity savedExam = saveExam(ed, CURD.CREATION);
|
|
-
|
|
|
|
- Boolean copyOrgSettings = domain.getCopyOrgSettings();
|
|
|
|
-
|
|
|
|
- if (copyOrgSettings) {
|
|
|
|
- List<ExamSpecialSettingsEntity> orgSettingsList = examSpecialSettingsRepo
|
|
|
|
- .findAllByExamIdAndCourseIdIsNullAndStudentIdIsNullAndOrgIdIsNotNull(
|
|
|
|
- srcExam.getId());
|
|
|
|
-
|
|
|
|
- for (ExamSpecialSettingsEntity cur : orgSettingsList) {
|
|
|
|
-
|
|
|
|
- ExamSpecialSettingsInfo info = new ExamSpecialSettingsInfo();
|
|
|
|
- info.setBeginTime(cur.getBeginTime());
|
|
|
|
- info.setEndTime(cur.getEndTime());
|
|
|
|
- info.setOrgId(cur.getOrgId());
|
|
|
|
- info.setExamLimit(cur.getExamLimit());
|
|
|
|
- info.setRootOrgId(cur.getRootOrgId());
|
|
|
|
-
|
|
|
|
- info.setExamId(savedExam.getId());
|
|
|
|
-
|
|
|
|
- List<ExamOrgPropertyEntity> propList = examOrgPropertyRepo
|
|
|
|
- .findByExamIdAndOrgId(cur.getExamId(), cur.getOrgId());
|
|
|
|
-
|
|
|
|
- Map<String, String> orgProperties = Maps.newHashMap();
|
|
|
|
- for (ExamOrgPropertyEntity curOrgProp : propList) {
|
|
|
|
- DynamicEnum de = manager.getById(curOrgProp.getKeyId());
|
|
|
|
- map.put(de.getName(), curOrgProp.getValue());
|
|
|
|
- }
|
|
|
|
- info.setProperties(orgProperties);
|
|
|
|
-
|
|
|
|
- examService.saveExamSpecialSettings(info);
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ return savedExam;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|