|
@@ -22,6 +22,7 @@ import cn.com.qmth.examcloud.core.questions.dao.PaperDetailRepo;
|
|
|
import cn.com.qmth.examcloud.core.questions.dao.PaperDetailUnitRepo;
|
|
|
import cn.com.qmth.examcloud.core.questions.dao.PaperRepo;
|
|
|
import cn.com.qmth.examcloud.core.questions.dao.QuesRepo;
|
|
|
+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.PaperDetail;
|
|
|
import cn.com.qmth.examcloud.core.questions.dao.entity.PaperDetailUnit;
|
|
@@ -105,6 +106,15 @@ public class PaperProviderServiceImpl implements PaperProviderService{
|
|
|
*/
|
|
|
private Paper initPaper(String paperName, User user) {
|
|
|
Paper paper = new Paper();
|
|
|
+ //初始化默认课程
|
|
|
+ Course course = new Course();
|
|
|
+ course.setId("k12");
|
|
|
+ course.setId("k12");
|
|
|
+ course.setName("k12");
|
|
|
+ course.setOrgId(user.getRootOrgId().toString());
|
|
|
+ course.setCreateTime(CommonUtils.getCurDateTime());
|
|
|
+ course.setEnable("true");
|
|
|
+ paper.setCourse(course);
|
|
|
paper.setName(paperName);
|
|
|
paper.setTitle(paperName);
|
|
|
paper.setPaperType(PaperType.GENERATE);
|
|
@@ -143,6 +153,7 @@ public class PaperProviderServiceImpl implements PaperProviderService{
|
|
|
j++;
|
|
|
score = map.get(questions.get(i).getId()).getScore() + score;
|
|
|
sum = paperDetailUnit.getScore() * paperDetailUnit.getQuestion().getDifficultyDegree()/10 + sum;
|
|
|
+ paperDetailUnits.add(paperDetailUnit);
|
|
|
}
|
|
|
paperDetail.setUnitCount(j);
|
|
|
paperDetail.setScore(score);
|