From 4861c8c24875b3d196c22aeea58e66e4259f686b Mon Sep 17 00:00:00 2001 From: weizhihong Date: Tue, 5 Dec 2023 16:31:18 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=81=93=E5=B2=94=E3=80=81=E5=8C=BA?= =?UTF-8?q?=E6=AE=B5=E7=BB=91=E5=AE=9A=E5=85=AC=E9=87=8C=E6=A0=87=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repository/physical_section.go | 2 +- repository/turnout.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 {