【公里标属性设置】
This commit is contained in:
parent
5697eae75a
commit
06699a176a
@ -16,7 +16,6 @@ import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/** 发布时缓存在内存中的线路数据 */
|
||||
@Slf4j
|
||||
@ -72,7 +71,7 @@ public class LineGraphicDataRepository {
|
||||
for (Builder v : sectionMap.values()) {
|
||||
DeviceInfoProto.Section.Builder builder = (DeviceInfoProto.Section.Builder) v;
|
||||
if (Objects.equals(builder.getCode(), sectionName)) {
|
||||
return builder.getKilometerCodeList();
|
||||
return builder.getConvertKilometerList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -135,6 +134,7 @@ public class LineGraphicDataRepository {
|
||||
DeviceInfoProto.Switch.newBuilder();
|
||||
switchBuilder.setId(t.getCommon().getId());
|
||||
switchBuilder.setCode(t.getCode());
|
||||
switchBuilder.setSwitchKilometerSystem(t.getKilometerSystem());
|
||||
return switchBuilder;
|
||||
}));
|
||||
|
||||
@ -152,20 +152,26 @@ public class LineGraphicDataRepository {
|
||||
LayoutGraphicsProto.RtssGraphicStorage storage) {
|
||||
Map<String, ? extends Builder> sectionMap =
|
||||
dataMap.getOrDefault(DeviceType.Section.name(), Map.of());
|
||||
Map<String, ? extends Builder> turnOutMap =
|
||||
dataMap.getOrDefault(DeviceType.Section.name(), Map.of());
|
||||
storage
|
||||
.getAxleCountingsList()
|
||||
.forEach(
|
||||
ac ->
|
||||
ac.getAxleCountingRefList().stream()
|
||||
.filter(
|
||||
ref ->
|
||||
DeviceType.Section.equals(ref.getDeviceType())
|
||||
&& sectionMap.containsKey(ref.getId()))
|
||||
ac.getAxleCountingRefList()
|
||||
.forEach(
|
||||
ref -> {
|
||||
DeviceInfoProto.Section.Builder sectionBuilder =
|
||||
(DeviceInfoProto.Section.Builder) sectionMap.get(ref.getId());
|
||||
sectionBuilder.addKilometerCode(Long.parseLong(ac.getKilometerCode()));
|
||||
if (DeviceType.Section.equals(ref.getDeviceType())
|
||||
&& sectionMap.containsKey(ref.getId())) {
|
||||
DeviceInfoProto.Section.Builder sectionBuilder =
|
||||
(DeviceInfoProto.Section.Builder) sectionMap.get(ref.getId());
|
||||
sectionBuilder.addKilometerSystem(ac.getKilometerSystem());
|
||||
} else if (DeviceType.Turnout.equals(ref.getDeviceType())
|
||||
&& turnOutMap.containsKey(ref.getId())) {
|
||||
DeviceInfoProto.Switch.Builder switchBuilder =
|
||||
(DeviceInfoProto.Switch.Builder) turnOutMap.get(ref.getId());
|
||||
switchBuilder.addKilometerSystem(ac.getKilometerSystem());
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
Subproject commit 6c684988299ebe2019da7687dd5b3104ef770a79
|
||||
Subproject commit a850c9b8b6bb71db94daaf8a394aff290a76cfd0
|
Loading…
Reference in New Issue
Block a user