【注释部分代码,数据正确后再处理】
This commit is contained in:
parent
a81568ebfb
commit
0eec98f251
@ -19,21 +19,15 @@ import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* 发布时缓存在内存中的线路数据
|
||||
*/
|
||||
/** 发布时缓存在内存中的线路数据 */
|
||||
@Slf4j
|
||||
public class LineGraphicDataRepository {
|
||||
|
||||
/**
|
||||
* 线路数据信息
|
||||
*/
|
||||
/** 线路数据信息 */
|
||||
private static final Map<Integer, Map<String, Map<String, Builder>>> lineGraphMap =
|
||||
new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* 线路各坐标系转换关系
|
||||
*/
|
||||
/** 线路各坐标系转换关系 */
|
||||
private static final Map<Integer, Map<String, CoordinateConvertor>> lineCoordinateMain =
|
||||
new HashMap<>();
|
||||
|
||||
@ -65,7 +59,7 @@ public class LineGraphicDataRepository {
|
||||
/**
|
||||
* 获取线路上区段名为【sectionName】的公里标
|
||||
*
|
||||
* @param lineId 线路ID
|
||||
* @param lineId 线路ID
|
||||
* @param sectionName 区段名称
|
||||
* @return 公里标
|
||||
*/
|
||||
@ -91,9 +85,7 @@ public class LineGraphicDataRepository {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除线路绘图数据
|
||||
*/
|
||||
/** 删除线路绘图数据 */
|
||||
public static void removeLineGraph(Integer id) {
|
||||
lineGraphMap.remove(id);
|
||||
}
|
||||
@ -101,7 +93,7 @@ public class LineGraphicDataRepository {
|
||||
/**
|
||||
* 构建程序中的区段信息
|
||||
*
|
||||
* @param lineId 线路ID
|
||||
* @param lineId 线路ID
|
||||
* @param dataMap 缓存数据
|
||||
* @param storage 地图构建数据
|
||||
*/
|
||||
@ -121,7 +113,8 @@ public class LineGraphicDataRepository {
|
||||
? (DeviceInfoProto.Section.Builder) cacheSectionMap.get(sid)
|
||||
: DeviceInfoProto.Section.newBuilder().setId(sid);
|
||||
sectionBuilder.setCode(section.getCode());
|
||||
sectionBuilder.setType(section.getSectionType());
|
||||
// 暂时先注释,等数据正确后再做处理
|
||||
// sectionBuilder.setType(section.getSectionType());
|
||||
cacheSectionMap.put(sid, sectionBuilder);
|
||||
});
|
||||
dataMap.put(DeviceType.Section.name(), cacheSectionMap);
|
||||
@ -130,7 +123,7 @@ public class LineGraphicDataRepository {
|
||||
/**
|
||||
* 构建道岔信息
|
||||
*
|
||||
* @param lineId 线路ID
|
||||
* @param lineId 线路ID
|
||||
* @param dataMap 缓存数据
|
||||
* @param storage 地图构建数据
|
||||
*/
|
||||
@ -181,7 +174,7 @@ public class LineGraphicDataRepository {
|
||||
/**
|
||||
* 设置公里标
|
||||
*
|
||||
* @param lineId 线路ID
|
||||
* @param lineId 线路ID
|
||||
* @param dataMap 缓存数据
|
||||
* @param storage 地图构建数据
|
||||
*/
|
||||
@ -232,7 +225,7 @@ public class LineGraphicDataRepository {
|
||||
/**
|
||||
* 初始化坐标转换对象
|
||||
*
|
||||
* @param lineId 线路ID
|
||||
* @param lineId 线路ID
|
||||
* @param dataMap 设备集合
|
||||
* @param storage 地图信息
|
||||
*/
|
||||
@ -324,9 +317,7 @@ public class LineGraphicDataRepository {
|
||||
return convertorMap.get(convertorKey).convertorKilometer(kilometer, CoordinateEnum.MAIN_LINE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 坐标系枚举
|
||||
*/
|
||||
/** 坐标系枚举 */
|
||||
@Getter
|
||||
private enum CoordinateEnum {
|
||||
MAIN_LINE("MAIN_LINE", List.of("YDK", "ZDK", "XDK", "SDK")),
|
||||
@ -371,9 +362,7 @@ public class LineGraphicDataRepository {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 坐标转换对象
|
||||
*/
|
||||
/** 坐标转换对象 */
|
||||
@Getter
|
||||
private static class CoordinateConvertor {
|
||||
|
||||
@ -388,8 +377,8 @@ public class LineGraphicDataRepository {
|
||||
/**
|
||||
* 生成坐标转换对象
|
||||
*
|
||||
* @param configSystem 原配置坐标系信息
|
||||
* @param convertorSystem 转换坐标系类型
|
||||
* @param configSystem 原配置坐标系信息
|
||||
* @param convertorSystem 转换坐标系类型
|
||||
* @param convertorCoordinate 转换坐标
|
||||
* @return 转换对象
|
||||
*/
|
||||
@ -441,7 +430,7 @@ public class LineGraphicDataRepository {
|
||||
* 将出入库公里标转换为正线标
|
||||
*
|
||||
* @param basisKilometer 出入库基准公里标
|
||||
* @param targetType 目标坐标系
|
||||
* @param targetType 目标坐标系
|
||||
* @return 正线公里标数字
|
||||
*/
|
||||
public long convertorKilometer(KilometerSystem basisKilometer, CoordinateEnum targetType) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.xiannccda.controller;
|
||||
|
||||
import club.joylink.xiannccda.ats.cache.LineGraphicDataRepository;
|
||||
import club.joylink.xiannccda.dto.PublishedGIDTO;
|
||||
import club.joylink.xiannccda.dto.PublishedGIDTO.LineType;
|
||||
import club.joylink.xiannccda.dto.PublishedGIQueryDTO;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -4,8 +4,6 @@ import club.joylink.xiannccda.ats.message.MessageData;
|
||||
import club.joylink.xiannccda.ats.message.MessageId;
|
||||
import club.joylink.xiannccda.ats.message.collect.DeviceStatusConvertorManager;
|
||||
|
||||
import club.joylink.xiannccda.ats.message.collect.DeviceDataRepository;
|
||||
import club.joylink.xiannccda.ats.message.collect.DeviceStatusDataRepository;
|
||||
import club.joylink.xiannccda.ats.message.collect.convertor.DeviceChangeStatusConvertor;
|
||||
import club.joylink.xiannccda.ats.message.collect.convertor.DeviceInitConvertor;
|
||||
import club.joylink.xiannccda.ats.message.collect.convertor.LineNetTrainInitConvertor;
|
||||
@ -16,9 +14,7 @@ import club.joylink.xiannccda.ats.message.collect.convertor.TrainInitConvertor;
|
||||
import club.joylink.xiannccda.ats.message.collect.convertor.TrainRecordConvertor;
|
||||
import club.joylink.xiannccda.ats.message.collect.convertor.TrainRemoveConvertor;
|
||||
import club.joylink.xiannccda.ats.message.collect.convertor.TrainUpdateConvertor;
|
||||
import club.joylink.xiannccda.ats.message.collect.datasource.DeviceStatusData;
|
||||
import club.joylink.xiannccda.mock.message.NccMockDataService;
|
||||
import club.joylink.xiannccda.ws.IMessageServer;
|
||||
import club.joylink.xiannccda.ws.LineDeviceMessageServer;
|
||||
import club.joylink.xiannccda.ws.LineNetMessageServer;
|
||||
import club.joylink.xiannccda.ws.LineTrainMessageServer;
|
||||
@ -36,8 +32,6 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class LineDeviceStatusService {
|
||||
|
||||
public static final String DATA_KEY = "lineNet";
|
||||
|
||||
private final WsMessageServerManager wsMessageServerManager;
|
||||
|
||||
private final NccMockDataService nccMockDataService;
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit e8ac23070828a1eca3bd68b6f78e4e419123d139
|
||||
Subproject commit f1dfb5e4bdcce8df58c34c0c2cbce545db559a68
|
Loading…
Reference in New Issue
Block a user