调整列车区段没有值得问题
All checks were successful
CI / Docker-Build (push) Successful in 5m14s

This commit is contained in:
tiger_zhou 2024-08-16 18:59:18 +08:00
parent 4cd80bbec5
commit e93171e958

View File

@ -21,6 +21,7 @@ import club.joylink.rtss.vo.client.WebSocketMessageType;
import club.joylink.rtss.vo.client.factory.SocketMessageFactory;
import club.joylink.rtss.websocket.StompMessageService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
@ -102,9 +103,9 @@ public class ATSMessageCollectAndDispatcher {
TrainStatus trainStatus = repository.findStatusByCode(train.getGroupNumber(), TrainStatus.class);
if (Objects.isNull(trainStatus)) {
// if(simulation.getBuildParams().getProdType() == MapPrdTypeEnum.YJDDZH){
if(Objects.equals(simulation.getProject(),MapPrdTypeEnum.YJDDZH.name())){
if (Objects.equals(simulation.getProject(), MapPrdTypeEnum.YJDDZH.name())) {
trainStatus = new YJDDZHTrainStatus(train);
}else{
} else {
trainStatus = new TrainStatus(train);
}
repository.addDeviceInfo(trainStatus);
@ -112,10 +113,11 @@ public class ATSMessageCollectAndDispatcher {
} else {
DeviceStatusVO statusVO;
// if(simulation.getBuildParams().getProdType() == MapPrdTypeEnum.YJDDZH){
if(Objects.equals(simulation.getProject(),MapPrdTypeEnum.YJDDZH.name())){
if (Objects.equals(simulation.getProject(), MapPrdTypeEnum.YJDDZH.name())) {
statusVO = new YJDDZHTrainStatusVO(train);
}else{
statusVO = new TrainStatusVO(train);
} else {
// statusVO = new TrainStatusVO(train);
statusVO = new TrainStatusVO(trainStatus);
}
if (trainStatus.compareAndChange(train, statusVO)) {
totalList.add(statusVO);