修改列车停站后无法开站台门bug
This commit is contained in:
parent
6d37169068
commit
a3846f459b
@ -42,25 +42,25 @@ public class CiStandService {
|
||||
switch (source) {
|
||||
case SIG: {
|
||||
VirtualRealityPsl vrPsl = stand.getVrPsl();
|
||||
if (vrPsl != null && vrPsl.isAllowOperation()) {
|
||||
if (vrPsl != null && vrPsl.isAllowOperate()) {
|
||||
return false;
|
||||
}
|
||||
VirtualRealityIbp vrIbp = stand.getStation().getVrIbp();
|
||||
if (vrIbp != null && vrIbp.isAllowOperation(true, config.isUp(stand.isRight()))) {
|
||||
if (vrIbp != null && !vrIbp.isAllowOperate(true, config.isUp(stand.isRight()))) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PSL: {
|
||||
VirtualRealityPsl vrPsl = stand.getVrPsl();
|
||||
if (vrPsl == null || !vrPsl.isAllowOperation()) {
|
||||
if (vrPsl == null || !vrPsl.isAllowOperate()) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IBP: {
|
||||
VirtualRealityIbp vrIbp = stand.getStation().getVrIbp();
|
||||
if (vrIbp == null || !vrIbp.isAllowOperation(false, config.isUp(stand.isRight()))) {
|
||||
if (vrIbp == null || !vrIbp.isAllowOperate(false, config.isUp(stand.isRight()))) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
@ -125,7 +125,7 @@ public class VirtualRealityIbp extends VirtualRealityDevice {
|
||||
* @param up 是否是上行
|
||||
* @return
|
||||
*/
|
||||
public boolean isAllowOperation(boolean signal, boolean up) {
|
||||
public boolean isAllowOperate(boolean signal, boolean up) {
|
||||
List<IbpElement> elements = up ? queryByMean(Mean.SXYS) : queryByMean(Mean.XXYS);
|
||||
if (CollectionUtils.isEmpty(elements)) {
|
||||
return true;
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.simulation.cbtc.data.vr;
|
||||
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.MapNamedElement;
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.Stand;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@ -52,7 +51,7 @@ public class VirtualRealityPsl extends VirtualRealityDevice {
|
||||
this.sdButton = false;
|
||||
}
|
||||
|
||||
public boolean isAllowOperation() {
|
||||
public boolean isAllowOperate() {
|
||||
return this.isYxjzKey();
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ public class SimulationRobotService {
|
||||
}
|
||||
}
|
||||
VirtualRealityPsl vrPsl = stand.getVrPsl();
|
||||
if (!vrPsl.isAllowOperation()) { //确保此时允许操作
|
||||
if (!vrPsl.isAllowOperate()) { //确保此时允许操作
|
||||
iVirtualRealityPslService.pressTheButton(simulation,
|
||||
stand.getCode(), VirtualRealityPsl.Button.YXJZ);
|
||||
}
|
||||
@ -141,7 +141,7 @@ public class SimulationRobotService {
|
||||
iVirtualRealityPslService.pressTheButton(simulation,
|
||||
stand.getCode(), VirtualRealityPsl.Button.GM);
|
||||
}
|
||||
if (vrPsl.isAllowOperation()) { //将允许禁止钥匙打到禁止位
|
||||
if (vrPsl.isAllowOperate()) { //将允许禁止钥匙打到禁止位
|
||||
iVirtualRealityPslService.pressTheButton(simulation,
|
||||
stand.getCode(), VirtualRealityPsl.Button.YXJZ);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user