diff --git a/ats/verify/simulation/wayside/memory/wayside_memory_map_init.go b/ats/verify/simulation/wayside/memory/wayside_memory_map_init.go index 2f3a6d2..3207074 100644 --- a/ats/verify/simulation/wayside/memory/wayside_memory_map_init.go +++ b/ats/verify/simulation/wayside/memory/wayside_memory_map_init.go @@ -177,21 +177,24 @@ func initStationUid(data *graphicData.RtssGraphicStorage) *stationUidStructure { } } // 屏蔽门 + psd_station_map := make(map[string]string) for _, door := range data.ScreenDoors { station := stationMap[platformMap[door.RefPlatformId].GetRefStationId()] if station == nil { //线路数据有问题 continue } + psd_station_map[door.Common.Id] = station.Common.Id gus.PsdIds[door.Common.Id] = &elementIdStructure{ CommonId: door.Common.Id, - Uid: GenerateElementUid(city, lineId, []string{station.GetCommon().GetId()}, door.Code), + Uid: GenerateElementUid(city, lineId, []string{station.Common.Id}, door.Code), } } // 门控箱 for _, box := range data.GateBoxs { + stationId := psd_station_map[box.RefScreenDoor] gus.GateBoxIds[box.Common.Id] = &elementIdStructure{ CommonId: box.Common.Id, - Uid: GenerateElementUid(city, lineId, nil, box.Code), + Uid: GenerateElementUid(city, lineId, []string{stationId}, box.Code), } } return gus diff --git a/ats/verify/simulation/wayside/memory/wayside_simulation.go b/ats/verify/simulation/wayside/memory/wayside_simulation.go index adef5a7..a454111 100644 --- a/ats/verify/simulation/wayside/memory/wayside_simulation.go +++ b/ats/verify/simulation/wayside/memory/wayside_simulation.go @@ -767,17 +767,22 @@ func fillProtoRepository(repo *proto.Repository, storage *graphicData.RtssGraphi repo.Stations = append(repo.Stations, station) } //门控箱 + gateBoxMap := make(map[string]*proto.Mkx) for _, data := range storage.GateBoxs { - mkx := &proto.Mkx{ - Id: uidsMap.GateBoxIds[data.Common.Id].Uid, - PsdId: uidsMap.PsdIds[data.RefScreenDoor].Uid, + mkx, ok := gateBoxMap[data.RefScreenDoor] + if !ok { + mkx = &proto.Mkx{ + Id: uidsMap.GateBoxIds[data.Common.Id].Uid, + PsdId: uidsMap.PsdIds[data.RefScreenDoor].Uid, + } + repo.Mkxs = append(repo.Mkxs, mkx) + gateBoxMap[data.RefScreenDoor] = mkx } - repo.Mkxs = append(repo.Mkxs, mkx) pslMapId := QueryGiId(data.RefGatedBoxMapCode) pslStorage := QueryGiData[*graphicData.PslGraphicStorage](pslMapId) for _, button := range pslStorage.PslButtons { repoButton := &proto.Button{ - Id: mkx.Id + "_" + button.Code, + Id: uidsMap.GateBoxIds[data.Common.Id].Uid + "_" + button.Code, Code: button.Code, ButtonType: proto.Button_Reset_Press, HasLight: true, diff --git a/rtss_simulation b/rtss_simulation index 864c718..89dd583 160000 --- a/rtss_simulation +++ b/rtss_simulation @@ -1 +1 @@ -Subproject commit 864c718d3369d9870ecce0120e1e2c2bc313ba38 +Subproject commit 89dd583d1990729e1925e31b7bb5da3c6aeb3a94