|
@@ -12,7 +12,6 @@ import cn.com.qmth.examcloud.core.print.service.CoursePaperService;
|
|
|
import cn.com.qmth.examcloud.core.print.service.StatisticService;
|
|
|
import cn.com.qmth.examcloud.core.print.service.bean.coursepaper.ExportAllReq;
|
|
|
import cn.com.qmth.examcloud.core.print.service.bean.coursepaper.ExportBatchReq;
|
|
|
-import cn.com.qmth.examcloud.core.print.service.bean.examquestionstructure.ExamQuestionStructureInfo;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import org.junit.Test;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -31,41 +30,38 @@ public class CoursePaperServiceTest extends BaseTest {
|
|
|
|
|
|
@Test
|
|
|
public void test() throws Exception {
|
|
|
- coursePaperService.syncCourseNameByCourseId(18L, "测试课程");
|
|
|
+ coursePaperService.syncCourseNameByCourseId(courseId, "测试课程");
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void allotCoursePaperTest() throws Exception {
|
|
|
Long courseStatisticId = 1L;
|
|
|
Long coursePaperId = 1L;
|
|
|
- //coursePaperService.allotCoursePaper(courseStatisticId, coursePaperId);
|
|
|
-
|
|
|
- Long orgId = 27L;
|
|
|
- Long examId = 21L;
|
|
|
- coursePaperService.allotAllCoursePaper(orgId, examId);
|
|
|
+ coursePaperService.allotCoursePaper(courseStatisticId, coursePaperId);
|
|
|
+ //coursePaperService.allotAllCoursePaper(orgId, examId);
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void syncCoursePaperTest() throws Exception {
|
|
|
CoursePaper coursePaper = new CoursePaper();
|
|
|
- coursePaper.setOrgId(27L);
|
|
|
- coursePaper.setExamId(21L);
|
|
|
- coursePaper.setCourseId(18L);
|
|
|
+ coursePaper.setOrgId(orgId);
|
|
|
+ coursePaper.setExamId(examId);
|
|
|
+ coursePaper.setCourseId(courseId);
|
|
|
coursePaper.setCourseCode("123456");
|
|
|
coursePaper.setCourseName("测试课程");
|
|
|
- coursePaper.setPaperId("e965c24e-68a7-4f4d-ac1f-00ca0c904b10");
|
|
|
+ coursePaper.setPaperId("5bbc422def8fce44c27cfecf");
|
|
|
coursePaper.setPaperName("测试试卷");
|
|
|
coursePaperService.syncCoursePaper(coursePaper);
|
|
|
|
|
|
- ExamQuestionStructureInfo info = statisticService.findStructureByPaperId(coursePaper.getExamId(), coursePaper.getPaperId());
|
|
|
- System.out.println(jsonMapper.toJson(info));
|
|
|
+// ExamQuestionStructureInfo info = statisticService.findStructureByPaperId(coursePaper.getExamId(), coursePaper.getPaperId());
|
|
|
+// System.out.println(jsonMapper.toJson(info));
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void exportAllCoursePaperTest() throws Exception {
|
|
|
ExportAllReq req = new ExportAllReq();
|
|
|
- req.setOrgId(27L);
|
|
|
- req.setExamId(21L);
|
|
|
+ req.setOrgId(orgId);
|
|
|
+ req.setExamId(examId);
|
|
|
req.setNeedPaper(true);
|
|
|
req.setNeedAnswer(true);
|
|
|
req.setNeedStruct(true);
|
|
@@ -78,7 +74,7 @@ public class CoursePaperServiceTest extends BaseTest {
|
|
|
@Test
|
|
|
public void exportBatchCoursePaperTest() throws Exception {
|
|
|
ExportBatchReq req = new ExportBatchReq();
|
|
|
- req.setIds(Lists.newArrayList(27L, 28L, 29L));
|
|
|
+ req.setIds(Lists.newArrayList(1L, 2L, 3L));
|
|
|
req.setNeedPaper(true);
|
|
|
req.setNeedAnswer(true);
|
|
|
req.setNeedStruct(true);
|