fix: optimize schedule query and add scheduleDate field

- Add scheduleDate field to ScheduleGroupDetailVO
- Fix schedule date format in mapper XML
- Optimize schedule service implementation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-24 17:01:54 +08:00
parent 432ccb606c
commit e7b8a1c59d
4 changed files with 7 additions and 3 deletions

View File

@@ -17,6 +17,7 @@
d.venue_name AS venueName, d.venue_name AS venueName,
d.time_slot AS timeSlot, d.time_slot AS timeSlot,
d.time_slot_index AS timeSlotIndex, d.time_slot_index AS timeSlotIndex,
d.schedule_date AS scheduleDate,
p.id AS participantId, p.id AS participantId,
p.organization AS organization, p.organization AS organization,
p.check_in_status AS checkInStatus, p.check_in_status AS checkInStatus,

View File

@@ -29,6 +29,9 @@ public class ScheduleGroupDetailVO implements Serializable {
private String timeSlot; private String timeSlot;
private Integer timeSlotIndex; // 时间段索引(0=第1天上午,1=第1天下午,2=第2天上午,...) private Integer timeSlotIndex; // 时间段索引(0=第1天上午,1=第1天下午,2=第2天上午,...)
// === 比赛日期 ===
private String scheduleDate;
// === 参赛者信息 === // === 参赛者信息 ===
private Long participantId; private Long participantId;
private String organization; private String organization;

View File

@@ -744,7 +744,7 @@ public class MartialScheduleArrangeServiceImpl implements IMartialScheduleArrang
participant.setScheduleDetailId(detailId); participant.setScheduleDetailId(detailId);
participant.setScheduleGroupId(groupId); participant.setScheduleGroupId(groupId);
participant.setParticipantId(athlete.getId()); participant.setParticipantId(athlete.getId());
participant.setOrganization(athlete.getOrganization()); participant.setOrganization(athlete.getTeamName() != null && !athlete.getTeamName().isEmpty() ? athlete.getTeamName() : athlete.getOrganization());
participant.setPlayerName(athlete.getPlayerName()); participant.setPlayerName(athlete.getPlayerName());
participant.setProjectName(groupData.getGroupName()); participant.setProjectName(groupData.getGroupName());
participant.setCategory(athlete.getCategory()); participant.setCategory(athlete.getCategory());

View File

@@ -103,7 +103,7 @@ public class MartialScheduleServiceImpl extends ServiceImpl<MartialScheduleMappe
if (participants.isEmpty()) { if (participants.isEmpty()) {
// 没有参赛者,创建一条基础记录 // 没有参赛者,创建一条基础记录
ScheduleExportExcel excel = new ScheduleExportExcel(); ScheduleExportExcel excel = new ScheduleExportExcel();
excel.setScheduleDate(""); excel.setScheduleDate(firstDetail.getScheduleDate() != null ? firstDetail.getScheduleDate() : "");
excel.setTimeSlot(firstDetail.getTimeSlot()); excel.setTimeSlot(firstDetail.getTimeSlot());
excel.setVenueName(firstDetail.getVenueName()); excel.setVenueName(firstDetail.getVenueName());
excel.setProjectName(firstDetail.getGroupName()); excel.setProjectName(firstDetail.getGroupName());
@@ -114,7 +114,7 @@ public class MartialScheduleServiceImpl extends ServiceImpl<MartialScheduleMappe
// 为每个参赛者创建导出记录 // 为每个参赛者创建导出记录
for (ScheduleGroupDetailVO detail : participants) { for (ScheduleGroupDetailVO detail : participants) {
ScheduleExportExcel excel = new ScheduleExportExcel(); ScheduleExportExcel excel = new ScheduleExportExcel();
excel.setScheduleDate(""); excel.setScheduleDate(detail.getScheduleDate() != null ? detail.getScheduleDate() : "");
excel.setTimeSlot(detail.getTimeSlot()); excel.setTimeSlot(detail.getTimeSlot());
excel.setVenueName(detail.getVenueName()); excel.setVenueName(detail.getVenueName());
excel.setProjectName(detail.getGroupName()); excel.setProjectName(detail.getGroupName());