|
@@ -10,6 +10,7 @@ import java.util.Random;
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
|
+import com.qmth.cqb.base.dao.CourseRepo;
|
|
|
import com.qmth.cqb.base.model.Course;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.nlpcn.commons.lang.util.StringUtil;
|
|
@@ -104,6 +105,9 @@ public class ExtractConfigServiceImpl implements ExtractConfigService {
|
|
|
|
|
|
@Autowired
|
|
|
private ExamCourseClient examCourseClient;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private CourseRepo courseRepo;
|
|
|
|
|
|
@Override
|
|
|
public ExtractConfig findConfig(ExtractConfig condition) {
|
|
@@ -127,6 +131,8 @@ public class ExtractConfigServiceImpl implements ExtractConfigService {
|
|
|
examPaper.setPaper(paper);
|
|
|
}
|
|
|
extractConfig.setOrgName(orgName);
|
|
|
+ Course course = courseRepo.findFirstByCodeAndOrgId(extractConfig.getCourseCode(),extractConfig.getOrgId());
|
|
|
+ extractConfig.setCourse(course);
|
|
|
return makePaperByConfig(extractConfig);
|
|
|
}
|
|
|
|
|
@@ -613,6 +619,8 @@ public class ExtractConfigServiceImpl implements ExtractConfigService {
|
|
|
ExtractConfig extractConfig = this.findConfig(condition);
|
|
|
if(extractConfig==null){
|
|
|
extractConfig = new ExtractConfig(examCourseDto);
|
|
|
+ Course course = courseRepo.findFirstByCodeAndOrgId(examCourseDto.getCourseCode(),examCourseDto.getOrgId().toString());
|
|
|
+ extractConfig.setCourse(course);
|
|
|
}
|
|
|
extractConfigs.add(extractConfig);
|
|
|
}
|