|
@@ -82,7 +82,7 @@ public class ExamAssignServiceImpl extends ServiceImpl<ExamAssignMapper, ExamAss
|
|
|
if (!CollectionUtils.isEmpty(kkxyList) && kkxyList.size() > 1) {
|
|
|
throw ExceptionResultEnum.ERROR.exception(String.format("课程[%s]查询出%d个开课学院,请联系管理员检查数据", courseCode, kkxyList.size()));
|
|
|
}
|
|
|
- kkxy = kkxyList.get(0);
|
|
|
+ kkxy = CollectionUtils.isEmpty(kkxyList) ? "" : kkxyList.get(0);
|
|
|
}
|
|
|
record.setActualCount(actualCount);
|
|
|
record.setOpenCollege(kkxy);
|
|
@@ -159,6 +159,9 @@ public class ExamAssignServiceImpl extends ServiceImpl<ExamAssignMapper, ExamAss
|
|
|
|
|
|
@Override
|
|
|
public ExamAssignDto toCalc(Long semesterId, Long examTypeId, Long collegeId, String courseCode, String courseName, String openCollege) {
|
|
|
+ if(StringUtils.isBlank(openCollege)){
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("未查询到开课学院,无法进行计算,请联系管理员处理");
|
|
|
+ }
|
|
|
Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
|
|
|
|
ExamAssign examAssign = this.baseMapper.getBySchoolIdAndSemesterIdAndExamTypeIdAndCourseCodeAndOpenCollege(collegeId, semesterId, examTypeId, courseCode, openCollege);
|
|
@@ -221,9 +224,11 @@ public class ExamAssignServiceImpl extends ServiceImpl<ExamAssignMapper, ExamAss
|
|
|
List<ExamSyncStudent> examSyncStudents = examSyncStudentService.listByExamSyncTotalId(examSyncTotal);
|
|
|
List<CloudMarkingScore> cloudMarkingScoreUpdateList = new ArrayList<>();
|
|
|
for (CloudMarkingScore cloudMarkingScore : cloudMarkingScoreList) {
|
|
|
+ // 若赋分有值,则发布赋分成绩,否则发布原始成绩
|
|
|
+ String publishScore = StringUtils.isBlank(cloudMarkingScore.getAssignScore()) ? cloudMarkingScore.getTotalScore() : cloudMarkingScore.getAssignScore();
|
|
|
if (cloudMarkingScore.getExamSyncStudentId() != null) {
|
|
|
ExamSyncStudent examSyncStudent = examSyncStudents.stream().filter(m -> cloudMarkingScore.getExamSyncStudentId().equals(m.getId())).findFirst().get();
|
|
|
- cloudMarkingScoreForeigns.add(new CloudMarkingScoreForeign(collegeId, semesterId, examTypeId, cloudMarkingScore.getExamId(), examSyncStudent.getXnm(), examSyncStudent.getXqm(), examSyncStudent.getJxbId(), examSyncStudent.getKch(), examSyncStudent.getKcmc(), examSyncStudent.getXh(), cloudMarkingScore.getAssignScore()));
|
|
|
+ cloudMarkingScoreForeigns.add(new CloudMarkingScoreForeign(collegeId, semesterId, examTypeId, cloudMarkingScore.getExamId(), examSyncStudent.getXnm(), examSyncStudent.getXqm(), examSyncStudent.getJxbId(), examSyncStudent.getKch(), examSyncStudent.getKcmc(), examSyncStudent.getXh(), publishScore));
|
|
|
} else {
|
|
|
Optional<ExamSyncStudent> optional = examSyncStudents.stream()
|
|
|
.filter(s -> ((StringUtils.isBlank(s.getCloudMarkingCourseCode()) && s.getKch().equals(cloudMarkingScore.getSubjectCode())) || (StringUtils.isNotBlank(s.getCloudMarkingCourseCode()) && s.getCloudMarkingCourseCode().equals(cloudMarkingScore.getSubjectCode())))
|
|
@@ -231,13 +236,13 @@ public class ExamAssignServiceImpl extends ServiceImpl<ExamAssignMapper, ExamAss
|
|
|
if (optional.isPresent()) {
|
|
|
ExamSyncStudent examSyncStudent = optional.get();
|
|
|
// 匹配上,保存考务数据表ID
|
|
|
- cloudMarkingScoreForeigns.add(new CloudMarkingScoreForeign(collegeId, semesterId, examTypeId, cloudMarkingScore.getExamId(), examSyncStudent.getXnm(), examSyncStudent.getXqm(), examSyncStudent.getJxbId(), examSyncStudent.getKch(), examSyncStudent.getKcmc(), examSyncStudent.getXh(), cloudMarkingScore.getAssignScore()));
|
|
|
+ cloudMarkingScoreForeigns.add(new CloudMarkingScoreForeign(collegeId, semesterId, examTypeId, cloudMarkingScore.getExamId(), examSyncStudent.getXnm(), examSyncStudent.getXqm(), examSyncStudent.getJxbId(), examSyncStudent.getKch(), examSyncStudent.getKcmc(), examSyncStudent.getXh(), publishScore));
|
|
|
|
|
|
// 设置关联考务数据id
|
|
|
cloudMarkingScore.setExamSyncStudentId(examSyncStudent.getId());
|
|
|
cloudMarkingScoreUpdateList.add(cloudMarkingScore);
|
|
|
} else {
|
|
|
- cloudMarkingScoreForeigns.add(new CloudMarkingScoreForeign(collegeId, semesterId, examTypeId, cloudMarkingScore.getExamId(), null, null, null, cloudMarkingScore.getSubjectCode(), cloudMarkingScore.getSubjectName(), cloudMarkingScore.getStudentCode(), cloudMarkingScore.getAssignScore()));
|
|
|
+ cloudMarkingScoreForeigns.add(new CloudMarkingScoreForeign(collegeId, semesterId, examTypeId, cloudMarkingScore.getExamId(), null, null, null, cloudMarkingScore.getSubjectCode(), cloudMarkingScore.getSubjectName(), cloudMarkingScore.getStudentCode(), publishScore));
|
|
|
}
|
|
|
}
|
|
|
}
|