diff --git a/ats/verify/simulation/wayside/memory/wayside_memory_map.go b/ats/verify/simulation/wayside/memory/wayside_memory_map.go index 565b95f..11b95f6 100644 --- a/ats/verify/simulation/wayside/memory/wayside_memory_map.go +++ b/ats/verify/simulation/wayside/memory/wayside_memory_map.go @@ -96,13 +96,7 @@ func QueryEcsLinkByDeviceInfo(repo *repository.Repository, mapId int32, id strin // 根据物理区段上的偏移量(基于区段A端),找到所在link的linkId与偏移量 func sectionMapToEcsLink(repo *repository.Repository, id string, offset int64, runDirection bool) (int32, int64, bool, bool, int64) { - var section *repository.PhysicalSection - for _, s := range repo.PhysicalSectionList() { - if s.Id() == id { - section = s - break - } - } + section := repo.FindPhysicalSection(id) if section == nil { panic(&dto.ErrorDto{Code: dto.DataNotExist, Message: fmt.Sprintf("地图不存在uid:%s缓存", id)}) } @@ -129,13 +123,7 @@ func sectionMapToEcsLink(repo *repository.Repository, id string, offset int64, r // 根据道岔上的偏移量(基于岔心位置),找到所在link的linkId与偏移量 func turnoutMapToEcsLink(repo *repository.Repository, id string, port string, offset int64, runDirection bool) (int32, int64, bool, bool, int64) { - var turnout *repository.Turnout - for _, t := range repo.TurnoutList() { - if t.Id() == id { - turnout = t - break - } - } + turnout := repo.FindTurnout(id) if turnout == nil { panic(dto.ErrorDto{Code: dto.DataNotExist, Message: fmt.Sprintf("不存在道岔【uid:%s】", id)}) } diff --git a/rtss_simulation b/rtss_simulation index 660b6a6..d743f0b 160000 --- a/rtss_simulation +++ b/rtss_simulation @@ -1 +1 @@ -Subproject commit 660b6a6797385aa494a49ffa80e9135ce964eceb +Subproject commit d743f0be7c203172884bc07fa76e0c61e550386e