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:
@@ -17,6 +17,7 @@
|
||||
d.venue_name AS venueName,
|
||||
d.time_slot AS timeSlot,
|
||||
d.time_slot_index AS timeSlotIndex,
|
||||
d.schedule_date AS scheduleDate,
|
||||
p.id AS participantId,
|
||||
p.organization AS organization,
|
||||
p.check_in_status AS checkInStatus,
|
||||
|
||||
@@ -29,6 +29,9 @@ public class ScheduleGroupDetailVO implements Serializable {
|
||||
private String timeSlot;
|
||||
private Integer timeSlotIndex; // 时间段索引(0=第1天上午,1=第1天下午,2=第2天上午,...)
|
||||
|
||||
// === 比赛日期 ===
|
||||
private String scheduleDate;
|
||||
|
||||
// === 参赛者信息 ===
|
||||
private Long participantId;
|
||||
private String organization;
|
||||
|
||||
@@ -744,7 +744,7 @@ public class MartialScheduleArrangeServiceImpl implements IMartialScheduleArrang
|
||||
participant.setScheduleDetailId(detailId);
|
||||
participant.setScheduleGroupId(groupId);
|
||||
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.setProjectName(groupData.getGroupName());
|
||||
participant.setCategory(athlete.getCategory());
|
||||
|
||||
@@ -103,7 +103,7 @@ public class MartialScheduleServiceImpl extends ServiceImpl<MartialScheduleMappe
|
||||
if (participants.isEmpty()) {
|
||||
// 没有参赛者,创建一条基础记录
|
||||
ScheduleExportExcel excel = new ScheduleExportExcel();
|
||||
excel.setScheduleDate("");
|
||||
excel.setScheduleDate(firstDetail.getScheduleDate() != null ? firstDetail.getScheduleDate() : "");
|
||||
excel.setTimeSlot(firstDetail.getTimeSlot());
|
||||
excel.setVenueName(firstDetail.getVenueName());
|
||||
excel.setProjectName(firstDetail.getGroupName());
|
||||
@@ -114,7 +114,7 @@ public class MartialScheduleServiceImpl extends ServiceImpl<MartialScheduleMappe
|
||||
// 为每个参赛者创建导出记录
|
||||
for (ScheduleGroupDetailVO detail : participants) {
|
||||
ScheduleExportExcel excel = new ScheduleExportExcel();
|
||||
excel.setScheduleDate("");
|
||||
excel.setScheduleDate(detail.getScheduleDate() != null ? detail.getScheduleDate() : "");
|
||||
excel.setTimeSlot(detail.getTimeSlot());
|
||||
excel.setVenueName(detail.getVenueName());
|
||||
excel.setProjectName(detail.getGroupName());
|
||||
|
||||
Reference in New Issue
Block a user