This commit is contained in:
parent
4cd80bbec5
commit
e93171e958
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user