|
@@ -35,6 +35,7 @@ import cn.com.qmth.scancentral.vo.paper.PaperPageCetVo;
|
|
import cn.com.qmth.scancentral.vo.student.StudentAnswerVo;
|
|
import cn.com.qmth.scancentral.vo.student.StudentAnswerVo;
|
|
import cn.com.qmth.scancentral.vo.student.StudentQuery;
|
|
import cn.com.qmth.scancentral.vo.student.StudentQuery;
|
|
import cn.com.qmth.scancentral.vo.student.StudentVo;
|
|
import cn.com.qmth.scancentral.vo.student.StudentVo;
|
|
|
|
+import cn.com.qmth.scancentral.vo.subject.SubjectScanProgressVo;
|
|
import cn.com.qmth.scancentral.vo.task.TaskStatusVo;
|
|
import cn.com.qmth.scancentral.vo.task.TaskStatusVo;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
@@ -133,7 +134,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
@Transactional
|
|
@Transactional
|
|
// @Lockable(name = LockType.STUDENT, key = "#id")
|
|
// @Lockable(name = LockType.STUDENT, key = "#id")
|
|
public void updateStudentAndPaper(@NotNull User user, @NotNull Long id,
|
|
public void updateStudentAndPaper(@NotNull User user, @NotNull Long id,
|
|
- @NotNull List<StudentPaperEntity> studentPaperList) {
|
|
|
|
|
|
+ @NotNull List<StudentPaperEntity> studentPaperList) {
|
|
for (StudentPaperEntity studentPaper : studentPaperList) {
|
|
for (StudentPaperEntity studentPaper : studentPaperList) {
|
|
studentPaper.setStudentId(id);
|
|
studentPaper.setStudentId(id);
|
|
}
|
|
}
|
|
@@ -354,6 +355,15 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
return this.count(wrapper);
|
|
return this.count(wrapper);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public int getUnscannedCountByExam(Long examId) {
|
|
|
|
+ QueryWrapper<StudentEntity> wrapper = new QueryWrapper<>();
|
|
|
|
+ LambdaQueryWrapper<StudentEntity> lw = wrapper.lambda();
|
|
|
|
+ lw.eq(StudentEntity::getExamId, examId);
|
|
|
|
+ lw.ne(StudentEntity::getStatus, ScanStatus.SCANNED);
|
|
|
|
+ return this.count(wrapper);
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public int getAbsentSuspectCountByExam(Long examId) {
|
|
public int getAbsentSuspectCountByExam(Long examId) {
|
|
QueryWrapper<StudentEntity> wrapper = new QueryWrapper<>();
|
|
QueryWrapper<StudentEntity> wrapper = new QueryWrapper<>();
|
|
@@ -671,7 +681,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
@Transactional
|
|
@Transactional
|
|
@Override
|
|
@Override
|
|
public void updateUploadStatus(@NotNull Long id, @NotNull UploadStatus fileUploadStatus,
|
|
public void updateUploadStatus(@NotNull Long id, @NotNull UploadStatus fileUploadStatus,
|
|
- @NotNull UploadStatus dataUploadStatus) {
|
|
|
|
|
|
+ @NotNull UploadStatus dataUploadStatus) {
|
|
LambdaUpdateWrapper<StudentEntity> lw = new LambdaUpdateWrapper<>();
|
|
LambdaUpdateWrapper<StudentEntity> lw = new LambdaUpdateWrapper<>();
|
|
lw.set(StudentEntity::getDataUploadStatus, dataUploadStatus);
|
|
lw.set(StudentEntity::getDataUploadStatus, dataUploadStatus);
|
|
lw.set(StudentEntity::getFileUploadStatus, fileUploadStatus);
|
|
lw.set(StudentEntity::getFileUploadStatus, fileUploadStatus);
|
|
@@ -1142,8 +1152,8 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
}
|
|
}
|
|
|
|
|
|
private void disposeStudent(ExportCetVo student, ExamEntity exam, List<PaperPageCetVo> pages,
|
|
private void disposeStudent(ExportCetVo student, ExamEntity exam, List<PaperPageCetVo> pages,
|
|
- List<PaperCetVo> papers, String imageTransferDir, Map<String, List<QuestionEntity>> structs,
|
|
|
|
- Map<Integer, AnswerCardEntity> cardMap) {
|
|
|
|
|
|
+ List<PaperCetVo> papers, String imageTransferDir, Map<String, List<QuestionEntity>> structs,
|
|
|
|
+ Map<Integer, AnswerCardEntity> cardMap) {
|
|
int subject = Integer.valueOf(student.getSubjectCode());
|
|
int subject = Integer.valueOf(student.getSubjectCode());
|
|
if (subject > 2) {
|
|
if (subject > 2) {
|
|
if (student.getExamStatus().equals(ExamStatus.ABSENT)) {
|
|
if (student.getExamStatus().equals(ExamStatus.ABSENT)) {
|
|
@@ -1224,7 +1234,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
}
|
|
}
|
|
|
|
|
|
private void setCardStatus(ExportCetVo student, AnswerCardEntity card, List<PaperPageCetVo> pages,
|
|
private void setCardStatus(ExportCetVo student, AnswerCardEntity card, List<PaperPageCetVo> pages,
|
|
- Map<Long, PaperCetVo> pmap) {
|
|
|
|
|
|
+ Map<Long, PaperCetVo> pmap) {
|
|
int subject = Integer.valueOf(student.getSubjectCode());
|
|
int subject = Integer.valueOf(student.getSubjectCode());
|
|
if (subject > 2) {
|
|
if (subject > 2) {
|
|
setCardStatusSmall(student, card, pages, pmap);
|
|
setCardStatusSmall(student, card, pages, pmap);
|
|
@@ -1234,7 +1244,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
}
|
|
}
|
|
|
|
|
|
private void setCardStatusSmall(ExportCetVo student, AnswerCardEntity card, List<PaperPageCetVo> pages,
|
|
private void setCardStatusSmall(ExportCetVo student, AnswerCardEntity card, List<PaperPageCetVo> pages,
|
|
- Map<Long, PaperCetVo> pmap) {
|
|
|
|
|
|
+ Map<Long, PaperCetVo> pmap) {
|
|
PaperPageCetVo p = pages.get(0);
|
|
PaperPageCetVo p = pages.get(0);
|
|
if (ExamStatus.ABSENT.equals(student.getExamStatus())) {
|
|
if (ExamStatus.ABSENT.equals(student.getExamStatus())) {
|
|
if (pmap.get(p.getPaperId()).getQuestionFilled()) {
|
|
if (pmap.get(p.getPaperId()).getQuestionFilled()) {
|
|
@@ -1249,7 +1259,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
}
|
|
}
|
|
|
|
|
|
private void setCardStatusCet(ExportCetVo student, AnswerCardEntity card, List<PaperPageCetVo> pages,
|
|
private void setCardStatusCet(ExportCetVo student, AnswerCardEntity card, List<PaperPageCetVo> pages,
|
|
- Map<Long, PaperCetVo> pmap) {
|
|
|
|
|
|
+ Map<Long, PaperCetVo> pmap) {
|
|
if (card.getPaperCount() == 1) {
|
|
if (card.getPaperCount() == 1) {
|
|
PaperPageCetVo p = pages.get(0);
|
|
PaperPageCetVo p = pages.get(0);
|
|
if (ExamStatus.ABSENT.equals(student.getExamStatus())) {
|
|
if (ExamStatus.ABSENT.equals(student.getExamStatus())) {
|
|
@@ -1342,7 +1352,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
}
|
|
}
|
|
|
|
|
|
private String getCetAnswer(Map<String, List<QuestionEntity>> structs, List<PaperPageCetVo> pages, Long examId,
|
|
private String getCetAnswer(Map<String, List<QuestionEntity>> structs, List<PaperPageCetVo> pages, Long examId,
|
|
- String subjectCode) {
|
|
|
|
|
|
+ String subjectCode) {
|
|
List<String> answers = new ArrayList<String>();
|
|
List<String> answers = new ArrayList<String>();
|
|
List<QuestionEntity> struct = structs.get(examId + "-" + subjectCode);
|
|
List<QuestionEntity> struct = structs.get(examId + "-" + subjectCode);
|
|
if (struct == null) {
|
|
if (struct == null) {
|
|
@@ -2174,4 +2184,9 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public List<SubjectScanProgressVo> scanProgress(Long examId, String subjectCode) {
|
|
|
|
+ return this.baseMapper.scanProgress(examId, subjectCode);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|