diff --git a/src/main/java/club/joylink/rtss/services/completition/CompetitionPracticalService.java b/src/main/java/club/joylink/rtss/services/completition/CompetitionPracticalService.java index 3ab952099..0714c67a4 100644 --- a/src/main/java/club/joylink/rtss/services/completition/CompetitionPracticalService.java +++ b/src/main/java/club/joylink/rtss/services/completition/CompetitionPracticalService.java @@ -44,6 +44,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; import org.springframework.web.multipart.MultipartFile; import java.time.LocalDateTime; @@ -109,7 +110,11 @@ public class CompetitionPracticalService implements ICompetitionPracticalService @Override public PageVO pagedQueryCompetition(CompetitionPagedQueryVO queryVO) { PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); - Page page = (Page) this.competitionDAO.selectByExample(null); + CompetitionExample competitionExample = new CompetitionExample(); + if (StringUtils.hasText(queryVO.getName())) { + competitionExample.createCriteria().andNameLike(String.format("%%%s%%", queryVO.getName())); + } + Page page = (Page) this.competitionDAO.selectByExample(competitionExample); List list = page.getResult().stream().map(CompetitionVO::new).collect(Collectors.toList()); return PageVO.convert(page, list); } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/stage/AtsHeadTrainStageService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/stage/AtsHeadTrainStageService.java index afde6d42f..eb17ba6a2 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/stage/AtsHeadTrainStageService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/stage/AtsHeadTrainStageService.java @@ -86,6 +86,8 @@ public class AtsHeadTrainStageService implements AtsStageService { * 处理列车到达目的地 */ private void handleArriveDestination(Simulation simulation, TrainInfo trainInfo) { + // 先回库,后设置为人工车 + trainInfo.finishPlanPrepareInbound(); if (simulation.getRepository().getConfig().isSetManualWhenHeadTrainArriveTarget()) { atsTrainService.setManualTrain(simulation, trainInfo.getGroupNumber()); } diff --git a/src/main/java/club/joylink/rtss/vo/client/competition/CompetitionPagedQueryVO.java b/src/main/java/club/joylink/rtss/vo/client/competition/CompetitionPagedQueryVO.java index 0e22569f3..c32e501e7 100644 --- a/src/main/java/club/joylink/rtss/vo/client/competition/CompetitionPagedQueryVO.java +++ b/src/main/java/club/joylink/rtss/vo/client/competition/CompetitionPagedQueryVO.java @@ -1,9 +1,15 @@ package club.joylink.rtss.vo.client.competition; import club.joylink.rtss.vo.client.PageQueryVO; +import lombok.Getter; +import lombok.Setter; /** * 竞赛分页查询 */ +@Getter +@Setter public class CompetitionPagedQueryVO extends PageQueryVO { + + private String name; }