fix: 修复裁判评分列表数据不一致问题
- MartialMiniController: getAthletes方法添加venueId过滤 - MiniScoreModifyDTO: 添加venueId字段 - MartialScoreServiceImpl: modifyScoreByAdmin方法设置venueId 问题原因: 1. 后端查询评分记录时缺少场地过滤 2. 裁判长修改评分时未设置venue_id 导致不同场地的裁判看到混乱的数据
This commit is contained in:
@@ -350,6 +350,10 @@ public class MartialMiniController extends BladeController {
|
|||||||
if (projectId != null) {
|
if (projectId != null) {
|
||||||
scoreQuery.eq(MartialScore::getProjectId, projectId);
|
scoreQuery.eq(MartialScore::getProjectId, projectId);
|
||||||
}
|
}
|
||||||
|
// 添加场地过滤
|
||||||
|
if (venueId != null) {
|
||||||
|
scoreQuery.eq(MartialScore::getVenueId, venueId);
|
||||||
|
}
|
||||||
// 排除裁判长的评分
|
// 排除裁判长的评分
|
||||||
if (!chiefJudgeIds.isEmpty()) {
|
if (!chiefJudgeIds.isEmpty()) {
|
||||||
scoreQuery.notIn(MartialScore::getJudgeId, chiefJudgeIds);
|
scoreQuery.notIn(MartialScore::getJudgeId, chiefJudgeIds);
|
||||||
|
|||||||
@@ -28,4 +28,7 @@ public class MiniScoreModifyDTO implements Serializable {
|
|||||||
|
|
||||||
@Schema(description = "修改原因/备注")
|
@Schema(description = "修改原因/备注")
|
||||||
private String note;
|
private String note;
|
||||||
|
|
||||||
|
@Schema(description = "场地ID")
|
||||||
|
private Long venueId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -384,6 +384,7 @@ public class MartialScoreServiceImpl extends ServiceImpl<MartialScoreMapper, Mar
|
|||||||
modificationRecord.setCompetitionId(athlete.getCompetitionId());
|
modificationRecord.setCompetitionId(athlete.getCompetitionId());
|
||||||
modificationRecord.setAthleteId(athlete.getId());
|
modificationRecord.setAthleteId(athlete.getId());
|
||||||
modificationRecord.setProjectId(athlete.getProjectId());
|
modificationRecord.setProjectId(athlete.getProjectId());
|
||||||
|
modificationRecord.setVenueId(dto.getVenueId()); // 设置场地ID
|
||||||
modificationRecord.setJudgeId(dto.getModifierId());
|
modificationRecord.setJudgeId(dto.getModifierId());
|
||||||
modificationRecord.setScore(dto.getModifiedScore());
|
modificationRecord.setScore(dto.getModifiedScore());
|
||||||
modificationRecord.setOriginalScore(originalCalculatedScore); // 保存原始计算总分
|
modificationRecord.setOriginalScore(originalCalculatedScore); // 保存原始计算总分
|
||||||
|
|||||||
Reference in New Issue
Block a user