物理区段-集中站

This commit is contained in:
xzb 2023-10-31 16:53:39 +08:00
parent f2d6737b28
commit a83a28832f
1 changed files with 9 additions and 4 deletions

View File

@ -774,11 +774,16 @@ func fillProtoRepository(repo *proto.Repository, storage *graphicData.RtssGraphi
if data.SectionType == graphicData.Section_TurnoutPhysical {
turnoutIds = findTurnoutIds(axleCountingMap, data.AxleCountings)
}
centralizedStation := ""
if len(data.CentralizedStations) > 0 {
centralizedStation = data.CentralizedStations[0]
}
physicalSection := &proto.PhysicalSection{
Id: data.Common.Id,
ADevicePort: convertDevicePort(data.PaRef),
BDevicePort: convertDevicePort(data.PbRef),
TurnoutIds: turnoutIds,
Id: data.Common.Id,
ADevicePort: convertDevicePort(data.PaRef),
BDevicePort: convertDevicePort(data.PbRef),
TurnoutIds: turnoutIds,
CentralizedStation: centralizedStation,
}
repo.PhysicalSections = append(repo.PhysicalSections, converSectionUid(physicalSection, uidsMap))
}