|
@@ -148,7 +148,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void updateSubjectiveStatusAndScore(Long studentId, SubjectiveStatus status, Double score,
|
|
public void updateSubjectiveStatusAndScore(Long studentId, SubjectiveStatus status, Double score,
|
|
- String scoreList) {
|
|
|
|
|
|
+ String scoreList) {
|
|
UpdateWrapper<MarkStudent> updateWrapper = new UpdateWrapper<>();
|
|
UpdateWrapper<MarkStudent> updateWrapper = new UpdateWrapper<>();
|
|
updateWrapper.lambda().set(MarkStudent::getSubjectiveStatus, status).set(MarkStudent::getSubjectiveScore, score)
|
|
updateWrapper.lambda().set(MarkStudent::getSubjectiveStatus, status).set(MarkStudent::getSubjectiveScore, score)
|
|
.set(MarkStudent::getSubjectiveScoreList, scoreList).eq(MarkStudent::getId, studentId);
|
|
.set(MarkStudent::getSubjectiveScoreList, scoreList).eq(MarkStudent::getId, studentId);
|
|
@@ -157,7 +157,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void updateSubjectiveStatusAndScore(Long examId, String paperNumber, SubjectiveStatus status, double score,
|
|
public void updateSubjectiveStatusAndScore(Long examId, String paperNumber, SubjectiveStatus status, double score,
|
|
- String scoreList) {
|
|
|
|
|
|
+ String scoreList) {
|
|
UpdateWrapper<MarkStudent> updateWrapper = new UpdateWrapper<>();
|
|
UpdateWrapper<MarkStudent> updateWrapper = new UpdateWrapper<>();
|
|
updateWrapper.lambda().set(MarkStudent::getSubjectiveStatus, status).set(MarkStudent::getSubjectiveScore, score)
|
|
updateWrapper.lambda().set(MarkStudent::getSubjectiveStatus, status).set(MarkStudent::getSubjectiveScore, score)
|
|
.set(MarkStudent::getSubjectiveScoreList, scoreList).eq(MarkStudent::getExamId, examId)
|
|
.set(MarkStudent::getSubjectiveScoreList, scoreList).eq(MarkStudent::getExamId, examId)
|
|
@@ -190,9 +190,9 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public IPage<StudentScoreDetailDto> pageStudentScore(Long examId, String paperNumber, String college,
|
|
public IPage<StudentScoreDetailDto> pageStudentScore(Long examId, String paperNumber, String college,
|
|
- String className, String teacher, Integer filter, Boolean absent, Boolean breach, Double startScore,
|
|
|
|
- Double endScore, Double subScore, Integer objectiveScoreRateLt, String studentName, String studentCode,
|
|
|
|
- String orderType, String orderField, Integer pageNumber, Integer pageSize) {
|
|
|
|
|
|
+ String className, String teacher, Integer filter, Boolean absent, Boolean breach, Double startScore,
|
|
|
|
+ Double endScore, Double subScore, Integer objectiveScoreRateLt, String studentName, String studentCode,
|
|
|
|
+ String orderType, String orderField, Integer pageNumber, Integer pageSize) {
|
|
if (startScore != null && endScore == null) {
|
|
if (startScore != null && endScore == null) {
|
|
throw ExceptionResultEnum.ERROR.exception("请输入结束分数值");
|
|
throw ExceptionResultEnum.ERROR.exception("请输入结束分数值");
|
|
}
|
|
}
|
|
@@ -200,7 +200,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
MarkPaper markPaper = markPaperService.getByExamIdAndPaperNumber(examId, paperNumber);
|
|
MarkPaper markPaper = markPaperService.getByExamIdAndPaperNumber(examId, paperNumber);
|
|
Double objectiveScoreLt = objectiveScoreRateLt == null ? null
|
|
Double objectiveScoreLt = objectiveScoreRateLt == null ? null
|
|
: Double.parseDouble(new DecimalFormat("####.##")
|
|
: Double.parseDouble(new DecimalFormat("####.##")
|
|
- .format(markPaper.getObjectiveScore() * objectiveScoreRateLt / 100));
|
|
|
|
|
|
+ .format(markPaper.getObjectiveScore() * objectiveScoreRateLt / 100));
|
|
IPage<StudentScoreDetailDto> studentScoreDetailDtoIPage = this.baseMapper.pageStudentScore(page, examId,
|
|
IPage<StudentScoreDetailDto> studentScoreDetailDtoIPage = this.baseMapper.pageStudentScore(page, examId,
|
|
paperNumber, college, className, teacher, filter, absent, breach, startScore, endScore, subScore,
|
|
paperNumber, college, className, teacher, filter, absent, breach, startScore, endScore, subScore,
|
|
objectiveScoreLt, studentName, studentCode, orderType, orderField);
|
|
objectiveScoreLt, studentName, studentCode, orderType, orderField);
|
|
@@ -227,7 +227,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
}
|
|
}
|
|
|
|
|
|
private int getCount(Long examId, ScanStatus status, String courseCode, String coursePaperId,
|
|
private int getCount(Long examId, ScanStatus status, String courseCode, String coursePaperId,
|
|
- MarkPaperStatus markPaperStatus, DataPermissionRule dpr) {
|
|
|
|
|
|
+ MarkPaperStatus markPaperStatus, DataPermissionRule dpr) {
|
|
MarkStudent markStudent = new MarkStudent();
|
|
MarkStudent markStudent = new MarkStudent();
|
|
markStudent.setExamId(examId);
|
|
markStudent.setExamId(examId);
|
|
markStudent.setCourseCode(courseCode);
|
|
markStudent.setCourseCode(courseCode);
|
|
@@ -238,7 +238,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
}
|
|
}
|
|
|
|
|
|
private int getOmrAbsentCount(Long examId, Boolean checked, String courseCode, String coursePaperId,
|
|
private int getOmrAbsentCount(Long examId, Boolean checked, String courseCode, String coursePaperId,
|
|
- MarkPaperStatus status, DataPermissionRule dpr) {
|
|
|
|
|
|
+ MarkPaperStatus status, DataPermissionRule dpr) {
|
|
MarkStudent markStudent = new MarkStudent();
|
|
MarkStudent markStudent = new MarkStudent();
|
|
markStudent.setExamId(examId);
|
|
markStudent.setExamId(examId);
|
|
markStudent.setCourseCode(courseCode);
|
|
markStudent.setCourseCode(courseCode);
|
|
@@ -250,7 +250,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
}
|
|
}
|
|
|
|
|
|
private int getIncompleteCount(Long examId, String courseCode, String coursePaperId, MarkPaperStatus status,
|
|
private int getIncompleteCount(Long examId, String courseCode, String coursePaperId, MarkPaperStatus status,
|
|
- DataPermissionRule dpr) {
|
|
|
|
|
|
+ DataPermissionRule dpr) {
|
|
MarkStudent markStudent = new MarkStudent();
|
|
MarkStudent markStudent = new MarkStudent();
|
|
markStudent.setExamId(examId);
|
|
markStudent.setExamId(examId);
|
|
markStudent.setCourseCode(courseCode);
|
|
markStudent.setCourseCode(courseCode);
|
|
@@ -387,7 +387,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public MarkStudent findByExamIdAndCoursePaperIdAndStudentCode(Long examId, String coursePaperId,
|
|
public MarkStudent findByExamIdAndCoursePaperIdAndStudentCode(Long examId, String coursePaperId,
|
|
- String studentCode) {
|
|
|
|
|
|
+ String studentCode) {
|
|
QueryWrapper<MarkStudent> wrapper = new QueryWrapper<>();
|
|
QueryWrapper<MarkStudent> wrapper = new QueryWrapper<>();
|
|
LambdaQueryWrapper<MarkStudent> lw = wrapper.lambda();
|
|
LambdaQueryWrapper<MarkStudent> lw = wrapper.lambda();
|
|
lw.eq(MarkStudent::getExamId, examId);
|
|
lw.eq(MarkStudent::getExamId, examId);
|
|
@@ -474,7 +474,11 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
public int countUploadedByExamIdAndPaperNumber(Long examId, String paperNumber) {
|
|
public int countUploadedByExamIdAndPaperNumber(Long examId, String paperNumber) {
|
|
QueryWrapper<MarkStudent> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<MarkStudent> queryWrapper = new QueryWrapper<>();
|
|
queryWrapper.lambda().eq(MarkStudent::getExamId, examId).eq(MarkStudent::getPaperNumber, paperNumber)
|
|
queryWrapper.lambda().eq(MarkStudent::getExamId, examId).eq(MarkStudent::getPaperNumber, paperNumber)
|
|
- .eq(MarkStudent::getUpload, true).eq(MarkStudent::getAbsent, false).eq(MarkStudent::getBreach, false);
|
|
|
|
|
|
+ .eq(MarkStudent::getUpload, true)
|
|
|
|
+ .eq(MarkStudent::getScanStatus, ScanStatus.SCANNED)
|
|
|
|
+ .eq(MarkStudent::getAbsent, false)
|
|
|
|
+ .eq(MarkStudent::getBreach, false)
|
|
|
|
+ .eq(MarkStudent::getOmrAbsent, false);
|
|
return this.count(queryWrapper);
|
|
return this.count(queryWrapper);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -551,7 +555,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
@Override
|
|
@Override
|
|
@Transactional
|
|
@Transactional
|
|
public void updateStudentAndPaper(@NotNull SysUser user, @NotNull Long id,
|
|
public void updateStudentAndPaper(@NotNull SysUser user, @NotNull Long id,
|
|
- @NotNull List<ScanStudentPaper> studentPaperList) {
|
|
|
|
|
|
+ @NotNull List<ScanStudentPaper> studentPaperList) {
|
|
if (CollectionUtils.isNotEmpty(studentPaperList)) {
|
|
if (CollectionUtils.isNotEmpty(studentPaperList)) {
|
|
for (ScanStudentPaper studentPaper : studentPaperList) {
|
|
for (ScanStudentPaper studentPaper : studentPaperList) {
|
|
studentPaper.setStudentId(id);
|
|
studentPaper.setStudentId(id);
|
|
@@ -738,7 +742,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public long countStudentCountByExamIdAndPaperNumber(Long examId, String paperNumber, String paperType) {
|
|
|
|
|
|
+ public long countByExamIdAndPaperNumber(Long examId, String paperNumber, String paperType) {
|
|
QueryWrapper<MarkStudent> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<MarkStudent> queryWrapper = new QueryWrapper<>();
|
|
queryWrapper.lambda().eq(MarkStudent::getExamId, examId).eq(MarkStudent::getPaperNumber, paperNumber)
|
|
queryWrapper.lambda().eq(MarkStudent::getExamId, examId).eq(MarkStudent::getPaperNumber, paperNumber)
|
|
.eq(MarkStudent::getPaperType, paperType);
|
|
.eq(MarkStudent::getPaperType, paperType);
|
|
@@ -748,7 +752,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
@Transactional
|
|
@Transactional
|
|
@Override
|
|
@Override
|
|
public AbsentManualUpdateVo absentManualUpdate(Long examId, String coursePaperId, String studentCode,
|
|
public AbsentManualUpdateVo absentManualUpdate(Long examId, String coursePaperId, String studentCode,
|
|
- ScanStatus status) {
|
|
|
|
|
|
+ ScanStatus status) {
|
|
MarkStudent student = findByExamIdAndCoursePaperIdAndStudentCode(examId, coursePaperId, studentCode);
|
|
MarkStudent student = findByExamIdAndCoursePaperIdAndStudentCode(examId, coursePaperId, studentCode);
|
|
if (student == null) {
|
|
if (student == null) {
|
|
throw new ParameterException("考生未找到");
|
|
throw new ParameterException("考生未找到");
|
|
@@ -785,7 +789,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<Long> findIdByExamIdAndPaperNumberAndSubjectiveStatus(Long examId, String paperNumber,
|
|
public List<Long> findIdByExamIdAndPaperNumberAndSubjectiveStatus(Long examId, String paperNumber,
|
|
- SubjectiveStatus unmark, SubjectiveStatus marked) {
|
|
|
|
|
|
+ SubjectiveStatus unmark, SubjectiveStatus marked) {
|
|
return this.baseMapper.findIdByExamIdAndPaperNumberAndSubjectiveStatus(examId, paperNumber, unmark.name(),
|
|
return this.baseMapper.findIdByExamIdAndPaperNumberAndSubjectiveStatus(examId, paperNumber, unmark.name(),
|
|
marked.name());
|
|
marked.name());
|
|
}
|
|
}
|
|
@@ -1172,7 +1176,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public int getAssignedCount(Long examId, Boolean checked, String courseCode, String coursePaperId,
|
|
public int getAssignedCount(Long examId, Boolean checked, String courseCode, String coursePaperId,
|
|
- MarkPaperStatus status, DataPermissionRule dpr) {
|
|
|
|
|
|
+ MarkPaperStatus status, DataPermissionRule dpr) {
|
|
MarkStudent markStudent = new MarkStudent();
|
|
MarkStudent markStudent = new MarkStudent();
|
|
markStudent.setExamId(examId);
|
|
markStudent.setExamId(examId);
|
|
markStudent.setCourseCode(courseCode);
|
|
markStudent.setCourseCode(courseCode);
|
|
@@ -1193,7 +1197,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<MarkStudent> listScanCollegeByExamIdAndCourseCodeAndCoursePaperId(Long examId, String courseCode,
|
|
public List<MarkStudent> listScanCollegeByExamIdAndCourseCodeAndCoursePaperId(Long examId, String courseCode,
|
|
- String coursePaperId, String status, DataPermissionRule dpr) {
|
|
|
|
|
|
+ String coursePaperId, String status, DataPermissionRule dpr) {
|
|
return this.baseMapper.listScanCollegeByExamIdAndCourseCodeAndCoursePaperId(examId, courseCode, coursePaperId,
|
|
return this.baseMapper.listScanCollegeByExamIdAndCourseCodeAndCoursePaperId(examId, courseCode, coursePaperId,
|
|
status, dpr);
|
|
status, dpr);
|
|
}
|
|
}
|