|
@@ -29,6 +29,7 @@ import cn.com.qmth.mps.entity.PaperEntity;
|
|
|
import cn.com.qmth.mps.entity.PaperGroupEntity;
|
|
|
import cn.com.qmth.mps.enums.Role;
|
|
|
import cn.com.qmth.mps.service.CourseService;
|
|
|
+import cn.com.qmth.mps.service.ExamService;
|
|
|
import cn.com.qmth.mps.service.PaperDetailService;
|
|
|
import cn.com.qmth.mps.service.PaperDetailUnitService;
|
|
|
import cn.com.qmth.mps.service.PaperGroupService;
|
|
@@ -52,6 +53,8 @@ public class PaperGroupServiceImpl extends ServiceImpl<PaperGroupDao, PaperGroup
|
|
|
|
|
|
@Autowired
|
|
|
private CourseService courseService;
|
|
|
+ @Autowired
|
|
|
+ private ExamService examService;
|
|
|
|
|
|
@Override
|
|
|
public List<GroupCountVo> findGroupCount(List<Long> paperIds) {
|
|
@@ -212,6 +215,7 @@ public class PaperGroupServiceImpl extends ServiceImpl<PaperGroupDao, PaperGroup
|
|
|
if (paper == null) {
|
|
|
throw new StatusException("未找到试卷结构");
|
|
|
}
|
|
|
+ examService.checkExamStatus(paper.getExamId());
|
|
|
if (!user.getRole().equals(Role.SUPER_ADMIN) && !user.getSchoolId().equals(paper.getSchoolId())) {
|
|
|
throw new StatusException("没有权限");
|
|
|
}
|
|
@@ -272,6 +276,7 @@ public class PaperGroupServiceImpl extends ServiceImpl<PaperGroupDao, PaperGroup
|
|
|
if (paper == null) {
|
|
|
throw new StatusException("未找到试卷结构");
|
|
|
}
|
|
|
+ examService.checkExamStatus(paper.getExamId());
|
|
|
if (!user.getRole().equals(Role.SUPER_ADMIN) && !user.getSchoolId().equals(paper.getSchoolId())) {
|
|
|
throw new StatusException("没有权限");
|
|
|
}
|
|
@@ -296,6 +301,7 @@ public class PaperGroupServiceImpl extends ServiceImpl<PaperGroupDao, PaperGroup
|
|
|
if (paper == null) {
|
|
|
throw new StatusException("未找到试卷结构");
|
|
|
}
|
|
|
+ examService.checkExamStatus(paper.getExamId());
|
|
|
if (!user.getRole().equals(Role.SUPER_ADMIN) && !user.getSchoolId().equals(paper.getSchoolId())) {
|
|
|
throw new StatusException("没有权限");
|
|
|
}
|