考试评分bug修改
This commit is contained in:
parent
8192e0be98
commit
c406d1fb36
@ -117,7 +117,7 @@ public interface UserExamMapper {
|
||||
"FROM " +
|
||||
"user_exam " +
|
||||
"WHERE " +
|
||||
"user_id = 3 " +
|
||||
"AND exam_id = 39")
|
||||
"user_id = #{userId} " +
|
||||
"AND exam_id = #{examId}")
|
||||
Integer findHeightScoreUserExam(Long userId, Long examId);
|
||||
}
|
||||
|
@ -83,12 +83,10 @@ public class OrgScoringRuleService implements IOrgScoringRuleService {
|
||||
int totalWeight = orgScoringRuleVO.calculateTotalWeight();
|
||||
Map<Long, Integer> usualScoreMap = new HashMap<>();
|
||||
if (orgScoringRuleVO.getUsualScoringRule() != null) {
|
||||
totalWeight += orgScoringRuleVO.getUsualScoringRule().calculateTotalWeight();
|
||||
usualScoreMap = this.score(userIds, orgScoringRuleVO.getUsualScoringRule(), totalWeight, projects);
|
||||
}
|
||||
Map<Long, Integer> finalScoreMap = new HashMap<>();
|
||||
if (orgScoringRuleVO.getFinalScoringRule() != null) {
|
||||
totalWeight += orgScoringRuleVO.getFinalScoringRule().calculateTotalWeight();
|
||||
finalScoreMap = this.score(userIds, orgScoringRuleVO.getFinalScoringRule(), totalWeight, projects);
|
||||
}
|
||||
List<OrgScoringResultVO> list = new ArrayList<>();
|
||||
@ -182,7 +180,7 @@ public class OrgScoringRuleService implements IOrgScoringRuleService {
|
||||
List<OrgScoringRuleVO.Exam> exams = rule.getExams();
|
||||
if (!CollectionUtils.isEmpty(exams)) {
|
||||
for (OrgScoringRuleVO.Exam exam : exams) {
|
||||
int examScore = iUserExamService.queryHeightScoreOfUserExam(userId, exam.getExamId());
|
||||
Integer examScore = iUserExamService.queryHeightScoreOfUserExam(userId, exam.getExamId());
|
||||
score += exam.calculateScore(examScore, totalWeight);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user