修改门控箱/屏蔽门交互及ecs系统逻辑bug
This commit is contained in:
parent
a7b7caa9d1
commit
66ae6914b5
@ -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
|
||||
|
@ -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,
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 864c718d3369d9870ecce0120e1e2c2bc313ba38
|
||||
Subproject commit 89dd583d1990729e1925e31b7bb5da3c6aeb3a94
|
Loading…
Reference in New Issue
Block a user