教育资源修改
parent
5645336e71
commit
3780e465ff
|
|
@ -49,6 +49,9 @@ public class ExamPaperRemoveExe {
|
||||||
if (!corpInfoRepository.isSupper() && b) {
|
if (!corpInfoRepository.isSupper() && b) {
|
||||||
throw new BizException("股份端数据不能修改状态");
|
throw new BizException("股份端数据不能修改状态");
|
||||||
}
|
}
|
||||||
|
if(!AuthContext.getUserId().equals(examPaperDO.getCreateId())){
|
||||||
|
throw new BizException(examPaperDO.getExamName()+"试卷不是本人创建的,不能删除");
|
||||||
|
}
|
||||||
|
|
||||||
// 是否被使用
|
// 是否被使用
|
||||||
Long count= classExamPaperRepository.getCountByExamPaperId(examPaperDO.getExamPaperId());
|
Long count= classExamPaperRepository.getCountByExamPaperId(examPaperDO.getExamPaperId());
|
||||||
|
|
@ -91,7 +94,7 @@ public class ExamPaperRemoveExe {
|
||||||
if(count>0){
|
if(count>0){
|
||||||
errorList.add(examPaperDO.getExamName()+"已绑定班级");
|
errorList.add(examPaperDO.getExamName()+"已绑定班级");
|
||||||
}
|
}
|
||||||
if(AuthContext.getUserId().equals(examPaperDO.getCreateId())){
|
if(!AuthContext.getUserId().equals(examPaperDO.getCreateId())){
|
||||||
errorList.add(examPaperDO.getExamName()+"试卷不是本人创建的");
|
errorList.add(examPaperDO.getExamName()+"试卷不是本人创建的");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.zcloud.edu.domain.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 试卷类型 1-自建试卷 2-班级中自动生成试卷
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum ExamPaperTypeEnum {
|
||||||
|
SELF_BUILD(1, "自建试卷"),
|
||||||
|
AUTO_GENERATE(2, "班级中自动生成试卷");
|
||||||
|
|
||||||
|
;
|
||||||
|
private final Integer code;
|
||||||
|
private final String name;
|
||||||
|
|
||||||
|
ExamPaperTypeEnum(Integer code, String name) {
|
||||||
|
this.code = code;
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue