|
|
@@ -169,6 +169,27 @@ public class TExamServiceImpl extends ServiceImpl<TExamMapper, TExam> implements
|
|
|
}
|
|
|
|
|
|
|
|
|
+ boolean query = false;
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ if(tExamEditParam.getCourseId() != null && !tExamEditParam.getCourseId().isEmpty()){
|
|
|
+ map.put("courseId",tExamEditParam.getCourseId());
|
|
|
+ query = true;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if(query){
|
|
|
+ List<String> studentAccounts=courseOpenMapper.selectAccount(tExamEditParam.getSemesterId(),tExamEditParam.getCourseId());
|
|
|
+ if(studentAccounts != null){
|
|
|
+ String studentIdsStr = String.join(",", studentAccounts);
|
|
|
+ tExamEditParam.setStudentIds(studentIdsStr);
|
|
|
+ }else{
|
|
|
+ throw new CommonException("没有找到学生信息!!!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if(tExamEditParam.getPaperId() != null && !tExamEditParam.getPaperId().isEmpty()){
|
|
|
ExamPaper examPaper = examPaperService.selectById(Integer.parseInt(tExamEditParam.getPaperId()));
|
|
|
if(ExamPaperTypeEnum.TimeLimit.getCode() == examPaper.getPaperType()){
|
|
|
@@ -181,6 +202,8 @@ public class TExamServiceImpl extends ServiceImpl<TExamMapper, TExam> implements
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
if(updateJob){
|
|
|
// 修改定时任务
|
|
|
if(tExam.getStartJobId() != null && tExam.getEndJobId() != null){
|
|
|
@@ -201,6 +224,7 @@ public class TExamServiceImpl extends ServiceImpl<TExamMapper, TExam> implements
|
|
|
tExam = this.addJob(tExam, "end");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
BeanUtil.copyProperties(tExamEditParam, tExam);
|
|
|
this.updateById(tExam);
|
|
|
}
|