|
@@ -44,9 +44,6 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
|
|
|
@Resource
|
|
|
TAExamCourseRecordMapper taExamCourseRecordMapper;
|
|
|
|
|
|
- @Resource
|
|
|
- TBPaperStructService tbPaperStructService;
|
|
|
-
|
|
|
@Resource
|
|
|
ReportCommonService reportCommonService;
|
|
|
|
|
@@ -64,7 +61,7 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
|
|
|
*/
|
|
|
@Override
|
|
|
public IPage<TAExamCourseResult> surveyTeacherList(IPage<Map> iPage, Long examId, SemesterEnum semester, Long schoolId) {
|
|
|
- return taExamCourseMapper.surveyTeacherList(iPage, examId, semester.name(), schoolId);
|
|
|
+ return taExamCourseMapper.surveyTeacherList(iPage, examId, Objects.nonNull(semester) ? semester.name() : null, schoolId);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -82,11 +79,12 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
|
|
|
* @param examId
|
|
|
* @param courseCode
|
|
|
* @param publishStatus
|
|
|
+ * @param semester
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public IPage<TAExamCourseResult> surveyAspointsList(IPage<Map> iPage, Long schoolId, Long examId, String courseCode, PublishStatusEnum publishStatus) {
|
|
|
- return taExamCourseMapper.surveyAspointsList(iPage, schoolId, examId, courseCode, publishStatus.name());
|
|
|
+ public IPage<TAExamCourseResult> surveyAspointsList(IPage<Map> iPage, Long schoolId, Long examId, String courseCode, PublishStatusEnum publishStatus, SemesterEnum semester) {
|
|
|
+ return taExamCourseMapper.surveyAspointsList(iPage, schoolId, examId, courseCode, Objects.nonNull(publishStatus) ? publishStatus.name() : null, Objects.nonNull(semester) ? semester.name() : null);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -207,7 +205,7 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
|
|
|
*/
|
|
|
@Override
|
|
|
public IPage<TAExamCourseCollegeTeacherResult> surveyTeacherTeacherView(IPage<Map> iPage, Long schoolId, SemesterEnum semester, Long examId, String courseCode) {
|
|
|
- return taExamCourseMapper.surveyTeacherTeacherView(iPage, schoolId, semester.name(), examId, courseCode);
|
|
|
+ return taExamCourseMapper.surveyTeacherTeacherView(iPage, schoolId, Objects.nonNull(semester) ? semester.name() : null, examId, courseCode);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -247,8 +245,8 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
|
|
|
@Override
|
|
|
public TrialCalculationResult trialCalculate(Long examId, String courseCode, BigDecimal coefficient) {
|
|
|
// 试卷分数设置
|
|
|
- List<TBPaper> tbPaperList = tbPaperService.list(new QueryWrapper<TBPaper>().lambda().eq(TBPaper::getExamId,examId).eq(TBPaper::getCourseCode,courseCode));
|
|
|
- if (tbPaperList.size() == 0){
|
|
|
+ List<TBPaper> tbPaperList = tbPaperService.list(new QueryWrapper<TBPaper>().lambda().eq(TBPaper::getExamId, examId).eq(TBPaper::getCourseCode, courseCode));
|
|
|
+ if (tbPaperList.size() == 0) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("该课程不存在");
|
|
|
}
|
|
|
TBPaper tbPaper = tbPaperList.get(0);
|
|
@@ -256,13 +254,13 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
|
|
|
BigDecimal passScore = tbPaper.getPassScore();
|
|
|
// 参考的考生数据
|
|
|
List<TAExamCourseRecord> taExamCourseRecordList = taExamCourseRecordMapper.selectList(new QueryWrapper<TAExamCourseRecord>().lambda()
|
|
|
- .eq(TAExamCourseRecord::getExamId,examId)
|
|
|
- .eq(TAExamCourseRecord::getCourseCode,courseCode)
|
|
|
- .eq(TAExamCourseRecord::getAbsent,false));
|
|
|
+ .eq(TAExamCourseRecord::getExamId, examId)
|
|
|
+ .eq(TAExamCourseRecord::getCourseCode, courseCode)
|
|
|
+ .eq(TAExamCourseRecord::getAbsent, false));
|
|
|
for (TAExamCourseRecord taExamCourseRecord : taExamCourseRecordList) {
|
|
|
BigDecimal paperScore = taExamCourseRecord.getTotalScore();
|
|
|
BigDecimal assignScore = paperScore.add((fullScore.subtract(paperScore)).divide(coefficient, 4, BigDecimal.ROUND_HALF_UP));
|
|
|
- assignScore = assignScore.setScale(0,BigDecimal.ROUND_HALF_UP);
|
|
|
+ assignScore = assignScore.setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
|
taExamCourseRecord.setAssignedScore(assignScore);
|
|
|
}
|
|
|
int totalCount = taExamCourseRecordList.size();
|