weiwenhai 6 лет назад
Родитель
Сommit
67beba41a8

+ 6 - 1
examcloud-core-questions-service/src/main/java/cn/com/qmth/examcloud/core/questions/service/impl/PaperServiceImpl.java

@@ -69,6 +69,7 @@ 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.PaperQuestionStructureInfo;
 import cn.com.qmth.examcloud.core.questions.service.bean.dto.SubjectiveQuestionStructure;
+import cn.com.qmth.examcloud.core.questions.dao.entity.Course;
 import cn.com.qmth.examcloud.core.questions.dao.entity.ExamPaper;
 import cn.com.qmth.examcloud.core.questions.dao.entity.ExportServiceManage;
 import cn.com.qmth.examcloud.core.questions.dao.entity.Paper;
@@ -189,6 +190,9 @@ public class PaperServiceImpl implements PaperService{
     @Autowired
     private CoursePaperCloudService coursePaperCloudService;
     
+    @Autowired
+    CourseService courseService;
+    
     public static final String TEMP_FILE_EXP = "docxExport/";
 
     /**
@@ -1367,7 +1371,8 @@ public class PaperServiceImpl implements PaperService{
 		SyncCoursePaperBean bean = new SyncCoursePaperBean();
 		bean.setOrgId(Long.valueOf(orgId));
 		bean.setExamId(Long.valueOf(examId));
-		bean.setCourseId(Long.valueOf(paper.getCourse().getId()));
+		Course course = courseService.getCourse(Long.valueOf(orgId), paper.getCourse().getCode());
+		bean.setCourseId(Long.valueOf(course.getId()));
 		bean.setCourseCode(paper.getCourse().getCode());
 		bean.setCourseName(paper.getCourse().getName());
 		bean.setPaperId(paper.getId());