|
@@ -34,6 +34,8 @@ import cn.com.qmth.examcloud.core.questions.dao.PaperRepo;
|
|
import cn.com.qmth.examcloud.core.questions.service.bean.dto.PaperDetailExp;
|
|
import cn.com.qmth.examcloud.core.questions.service.bean.dto.PaperDetailExp;
|
|
import cn.com.qmth.examcloud.core.questions.service.bean.dto.PaperDetailUnitExp;
|
|
import cn.com.qmth.examcloud.core.questions.service.bean.dto.PaperDetailUnitExp;
|
|
import cn.com.qmth.examcloud.core.questions.service.bean.dto.PaperExp;
|
|
import cn.com.qmth.examcloud.core.questions.service.bean.dto.PaperExp;
|
|
|
|
+import cn.com.qmth.examcloud.core.questions.service.impl.CourseService;
|
|
|
|
+import cn.com.qmth.examcloud.core.questions.dao.entity.Course;
|
|
import cn.com.qmth.examcloud.core.questions.dao.entity.Paper;
|
|
import cn.com.qmth.examcloud.core.questions.dao.entity.Paper;
|
|
import cn.com.qmth.examcloud.core.questions.dao.entity.PaperDetail;
|
|
import cn.com.qmth.examcloud.core.questions.dao.entity.PaperDetail;
|
|
import cn.com.qmth.examcloud.core.questions.dao.entity.PaperDetailUnit;
|
|
import cn.com.qmth.examcloud.core.questions.dao.entity.PaperDetailUnit;
|
|
@@ -83,6 +85,9 @@ public class InitPaperExpService {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
AudioTimeConfigRepo audioTimeConfigRepo;
|
|
AudioTimeConfigRepo audioTimeConfigRepo;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ CourseService courseService;
|
|
|
|
|
|
public static final String FILL_BLANK_QUESTION_FLAG = "###";
|
|
public static final String FILL_BLANK_QUESTION_FLAG = "###";
|
|
|
|
|
|
@@ -131,6 +136,7 @@ public class InitPaperExpService {
|
|
if (paper == null) {
|
|
if (paper == null) {
|
|
throw new StatusException("Q-090133","该试卷不存在");
|
|
throw new StatusException("Q-090133","该试卷不存在");
|
|
}
|
|
}
|
|
|
|
+ Course course = courseService.getCourse(Long.valueOf(paper.getOrgId()), paper.getCourse().getCode());
|
|
//创建试卷导出的dto
|
|
//创建试卷导出的dto
|
|
PaperExp paperExpDto = BeanCopierUtil.copyProperties(paper, PaperExp.class);
|
|
PaperExp paperExpDto = BeanCopierUtil.copyProperties(paper, PaperExp.class);
|
|
if(paper.getCourse() == null){
|
|
if(paper.getCourse() == null){
|
|
@@ -147,6 +153,7 @@ public class InitPaperExpService {
|
|
//给新的大题添加分数
|
|
//给新的大题添加分数
|
|
scorePaperDetailExps(paperDetailExps);
|
|
scorePaperDetailExps(paperDetailExps);
|
|
paperExpDto.setPaperDetails(paperDetailExps);
|
|
paperExpDto.setPaperDetails(paperDetailExps);
|
|
|
|
+ paperExpDto.getCourse().setId(course.getId());
|
|
return paperExpDto;
|
|
return paperExpDto;
|
|
}
|
|
}
|
|
|
|
|