diff --git a/src/main/java/club/joylink/rtss/dao/UserExamMapper.java b/src/main/java/club/joylink/rtss/dao/UserExamMapper.java index 5c6668e1e..7c59ceb16 100644 --- a/src/main/java/club/joylink/rtss/dao/UserExamMapper.java +++ b/src/main/java/club/joylink/rtss/dao/UserExamMapper.java @@ -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); } diff --git a/src/main/java/club/joylink/rtss/services/org/OrgScoringRuleService.java b/src/main/java/club/joylink/rtss/services/org/OrgScoringRuleService.java index 08b88b0aa..65e2b919f 100644 --- a/src/main/java/club/joylink/rtss/services/org/OrgScoringRuleService.java +++ b/src/main/java/club/joylink/rtss/services/org/OrgScoringRuleService.java @@ -83,12 +83,10 @@ public class OrgScoringRuleService implements IOrgScoringRuleService { int totalWeight = orgScoringRuleVO.calculateTotalWeight(); Map usualScoreMap = new HashMap<>(); if (orgScoringRuleVO.getUsualScoringRule() != null) { - totalWeight += orgScoringRuleVO.getUsualScoringRule().calculateTotalWeight(); usualScoreMap = this.score(userIds, orgScoringRuleVO.getUsualScoringRule(), totalWeight, projects); } Map finalScoreMap = new HashMap<>(); if (orgScoringRuleVO.getFinalScoringRule() != null) { - totalWeight += orgScoringRuleVO.getFinalScoringRule().calculateTotalWeight(); finalScoreMap = this.score(userIds, orgScoringRuleVO.getFinalScoringRule(), totalWeight, projects); } List list = new ArrayList<>(); @@ -182,7 +180,7 @@ public class OrgScoringRuleService implements IOrgScoringRuleService { List 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); } }