多点登录被登出后发送socket消息;ARB故障在有非通信车接近时改为计轴故障
This commit is contained in:
parent
3607e9ebe2
commit
6dee8dfa31
@ -570,7 +570,6 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
this.draftMapRouteFlankProtectionDAO.insert(entity);
|
this.draftMapRouteFlankProtectionDAO.insert(entity);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void deleteMapLogicData(Long id) {
|
private void deleteMapLogicData(Long id) {
|
||||||
|
@ -21,9 +21,12 @@ import club.joylink.rtss.vo.AccountVO;
|
|||||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||||
import club.joylink.rtss.vo.client.LoginStatusVO;
|
import club.joylink.rtss.vo.client.LoginStatusVO;
|
||||||
import club.joylink.rtss.vo.client.LoginUserVO;
|
import club.joylink.rtss.vo.client.LoginUserVO;
|
||||||
|
import club.joylink.rtss.vo.client.SocketMessageVO;
|
||||||
|
import club.joylink.rtss.vo.client.factory.SocketMessageFactory;
|
||||||
import club.joylink.rtss.vo.client.project.ProjectDeviceVO;
|
import club.joylink.rtss.vo.client.project.ProjectDeviceVO;
|
||||||
import club.joylink.rtss.vo.client.project.RelationLoginConfigVO;
|
import club.joylink.rtss.vo.client.project.RelationLoginConfigVO;
|
||||||
import club.joylink.rtss.vo.wx.WmUserSession;
|
import club.joylink.rtss.vo.wx.WmUserSession;
|
||||||
|
import club.joylink.rtss.websocket.StompMessageService;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -74,6 +77,9 @@ public class AuthenticateService implements IAuthenticateService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ProjectSimulationService projectSimulationService;
|
private ProjectSimulationService projectSimulationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StompMessageService stompMessageService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LoginStatusVO getWmLoginUrl(String clientId, String secret, Project project, String deviceCode) {
|
public LoginStatusVO getWmLoginUrl(String clientId, String secret, Project project, String deviceCode) {
|
||||||
String envId = SystemEnv.getSystemEnvIdByName(this.otherConfig.getEnv());
|
String envId = SystemEnv.getSystemEnvIdByName(this.otherConfig.getEnv());
|
||||||
@ -322,6 +328,8 @@ public class AuthenticateService implements IAuthenticateService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (LoginUserInfoVO infoVO : removeList) {
|
for (LoginUserInfoVO infoVO : removeList) {
|
||||||
|
SocketMessageVO<LoginUserInfoVO> message = SocketMessageFactory.buildLoginSomewhereElseMessage(infoVO);
|
||||||
|
stompMessageService.sendToUser(infoVO.getAccountVO().getIdStr(), message);
|
||||||
this.logout(infoVO);
|
this.logout(infoVO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -144,11 +144,11 @@ public class AtpSectionService {
|
|||||||
*/
|
*/
|
||||||
public void sectionARBCheck(Simulation simulation, Section section, List<Section> sectionList) {
|
public void sectionARBCheck(Simulation simulation, Section section, List<Section> sectionList) {
|
||||||
//目前ARB故障才会导致ARB判定
|
//目前ARB故障才会导致ARB判定
|
||||||
if (Section.AxleFault.ARB.equals(section.getFault())) {
|
if (Section.AxleFault.ARB.equals(section.getFault()) && section.getVirtualAxleCounter().isOccupy()) {
|
||||||
if (section.getVirtualAxleCounter().isOccupy() && !sectionList.contains(section)) {
|
if (!sectionList.contains(section)) {
|
||||||
section.judgeAsARB();
|
section.judgeAsARB();
|
||||||
} else if (Section.AxleFault.FAULT.equals(section.getFault()) && section.getVirtualAxleCounter().isOccupy()) {
|
} else {
|
||||||
section.judgeAsNctOccupied();
|
section.setFault(Section.AxleFault.FAULT);
|
||||||
}
|
}
|
||||||
} else if (Section.AxleFault.FAULT.equals(section.getFault()) && section.getVirtualAxleCounter().isOccupy()) {
|
} else if (Section.AxleFault.FAULT.equals(section.getFault()) && section.getVirtualAxleCounter().isOccupy()) {
|
||||||
section.judgeAsNctOccupied();
|
section.judgeAsNctOccupied();
|
||||||
@ -174,9 +174,9 @@ public class AtpSectionService {
|
|||||||
public List<Section> getTrainExistAxleSectionsUnderDelay(Simulation simulation, List<VirtualRealityTrain> trainList) {
|
public List<Section> getTrainExistAxleSectionsUnderDelay(Simulation simulation, List<VirtualRealityTrain> trainList) {
|
||||||
List<Section> list = new ArrayList<>();
|
List<Section> list = new ArrayList<>();
|
||||||
for (VirtualRealityTrain train : trainList) {
|
for (VirtualRealityTrain train : trainList) {
|
||||||
// //只统计非通信车
|
//只统计非通信车
|
||||||
// if (train.isCBTC())
|
if (train.isCommunicable())
|
||||||
// continue;
|
continue;
|
||||||
boolean right = train.isRight();
|
boolean right = train.isRight();
|
||||||
SectionPosition headPosition = train.getHeadPosition();
|
SectionPosition headPosition = train.getHeadPosition();
|
||||||
float offset = 50;
|
float offset = 50;
|
||||||
|
@ -68,6 +68,7 @@ public class ATSLogicLoop {
|
|||||||
this.trainOutboundLoadTool.loadOutboundTrain(simulation);
|
this.trainOutboundLoadTool.loadOutboundTrain(simulation);
|
||||||
this.atsStandService.countDown(simulation);
|
this.atsStandService.countDown(simulation);
|
||||||
this.atsTrainMonitorService.monitor(simulation);
|
this.atsTrainMonitorService.monitor(simulation);
|
||||||
|
this.atsStationService.updateFieldThatChangeOverTime(simulation);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addJobs(Simulation simulation) {
|
public void addJobs(Simulation simulation) {
|
||||||
|
@ -401,7 +401,7 @@ public class AtsStationService {
|
|||||||
/**
|
/**
|
||||||
* 更新车站随时间变化的属性
|
* 更新车站随时间变化的属性
|
||||||
*/
|
*/
|
||||||
public void updateField(Simulation simulation) {
|
public void updateFieldThatChangeOverTime(Simulation simulation) {
|
||||||
List<Station> stations = simulation.getRepository().getStationList();
|
List<Station> stations = simulation.getRepository().getStationList();
|
||||||
for (Station station : stations) {
|
for (Station station : stations) {
|
||||||
//更新车站控制权转换倒计时及有效性
|
//更新车站控制权转换倒计时及有效性
|
||||||
|
@ -191,6 +191,7 @@ public class ATPLogicLoop {
|
|||||||
// EB 触发速度计算
|
// EB 触发速度计算
|
||||||
SpeedCurve ebTriggerCurve = ma.getEbTriggerCurve();
|
SpeedCurve ebTriggerCurve = ma.getEbTriggerCurve();
|
||||||
float ebTriggerRemain = ma.calculateDistanceOfEbTriggerEnd();
|
float ebTriggerRemain = ma.calculateDistanceOfEbTriggerEnd();
|
||||||
|
ma.setEbTriggerCurve(ebTriggerCurve);
|
||||||
float totalDistance = ebTriggerCurve.getTotalDistance();
|
float totalDistance = ebTriggerCurve.getTotalDistance();
|
||||||
if (totalDistance < ebTriggerRemain) {
|
if (totalDistance < ebTriggerRemain) {
|
||||||
ebTriggerRemain = totalDistance;
|
ebTriggerRemain = totalDistance;
|
||||||
@ -198,6 +199,7 @@ public class ATPLogicLoop {
|
|||||||
float atpSpeed = ebTriggerCurve.getSpeedOf(ebTriggerRemain);
|
float atpSpeed = ebTriggerCurve.getSpeedOf(ebTriggerRemain);
|
||||||
// ATO推荐速度计算
|
// ATO推荐速度计算
|
||||||
SpeedCurve speedCurve = SpeedCurve.calculateAtoStopCurveAndUpdate(train, ma);
|
SpeedCurve speedCurve = SpeedCurve.calculateAtoStopCurveAndUpdate(train, ma);
|
||||||
|
ma.setAtoStopCurve(speedCurve);
|
||||||
float atoSpeed = speedCurve.getSpeedOf(speedCurve.getTotalDistance());
|
float atoSpeed = speedCurve.getSpeedOf(speedCurve.getTotalDistance());
|
||||||
train.setAtpSpeed(atpSpeed);
|
train.setAtpSpeed(atpSpeed);
|
||||||
train.setAtoSpeed(atoSpeed);
|
train.setAtoSpeed(atoSpeed);
|
||||||
|
@ -10,6 +10,7 @@ import club.joylink.rtss.simulation.cbtc.data.vo.*;
|
|||||||
import club.joylink.rtss.simulation.cbtc.member.SimulationMember;
|
import club.joylink.rtss.simulation.cbtc.member.SimulationMember;
|
||||||
import club.joylink.rtss.simulation.cbtc.member.SimulationUser;
|
import club.joylink.rtss.simulation.cbtc.member.SimulationUser;
|
||||||
import club.joylink.rtss.simulation.cbtc.message.websocket.SimulationSubscribeTopic;
|
import club.joylink.rtss.simulation.cbtc.message.websocket.SimulationSubscribeTopic;
|
||||||
|
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||||
import club.joylink.rtss.vo.client.SocketMessageVO;
|
import club.joylink.rtss.vo.client.SocketMessageVO;
|
||||||
import club.joylink.rtss.vo.client.WebSocketMessageType;
|
import club.joylink.rtss.vo.client.WebSocketMessageType;
|
||||||
import club.joylink.rtss.vo.client.passenger.PassengerFlowMessage2TD;
|
import club.joylink.rtss.vo.client.passenger.PassengerFlowMessage2TD;
|
||||||
@ -269,6 +270,10 @@ public class SocketMessageFactory {
|
|||||||
return build(WebSocketMessageType.STATION_PFI_NUM, group, data);
|
return build(WebSocketMessageType.STATION_PFI_NUM, group, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static SocketMessageVO<LoginUserInfoVO> buildLoginSomewhereElseMessage(LoginUserInfoVO infoVO) {
|
||||||
|
return build(WebSocketMessageType.Be_Logged_Out, null, infoVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
private static class SpringContextUtil implements ApplicationContextAware {
|
private static class SpringContextUtil implements ApplicationContextAware {
|
||||||
|
Loading…
Reference in New Issue
Block a user