【增加IBP计轴复位预处理逻辑】

This commit is contained in:
weizhihong 2023-05-30 16:46:18 +08:00
parent 6cfa675ead
commit 72024821b0
1 changed files with 9 additions and 6 deletions

View File

@ -263,12 +263,15 @@ public class VirtualRealityIbpService implements IVirtualRealityIbpService {
if (ibp == null)
continue;
List<VirtualRealityIbp.IbpElement> buttons = ibp.queryByMean(VirtualRealityIbp.Mean.PRERESET_Z);
if (CollectionUtils.isEmpty(buttons))
continue;
VirtualRealityIbp.SquareButton preResetButton =
(VirtualRealityIbp.SquareButton) buttons.get(0);
if (!preResetButton.isPressed())
continue;
if (CollectionUtils.isEmpty(buttons)) { // 如果没有按钮判断车站是否有预处理倒计时时间 20230530 wei
if (station.getPreResetValidDuration().get() <= 0) {
continue;
}
} else {
VirtualRealityIbp.SquareButton preResetButton = (VirtualRealityIbp.SquareButton) buttons.get(0);
if (!preResetButton.isPressed())
continue;
}
LocalDateTime now = LocalDateTime.now();
for (VirtualRealityIbp.IbpElement ibpElement : ibp.queryByMean(VirtualRealityIbp.Mean.AXLE_PRE_RESET)) {
VirtualRealityIbp.SquareButton button = (VirtualRealityIbp.SquareButton) ibpElement;