feat: 添加编排预计时长显示

1. CompetitionGroupDTO添加estimatedDuration字段
2. ScheduleGroupDetailVO添加estimatedDuration字段
3. SQL查询添加estimated_duration
4. 前端场地视图显示合计时间

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
2026-01-15 15:56:28 +08:00
co-authored by factory-droid[bot]
parent 82ae96503d
commit bc235b8fbe
5 changed files with 10 additions and 0 deletions
@@ -12,6 +12,7 @@
g.total_teams AS totalTeams, g.total_teams AS totalTeams,
g.total_participants AS totalParticipants, g.total_participants AS totalParticipants,
g.display_order AS displayOrder, g.display_order AS displayOrder,
g.estimated_duration AS estimatedDuration,
d.id AS detailId, d.id AS detailId,
d.venue_id AS venueId, d.venue_id AS venueId,
d.venue_name AS venueName, d.venue_name AS venueName,
@@ -77,6 +77,12 @@ public class CompetitionGroupDTO implements Serializable {
@Schema(description = "时间段索引") @Schema(description = "时间段索引")
private Integer timeSlotIndex; private Integer timeSlotIndex;
/**
* 预计时长(分钟)
*/
@Schema(description = "预计时长(分钟)")
private Integer estimatedDuration;
/** /**
* 参赛人员列表 * 参赛人员列表
*/ */
@@ -21,6 +21,7 @@ public class ScheduleGroupDetailVO implements Serializable {
private Integer totalTeams; private Integer totalTeams;
private Integer totalParticipants; private Integer totalParticipants;
private Integer displayOrder; private Integer displayOrder;
private Integer estimatedDuration; // 预计时长(分钟)
// === 编排明细信息 === // === 编排明细信息 ===
private Long detailId; private Long detailId;
@@ -176,6 +176,7 @@ public class MartialScheduleArrangeServiceImpl implements IMartialScheduleArrang
groupData.put("displayOrder", group.getDisplayOrder()); groupData.put("displayOrder", group.getDisplayOrder());
groupData.put("totalParticipants", group.getTotalParticipants()); groupData.put("totalParticipants", group.getTotalParticipants());
groupData.put("totalTeams", group.getTotalTeams()); groupData.put("totalTeams", group.getTotalTeams());
groupData.put("estimatedDuration", group.getEstimatedDuration());
// 获取该分组的场地时间段详情 // 获取该分组的场地时间段详情
LambdaQueryWrapper<MartialScheduleDetail> detailWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<MartialScheduleDetail> detailWrapper = new LambdaQueryWrapper<>();
@@ -245,6 +245,7 @@ public class MartialScheduleServiceImpl extends ServiceImpl<MartialScheduleMappe
groupDTO.setVenueName(firstDetail.getVenueName()); groupDTO.setVenueName(firstDetail.getVenueName());
groupDTO.setTimeSlot(firstDetail.getTimeSlot()); groupDTO.setTimeSlot(firstDetail.getTimeSlot());
groupDTO.setTimeSlotIndex(firstDetail.getTimeSlotIndex() != null ? firstDetail.getTimeSlotIndex() : 0); groupDTO.setTimeSlotIndex(firstDetail.getTimeSlotIndex() != null ? firstDetail.getTimeSlotIndex() : 0);
groupDTO.setEstimatedDuration(firstDetail.getEstimatedDuration());
// 获取参赛者列表 // 获取参赛者列表
List<ParticipantDTO> participantDTOs = groupDetails.stream() List<ParticipantDTO> participantDTOs = groupDetails.stream()