diff --git a/repository/physical_section.go b/repository/physical_section.go index 9f1b124..1af6844 100644 --- a/repository/physical_section.go +++ b/repository/physical_section.go @@ -121,7 +121,7 @@ func (s *PhysicalSection) bindDevicePort(port proto.Port, devicePort DevicePort) // 绑定区段边界公里标。(仅限非道岔物理区段调用) func (s *PhysicalSection) bindBoundaryKm(km *proto.Kilometer, port proto.Port) error { - if km == nil { + if km == nil || (km.CoordinateSystem == "" && km.Value == 0) { return nil } switch port { diff --git a/repository/turnout.go b/repository/turnout.go index e214c72..08ad7e7 100644 --- a/repository/turnout.go +++ b/repository/turnout.go @@ -136,7 +136,7 @@ func (t *Turnout) bindLinkPort(port proto.Port, linkPort *LinkPort) { } func (t *Turnout) bindBoundaryKm(km *proto.Kilometer, port proto.Port) error { - if km == nil { + if km == nil || (km.CoordinateSystem == "" && km.Value == 0) { return nil } switch port {