From 36f9a3beee8721f61c533ed7f1b201d7baac1a51 Mon Sep 17 00:00:00 2001 From: Jade Date: Wed, 10 Nov 2021 13:13:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=B4=E7=A0=81=E8=BD=A6=E5=88=B0=E7=AB=99?= =?UTF-8?q?=E5=85=88=E5=9B=9E=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../services/completition/CompetitionPracticalService.java | 7 ++++++- .../cbtc/ATS/service/stage/AtsHeadTrainStageService.java | 2 ++ .../vo/client/competition/CompetitionPagedQueryVO.java | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) 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; }