backend/src/main/java/com/rongyichuang/player/service/ActivityPlayerRatingService.java
@@ -95,8 +95,8 @@
                // 删除已有的评分项
                activityPlayerRatingItemRepository.deleteByActivityPlayerRatingId(rating.getId());
            } else {
                // 创建新的评分记录
                rating = new ActivityPlayerRating(activityId, activityPlayerId, playerId, currentJudgeId, ratingSchemeId);
                // 创建新的评分记录,暂时使用1作为stageId的默认值
                rating = new ActivityPlayerRating(activityId, activityPlayerId, 1L, playerId, currentJudgeId, ratingSchemeId);
                rating = activityPlayerRatingRepository.save(rating);
                log.info("创建新的评分记录,ID: {}", rating.getId());
            }
@@ -118,30 +118,32 @@
                
                // 创建评分项记录
                ActivityPlayerRatingItem ratingItemEntity = new ActivityPlayerRatingItem(
                        activityId,
                        activityPlayerId,
                        rating.getId(),
                        1L, // stageId,暂时使用1
                        playerId,
                        currentJudgeId,
                        ratingSchemeId,
                        itemId,
                        ratingItem.getName(),
                        BigDecimal.ONE, // 默认权重为1
                        BigDecimal.valueOf(ratingItem.getMaxScore()),
                        score
                );
                ratingItemEntity.setRemark(input.getComment());
                
                activityPlayerRatingItemRepository.save(ratingItemEntity);
                
                // 累加加权得分
                if (ratingItemEntity.getWeightedScore() != null) {
                    totalScore = totalScore.add(ratingItemEntity.getWeightedScore());
                // 累加得分
                if (score != null) {
                    totalScore = totalScore.add(score);
                }
                
                log.info("保存评分项目: itemId={}, score={}, weightedScore={}",
                        itemId, score, ratingItemEntity.getWeightedScore());
                log.info("保存评分项目: itemId={}, score={}",
                        itemId, score);
            }
            
            // 更新总分和状态
            rating.setTotalScore(totalScore);
            rating.setStatus(1); // 已评分
            rating.setRemark(input.getComment());
            rating.setState(1); // 已评分
            rating.setFeedback(input.getComment());
            activityPlayerRatingRepository.save(rating);
            
            log.info("评分保存完成,总分: {}", totalScore);
@@ -200,8 +202,8 @@
        CurrentJudgeRatingResponse response = new CurrentJudgeRatingResponse();
        response.setId(rating.getId());
        response.setTotalScore(rating.getTotalScore());
        response.setStatus(rating.getStatus());
        response.setRemark(rating.getRemark());
        response.setStatus(rating.getState());
        response.setRemark(rating.getFeedback());
        
        // 获取评分项
        List<ActivityPlayerRatingItem> items = activityPlayerRatingItemRepository
@@ -210,9 +212,9 @@
        List<CurrentJudgeRatingResponse.CurrentJudgeRatingItemResponse> itemResponses = items.stream()
                .map(item -> new CurrentJudgeRatingResponse.CurrentJudgeRatingItemResponse(
                        item.getRatingItemId(),
                        item.getRatingItemName(),
                        "", // 评分项名称暂时为空
                        item.getScore(),
                        item.getWeightedScore()
                        item.getScore() // 使用得分作为加权得分
                ))
                .collect(java.util.stream.Collectors.toList());
        
@@ -257,22 +259,29 @@
            Long judgeId = ((Number) row.get("id")).longValue();
            String judgeName = (String) row.get("name");
            
            // 查找该评委的评分
            Optional<ActivityPlayerRating> ratingOpt = activityPlayerRatingRepository
                    .findByActivityPlayerIdAndJudgeId(activityPlayerId, judgeId);
            // 查找该评委的评分记录数量(从t_activity_player_rating表按activity_player_id和judge_id查询)
            String ratingCountSql = "SELECT COUNT(*) FROM t_activity_player_rating WHERE activity_player_id = ? AND judge_id = ?";
            Integer ratingCount = jdbcTemplate.queryForObject(ratingCountSql, Integer.class, activityPlayerId, judgeId);
            
            Boolean hasRated = ratingCount != null && ratingCount > 0; // 评审次数>0表示已评审
            String ratingTime = null;
            BigDecimal totalScore = null;
            Integer status = 0;
            
            if (ratingOpt.isPresent()) {
                ActivityPlayerRating rating = ratingOpt.get();
                totalScore = rating.getTotalScore();
                status = rating.getStatus();
            // 如果已评分,获取最新的评分记录
            if (hasRated) {
                Optional<ActivityPlayerRating> ratingOpt = activityPlayerRatingRepository
                        .findByActivityPlayerIdAndJudgeId(activityPlayerId, judgeId);
                if (ratingOpt.isPresent()) {
                    ActivityPlayerRating rating = ratingOpt.get();
                    totalScore = rating.getTotalScore();
                    if (rating.getUpdateTime() != null) {
                        ratingTime = rating.getUpdateTime().toString();
                    }
                }
            }
            
            Boolean isCurrentJudge = judgeId.equals(currentJudgeId);
            return new JudgeRatingStatusResponse(judgeId, judgeName, totalScore, status, isCurrentJudge);
            return new JudgeRatingStatusResponse(judgeId, judgeName, hasRated, ratingTime, totalScore);
        }).collect(java.util.stream.Collectors.toList());
    }