上饶沙盘特殊改动
This commit is contained in:
parent
f7cb5fca15
commit
10d2c3011e
|
@ -25,12 +25,12 @@ public class LicenseInterceptor implements HandlerInterceptor {
|
|||
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||
// if (SystemEnv.isLocalEnv(otherConfig.getEnv())) {
|
||||
// log.debug(String.format("本地部署许可证验证"));
|
||||
// LicenseVO license = this.licenseService.getLicense();
|
||||
// BusinessExceptionAssertEnum.LICENSE_EXPIRED.assertNotTrue(license.isExpire(), "本地license已过期");
|
||||
// log.debug("本地许可证有效");
|
||||
// }
|
||||
if (SystemEnv.isLocalEnv(otherConfig.getEnv())) {
|
||||
log.debug(String.format("本地部署许可证验证"));
|
||||
LicenseVO license = this.licenseService.getLicense();
|
||||
BusinessExceptionAssertEnum.LICENSE_EXPIRED.assertNotTrue(license.isExpire(), "本地license已过期");
|
||||
log.debug("本地许可证有效");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,8 @@ import club.joylink.rtss.vo.client.PageVO;
|
|||
import club.joylink.rtss.vo.client.runplan.*;
|
||||
import club.joylink.rtss.vo.client.runplan.user.RunPlanRoutingVO;
|
||||
import club.joylink.rtss.vo.client.runplan.user.RunPlanRunlevelVO;
|
||||
import club.joylink.rtss.vo.map.*;
|
||||
import club.joylink.rtss.vo.map.MapVO;
|
||||
import club.joylink.rtss.vo.map.RealLineConfigVO;
|
||||
import club.joylink.rtss.vo.map.graph.MapSectionNewVO;
|
||||
import club.joylink.rtss.vo.map.graph.MapStationNewVO;
|
||||
import club.joylink.rtss.vo.map.graph.MapStationStandNewVO;
|
||||
|
@ -889,10 +890,10 @@ public class RunPlanDraftService implements IRunPlanDraftService {
|
|||
|
||||
//车次里每个站间运行等级速度计5km/h()~100km/h()
|
||||
long runTime = ChronoUnit.SECONDS.between(departureTime, nextArrivalTime);
|
||||
if (runTime <= 0) {
|
||||
errorList.add(String.format("服务号[%s]车次号[%s]从车站[%s]至车站[%s]运行时间<=0,运行时间不合理", s, trip.getTripNumber(), map.findStation(tripTime.getStationCode()).getName(), map.findStation(nextTripTime.getStationCode()).getName()));
|
||||
continue;
|
||||
}
|
||||
// if (runTime <= 0) { 上饶沙盘注掉
|
||||
// errorList.add(String.format("服务号[%s]车次号[%s]从车站[%s]至车站[%s]运行时间<=0,运行时间不合理", s, trip.getTripNumber(), map.findStation(tripTime.getStationCode()).getName(), map.findStation(nextTripTime.getStationCode()).getName()));
|
||||
// continue;
|
||||
// }
|
||||
Float distance = stationSpacingMap.get(tripTime.getSectionCode() + "-" + nextTripTime.getSectionCode());
|
||||
MapSectionNewVO startSection = map.findSection(tripTime.getSectionCode());
|
||||
if (startSection.isReentryTrack() && !startSection.isStandTrack()) {
|
||||
|
@ -906,10 +907,10 @@ public class RunPlanDraftService implements IRunPlanDraftService {
|
|||
errorList.add(String.format("服务号[%s]车次号[%s]从车站[%s]至车站[%s]平均运行速度过慢,应不小于5km/h", s, trip.getTripNumber(), map.findStation(tripTime.getStationCode()).getName(), map.findStation(nextTripTime.getStationCode()).getName()));
|
||||
continue;
|
||||
}
|
||||
if (runTime * 100 * 1000 / 3600 < distance) {
|
||||
errorList.add(String.format("服务号[%s]车次号[%s]从车站[%s]至车站[%s]平均运行速度过快,应不大于100km/h", s, trip.getTripNumber(), map.findStation(tripTime.getStationCode()).getName(), map.findStation(nextTripTime.getStationCode()).getName()));
|
||||
continue;
|
||||
}
|
||||
// if (runTime * 100 * 1000 / 3600 < distance) {
|
||||
// errorList.add(String.format("服务号[%s]车次号[%s]从车站[%s]至车站[%s]平均运行速度过快,应不大于100km/h", s, trip.getTripNumber(), map.findStation(tripTime.getStationCode()).getName(), map.findStation(nextTripTime.getStationCode()).getName()));
|
||||
// continue;
|
||||
// }
|
||||
}
|
||||
|
||||
RunPlanTripTimeVO tripLastStationEndTime = timeList.get(n);
|
||||
|
|
|
@ -318,7 +318,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
|||
if (Objects.nonNull(autoSignal)) {
|
||||
autoSignalList.add(autoSignal);
|
||||
}
|
||||
} else if (signal.isProtectionSignal()) {
|
||||
} else if (signal.isProtectionSignal() || signal.isOutboundSignal()) { //为解决上饶沙盘列车从车辆段至49G后无进路问题
|
||||
// 防护信号机,生成进路
|
||||
if (config.isLikeHa1()) {
|
||||
generatedRouteList.addAll(this.generateRouteLikeHa1(signal, routeCodeGenerator, overlapMap,
|
||||
|
|
|
@ -11,9 +11,9 @@ import club.joylink.rtss.simulation.cbtc.data.map.MapElement;
|
|||
import club.joylink.rtss.simulation.cbtc.data.map.Section;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.client.map.MapDataVO;
|
||||
import club.joylink.rtss.vo.map.MapVO;
|
||||
import club.joylink.rtss.vo.map.logic.MapRoutingDataVO;
|
||||
import club.joylink.rtss.vo.map.logic.MapStationRunLevelVO;
|
||||
import club.joylink.rtss.vo.map.MapVO;
|
||||
import club.joylink.rtss.vo.map.query.MapRunLevelQueryVO;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
|
@ -39,7 +39,14 @@ public class DraftMapRunLevelServiceImpl implements DraftMapRunLevelService {
|
|||
@Override
|
||||
@Transactional
|
||||
public MapStationRunLevelVO generate(MapStationRunLevelVO runLevelVO) {
|
||||
MapDataVO mapData = this.iDraftMapService.getMapData(runLevelVO.getMapId());
|
||||
//因上饶沙盘项目生成车站6至车辆段的站间运行时间的接口参数中无mapId,故加此逻辑
|
||||
long mapId;
|
||||
if (runLevelVO.getMapId() != null) {
|
||||
mapId = runLevelVO.getMapId();
|
||||
} else {
|
||||
mapId = 1254;
|
||||
}
|
||||
MapDataVO mapData = this.iDraftMapService.getMapData(mapId);
|
||||
MapVO map = new MapVO();
|
||||
map.setMapData(mapData);
|
||||
SimulationBuilder.SimulationDeviceBuildResult buildResult = SimulationBuilder.checkAndBuildMapDeviceData(map);
|
||||
|
@ -128,6 +135,10 @@ public class DraftMapRunLevelServiceImpl implements DraftMapRunLevelService {
|
|||
|
||||
@Override
|
||||
public void create(MapStationRunLevelVO runLevelVO) {
|
||||
//因上饶沙盘项目保存站间运行时间的接口参数中无mapId,故加此逻辑
|
||||
if (runLevelVO.getMapId() == null) {
|
||||
runLevelVO.setMapId(1254L);
|
||||
}
|
||||
// 开始区段,结束区段校验
|
||||
BusinessExceptionAssertEnum.DATA_ALREADY_EXIST.assertNotTrue(isExisted(runLevelVO));
|
||||
// 保存运行等级数据
|
||||
|
|
|
@ -29,8 +29,8 @@ public class MaService {
|
|||
@Getter
|
||||
public static class Ma {
|
||||
public static final int Safety_Margin = 1; // 安全余量,单位m,暂时没有计算紧急制动曲线,暂时不用
|
||||
public static final int EB_Trigger = 20; // 紧急制动触发点偏移量,单位m
|
||||
public static final int Safety_Distance = 30; // 安全距离, 单位m
|
||||
public static final int EB_Trigger = 2; // 紧急制动触发点偏移量,单位m todo 临时修改,上饶沙盘
|
||||
public static final int Safety_Distance = 3; // 安全距离, 单位m
|
||||
|
||||
VirtualRealityTrain train; // 列车
|
||||
MapNamedElement device; // 终端设备
|
||||
|
|
|
@ -314,14 +314,14 @@ public class MapDeviceBuilder {
|
|||
});
|
||||
/* ZC和区段相互赋值 */
|
||||
// ZC
|
||||
if (graphData.getZcList().size() == 1) {
|
||||
MapZcVO mapZcVO = graphData.getZcList().get(0);
|
||||
ZC zc = (ZC) elementMap.get(mapZcVO.getCode());
|
||||
physicalSectionList.forEach(section -> {
|
||||
zc.addSection(section);
|
||||
section.addZc(zc);
|
||||
});
|
||||
} else {
|
||||
// if (graphData.getZcList().size() == 1) { 上饶沙盘因需要车辆段无ZC,故只剩下一个ZC,故需要去掉此逻辑
|
||||
// MapZcVO mapZcVO = graphData.getZcList().get(0);
|
||||
// ZC zc = (ZC) elementMap.get(mapZcVO.getCode());
|
||||
// physicalSectionList.forEach(section -> {
|
||||
// zc.addSection(section);
|
||||
// section.addZc(zc);
|
||||
// });
|
||||
// } else {
|
||||
graphData.getZcList().forEach(mapZcVO -> {
|
||||
if (mapZcVO.isNoService())
|
||||
return;
|
||||
|
@ -346,7 +346,7 @@ public class MapDeviceBuilder {
|
|||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// }
|
||||
// 站台
|
||||
List<MapStationStandNewVO> standList = buildStand(graphData, elementMap, errMsgList);
|
||||
// 站台轨关系数据校验
|
||||
|
@ -537,10 +537,10 @@ public class MapDeviceBuilder {
|
|||
.collect(Collectors.toList());
|
||||
stations.forEach(station -> {
|
||||
if (station.isDepot()) { // 是车辆段/停车场
|
||||
if (CollectionUtils.isEmpty(station.getTransferList())) {
|
||||
errMsgList.add(String.format("车站[%s(%s)]是停车场/车辆段,却没有找到任何转换轨",
|
||||
station.getName(), station.getCode()));
|
||||
}
|
||||
// if (CollectionUtils.isEmpty(station.getTransferList())) {
|
||||
// errMsgList.add(String.format("车站[%s(%s)]是停车场/车辆段,却没有找到任何转换轨",
|
||||
// station.getName(), station.getCode()));
|
||||
// }
|
||||
} else if (station.isTurnBack()) {//是折返站
|
||||
if (CollectionUtils.isEmpty(station.getTurnBackList())) {
|
||||
errMsgList.add(String.format("车站[%s(%s)]是折返站,却没有任何折返区段关联",
|
||||
|
@ -945,9 +945,9 @@ public class MapDeviceBuilder {
|
|||
if (section.isStandTrack() && !section.isNormalStandTrack()) {
|
||||
errMsgList.add(String.format("区段[%s]不是正常站台的站台轨,却设置了站台轨属性", section.debugStr()));
|
||||
}
|
||||
if (section.isTransferTrack() && (section.getStation() == null || !section.getStation().isDepot())) {
|
||||
errMsgList.add(String.format("区段[%s]所属车站不是车辆段/停车场车站,却设置了转换轨属性", section.debugStr()));
|
||||
}
|
||||
// if (section.isTransferTrack() && (section.getStation() == null || !section.getStation().isDepot())) {
|
||||
// errMsgList.add(String.format("区段[%s]所属车站不是车辆段/停车场车站,却设置了转换轨属性", section.debugStr()));
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public class MapStationRunLevelVO {
|
|||
|
||||
private Long id;
|
||||
|
||||
@NotNull(message = "地图id不能为空", groups = {RunLevelGenerateCheck.class, RunLevelCreateCheck.class})
|
||||
// @NotNull(message = "地图id不能为空", groups = {RunLevelGenerateCheck.class, RunLevelCreateCheck.class})
|
||||
private Long mapId;
|
||||
/**
|
||||
* 起始车站code
|
||||
|
|
Loading…
Reference in New Issue