|
@@ -42,6 +42,7 @@ import cn.com.qmth.am.entity.StudentEntity;
|
|
import cn.com.qmth.am.entity.StudentScoreEntity;
|
|
import cn.com.qmth.am.entity.StudentScoreEntity;
|
|
import cn.com.qmth.am.enums.DataStatus;
|
|
import cn.com.qmth.am.enums.DataStatus;
|
|
import cn.com.qmth.am.enums.ImportFileName;
|
|
import cn.com.qmth.am.enums.ImportFileName;
|
|
|
|
+import cn.com.qmth.am.service.QuestionService;
|
|
import cn.com.qmth.am.service.StudentScoreService;
|
|
import cn.com.qmth.am.service.StudentScoreService;
|
|
import cn.com.qmth.am.service.StudentService;
|
|
import cn.com.qmth.am.service.StudentService;
|
|
|
|
|
|
@@ -55,6 +56,8 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
private StudentService studentService;
|
|
private StudentService studentService;
|
|
@Autowired
|
|
@Autowired
|
|
private StudentScoreService studentScoreService;
|
|
private StudentScoreService studentScoreService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private QuestionService questionService;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void importStudent() {
|
|
public void importStudent() {
|
|
@@ -352,4 +355,18 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
lw.eq(StudentEntity::getExamId, examId);
|
|
lw.eq(StudentEntity::getExamId, examId);
|
|
this.update(wrapper);
|
|
this.update(wrapper);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Transactional
|
|
|
|
+ @Override
|
|
|
|
+ public void clear(Long examId, String subjectCode) {
|
|
|
|
+ studentScoreService.removeBy(examId,subjectCode);
|
|
|
|
+ questionService.removeBy(examId,subjectCode);
|
|
|
|
+ QueryWrapper<StudentEntity> wrapper = new QueryWrapper<>();
|
|
|
|
+ LambdaQueryWrapper<StudentEntity> lw = wrapper.lambda();
|
|
|
|
+ if(subjectCode!=null) {
|
|
|
|
+ lw.eq(StudentEntity::getSubjectCode, subjectCode);
|
|
|
|
+ }
|
|
|
|
+ lw.eq(StudentEntity::getExamId, examId);
|
|
|
|
+ this.remove(wrapper);
|
|
|
|
+ }
|
|
}
|
|
}
|