Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
c3a09a1b09
@ -11,7 +11,8 @@ public enum MapPrdTypeEnum {
|
||||
SCHEDULING("05", "派班工作站"),
|
||||
ISCS("06", "ISCS工作站"),
|
||||
BIG_SCREEN("07", "大屏工作站"),
|
||||
RUN_PLAN_MAKE("08", "运行图编制工作站")
|
||||
RUN_PLAN_MAKE("08", "运行图编制工作站"),
|
||||
DEPOT_IL("09", "车辆段联锁工作站"),
|
||||
;
|
||||
|
||||
private String code;
|
||||
|
@ -11,13 +11,7 @@ import club.joylink.rtss.vo.client.validGroup.DraftMapCreateCheck;
|
||||
import club.joylink.rtss.vo.client.validGroup.DraftMapCreateFromCheck;
|
||||
import club.joylink.rtss.vo.client.validGroup.DraftMapPublishCheck;
|
||||
import club.joylink.rtss.vo.map.*;
|
||||
import club.joylink.rtss.vo.map.logic.MapAutoReentryVO;
|
||||
import club.joylink.rtss.vo.map.logic.MapAutoSignalNewVO;
|
||||
import club.joylink.rtss.vo.map.logic.MapDestinationCodeDefinitionVO;
|
||||
import club.joylink.rtss.vo.map.logic.MapRouteNewVO;
|
||||
import club.joylink.rtss.vo.map.logic.MapRoutingDataVO;
|
||||
import club.joylink.rtss.vo.map.logic.MapSignalApproachSectionVO;
|
||||
import club.joylink.rtss.vo.map.logic.MapStationParkingTimeVO;
|
||||
import club.joylink.rtss.vo.map.logic.*;
|
||||
import club.joylink.rtss.vo.map.query.MapAutoReentryQueryVO;
|
||||
import club.joylink.rtss.vo.map.query.MapDestinationCodeDefinitionQueryVO;
|
||||
import club.joylink.rtss.vo.map.query.MapParkTimeQueryVO;
|
||||
@ -111,9 +105,6 @@ public class DraftMapController {
|
||||
this.iDraftMapService.updateCheckConfig(id, checkConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存地图元素信息
|
||||
*/
|
||||
/**
|
||||
*保存地图草稿对象数据
|
||||
*/
|
||||
|
@ -410,6 +410,10 @@ public class Operation {
|
||||
Driver_Change_Head,
|
||||
/** 列车车门开关 */
|
||||
Driver_Door_On_Off,
|
||||
/** 列车门模式 */
|
||||
Driver_Door_Mode,
|
||||
/** 列车门选择 */
|
||||
Driver_Door_Selection,
|
||||
|
||||
//--------------------------- 方向杆 ---------------------------
|
||||
/** 方向转换 */
|
||||
|
@ -5,11 +5,9 @@ import club.joylink.rtss.simulation.cbtc.ATP.ground.ZCLogicLoop;
|
||||
import club.joylink.rtss.simulation.cbtc.ATS.operation.Operation;
|
||||
import club.joylink.rtss.simulation.cbtc.ATS.operation.annotation.OperateHandler;
|
||||
import club.joylink.rtss.simulation.cbtc.ATS.operation.annotation.OperateHandlerMapping;
|
||||
import club.joylink.rtss.simulation.cbtc.CI.CiApiService;
|
||||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
||||
import club.joylink.rtss.simulation.cbtc.constant.ControlGear;
|
||||
import club.joylink.rtss.simulation.cbtc.constant.DriveMode;
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.Stand;
|
||||
import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityTrain;
|
||||
import club.joylink.rtss.simulation.cbtc.exception.SimulationException;
|
||||
import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType;
|
||||
@ -18,7 +16,6 @@ import club.joylink.rtss.simulation.cbtc.onboard.ATP.ATPService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
@ -171,5 +168,33 @@ public class DriverOperateHandler {
|
||||
ATPService.openOrCloseDoor(simulation, train, right, open);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置门模式
|
||||
*
|
||||
* @param groupNumber 车组号
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Driver_Door_Mode)
|
||||
public void setDriverDoorMode(Simulation simulation, String groupNumber,
|
||||
VirtualRealityTrain.DoorMode doorMode) {
|
||||
if (Objects.isNull(doorMode)) {
|
||||
throw new SimulationException(SimulationExceptionType.Illegal_Argument, "门模式不能为空");
|
||||
}
|
||||
VirtualRealityTrain train = simulation.getRepository().getOnlineTrainBy(groupNumber);
|
||||
train.setDoorMode(doorMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置门选择
|
||||
*
|
||||
* @param groupNumber 车组号
|
||||
*/
|
||||
@OperateHandlerMapping(type = Operation.Type.Driver_Door_Selection)
|
||||
public void setDriverDoorSelection(Simulation simulation, String groupNumber,
|
||||
VirtualRealityTrain.DoorSelection doorSelection) {
|
||||
if (Objects.isNull(doorSelection)) {
|
||||
throw new SimulationException(SimulationExceptionType.Illegal_Argument, "门选择不能为空");
|
||||
}
|
||||
VirtualRealityTrain train = simulation.getRepository().getOnlineTrainBy(groupNumber);
|
||||
train.setDoorSelection(doorSelection);
|
||||
}
|
||||
}
|
||||
|
@ -621,7 +621,7 @@ public class AtsTrainLoadService {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
int loadedNum = 0;
|
||||
for (TrainLoadParam2 trainLoadParam2 : trainLoadList) {
|
||||
if (loadedNum > num) {
|
||||
if (loadedNum == num) {
|
||||
break;
|
||||
}
|
||||
TripPlan tripPlan = trainLoadParam2.getTripPlan();
|
||||
|
@ -163,6 +163,16 @@ public class TrainHmiDisplay {
|
||||
/** 牵引、制动力百分比 */
|
||||
private int forcePercent;
|
||||
|
||||
/**
|
||||
* 门模式
|
||||
*/
|
||||
private String doorMode;
|
||||
|
||||
/**
|
||||
* 门选择
|
||||
*/
|
||||
private String doorSelection;
|
||||
|
||||
public TrainHmiDisplay(VirtualRealityTrain train) {
|
||||
this.code = train.getCode();
|
||||
this.groupNumber = train.getGroupNumber();
|
||||
@ -217,6 +227,8 @@ public class TrainHmiDisplay {
|
||||
this.inTheStandArea = train.isInTheStandArea();
|
||||
this.tow = getTow(train);
|
||||
this.forcePercent = getForcePercent(train);
|
||||
this.doorMode = train.getDoorMode().toString();
|
||||
this.doorSelection = train.getDoorSelection().toString();
|
||||
}
|
||||
|
||||
private int getForcePercent(VirtualRealityTrain train) {
|
||||
@ -392,6 +404,14 @@ public class TrainHmiDisplay {
|
||||
this.forcePercent = forcePercent;
|
||||
map.put("forcePercent", forcePercent);
|
||||
}
|
||||
if (!Objects.equals(this.doorMode, train.getDoorMode().toString())) {
|
||||
this.doorMode = train.getDoorMode().toString();
|
||||
map.put("doorMode", this.doorMode);
|
||||
}
|
||||
if (!Objects.equals(this.doorSelection, train.getDoorSelection().toString())) {
|
||||
this.doorSelection = train.getDoorSelection().toString();
|
||||
map.put("doorSelection", this.doorSelection);
|
||||
}
|
||||
if (map.size() > 0) {
|
||||
map.put("code", this.code);
|
||||
return map;
|
||||
|
@ -324,6 +324,16 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
|
||||
*/
|
||||
private Door door2;
|
||||
|
||||
/**
|
||||
* 门模式
|
||||
*/
|
||||
private DoorMode doorMode;
|
||||
|
||||
/**
|
||||
* 门选
|
||||
*/
|
||||
private DoorSelection doorSelection;
|
||||
|
||||
/**
|
||||
* 牵引力,单位kN
|
||||
* 公式 fk = 350 (0 <= v <= 36km/h)
|
||||
@ -488,6 +498,8 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
|
||||
this.atpOn = true;
|
||||
this.door1 = new Door("1");
|
||||
this.door2 = new Door("2");
|
||||
this.doorMode = DoorMode.AM;
|
||||
this.doorSelection = DoorSelection.Z;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -553,6 +565,8 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
|
||||
this.autoOpenATO = false;
|
||||
this.fault = null;
|
||||
this.released = false;
|
||||
this.doorMode = DoorMode.AM;
|
||||
this.doorSelection = DoorSelection.Z;
|
||||
}
|
||||
|
||||
public boolean isEB() {
|
||||
@ -1274,4 +1288,43 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
|
||||
ACCELERATE,
|
||||
}
|
||||
|
||||
public enum DoorMode {
|
||||
/**
|
||||
* 自动开手动关
|
||||
*/
|
||||
AM,
|
||||
/**
|
||||
* 手动开手动关
|
||||
*/
|
||||
MM,
|
||||
/**
|
||||
* 自动开自动关
|
||||
*/
|
||||
AA,
|
||||
;
|
||||
|
||||
public boolean isAuto(boolean open) {
|
||||
return (open && this.equals(MM)) || (!open && !this.equals(AA));
|
||||
}
|
||||
}
|
||||
|
||||
public enum DoorSelection {
|
||||
/**
|
||||
* 左
|
||||
*/
|
||||
L,
|
||||
/**
|
||||
* 右
|
||||
*/
|
||||
R,
|
||||
/**
|
||||
* 零位
|
||||
*/
|
||||
Z,
|
||||
;
|
||||
|
||||
public boolean match(boolean right) {
|
||||
return (right && this.equals(R)) || (!right && this.equals(L));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -293,19 +293,18 @@ public class ATPLogicLoop {
|
||||
switch (activity) {
|
||||
case PARK: // 停靠
|
||||
train.nextParkedTrainActivity();
|
||||
if (train.isAtoOn()) {
|
||||
atoService.closeATO(train);
|
||||
train.setAutoOpenATO(true);
|
||||
}
|
||||
break;
|
||||
case OPEN_DOOR: // 开门
|
||||
if (train.isAtoOn()) {
|
||||
if (!train.getDoorMode().equals(VirtualRealityTrain.DoorMode.MM)) { // 不是自动开门
|
||||
this.atoService.syncOpenDoor(simulation, train);
|
||||
}
|
||||
if (this.isAllDoorOpen(simulation, train)) {
|
||||
train.nextParkedTrainActivity();
|
||||
if (train.isAtoOn()) {
|
||||
atoService.closeATO(train);
|
||||
train.setAutoOpenATO(true);
|
||||
}
|
||||
}
|
||||
// }
|
||||
break;
|
||||
case BOARD: // 乘客乘降
|
||||
break;
|
||||
@ -319,6 +318,9 @@ public class ATPLogicLoop {
|
||||
// }
|
||||
// 可以关门
|
||||
// this.atoService.syncCloseDoor(simulation, train);
|
||||
if (train.getDoorMode().equals(VirtualRealityTrain.DoorMode.AA)) { // 自动关门
|
||||
this.atoService.syncCloseDoor(simulation, train);
|
||||
}
|
||||
if (this.isAllDoorClose(simulation, train)) {
|
||||
train.nextParkedTrainActivity();
|
||||
}
|
||||
|
@ -293,6 +293,14 @@ public class ATPService {
|
||||
log.warn(String.format("列车[%s]未停止,不能操作车门", train.getGroupNumber()));
|
||||
return;
|
||||
}
|
||||
if (!train.getDoorMode().isAuto(open)) {
|
||||
log.warn(String.format("列车[%s]门模式自动,不能操作车门", train.getGroupNumber()));
|
||||
return;
|
||||
}
|
||||
if (!train.getDoorSelection().match(right)) {
|
||||
log.warn(String.format("列车[%s]门选择与操作不匹配", train.getGroupNumber()));
|
||||
return;
|
||||
}
|
||||
List<Stand> standList = train.getHeadPosition().getSection().getStandList();
|
||||
VirtualRealityTrain.Door door = train.getDoorByDirection(right);
|
||||
if (open) {
|
||||
|
@ -1,26 +0,0 @@
|
||||
package club.joylink.rtss.vo.client.map.newmap;
|
||||
|
||||
import club.joylink.rtss.vo.map.MapCISwitchVO;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 敌对信号
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class ConflictingSignalVO {
|
||||
/**
|
||||
* 信号机code
|
||||
*/
|
||||
@NotBlank(message = "敌对信号信号机code不能为空")
|
||||
private String signalCode;
|
||||
/**
|
||||
* 道岔位置条件
|
||||
*/
|
||||
private List<MapCISwitchVO> switchPositionList;
|
||||
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package club.joylink.rtss.vo.client.map.newmap;
|
||||
|
||||
import club.joylink.rtss.vo.client.PageQueryVO;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class MapApproachSectionQueryVO extends PageQueryVO {
|
||||
|
||||
private String signalCode;
|
||||
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
package club.joylink.rtss.vo.client.map.newmap;
|
||||
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.RouteOverlapElement;
|
||||
import club.joylink.rtss.vo.map.MapCISwitchVO;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 延续保护线路
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class MapOverlapRelSectionSwitchVO {
|
||||
|
||||
/**
|
||||
* 进路延续保护区段数据列表
|
||||
*/
|
||||
private List<String> routeOverlapSectionList;
|
||||
|
||||
/**
|
||||
* 进路延续保护道岔数据列表
|
||||
*/
|
||||
private List<MapCISwitchVO> routeOverlapSwitchList;
|
||||
|
||||
public MapOverlapRelSectionSwitchVO(){
|
||||
routeOverlapSectionList = new ArrayList<>();
|
||||
routeOverlapSwitchList = new ArrayList<>();
|
||||
}
|
||||
|
||||
public static List<MapOverlapRelSectionSwitchVO> convertBO2VOList(List<RouteOverlapElement> list) {
|
||||
List<MapOverlapRelSectionSwitchVO> voList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
for (RouteOverlapElement routeOverlapElement : list) {
|
||||
|
||||
}
|
||||
}
|
||||
return voList;
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
package club.joylink.rtss.vo.client.map.newmap.validate;
|
||||
|
||||
public interface RailwayRouteCreateCheck {
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package club.joylink.rtss.vo.map.display;
|
||||
|
||||
import club.joylink.rtss.constants.MapPrdTypeEnum;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
@ -10,6 +11,7 @@ import java.util.List;
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
public class DisplayVO {
|
||||
private MapPrdTypeEnum type;
|
||||
private List<String> stationCodeList;
|
||||
|
||||
private List<String> elementList;
|
||||
|
Loading…
Reference in New Issue
Block a user