修改门控箱/屏蔽门交互及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 {
|
for _, door := range data.ScreenDoors {
|
||||||
station := stationMap[platformMap[door.RefPlatformId].GetRefStationId()]
|
station := stationMap[platformMap[door.RefPlatformId].GetRefStationId()]
|
||||||
if station == nil { //线路数据有问题
|
if station == nil { //线路数据有问题
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
psd_station_map[door.Common.Id] = station.Common.Id
|
||||||
gus.PsdIds[door.Common.Id] = &elementIdStructure{
|
gus.PsdIds[door.Common.Id] = &elementIdStructure{
|
||||||
CommonId: door.Common.Id,
|
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 {
|
for _, box := range data.GateBoxs {
|
||||||
|
stationId := psd_station_map[box.RefScreenDoor]
|
||||||
gus.GateBoxIds[box.Common.Id] = &elementIdStructure{
|
gus.GateBoxIds[box.Common.Id] = &elementIdStructure{
|
||||||
CommonId: box.Common.Id,
|
CommonId: box.Common.Id,
|
||||||
Uid: GenerateElementUid(city, lineId, nil, box.Code),
|
Uid: GenerateElementUid(city, lineId, []string{stationId}, box.Code),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return gus
|
return gus
|
||||||
|
@ -767,17 +767,22 @@ func fillProtoRepository(repo *proto.Repository, storage *graphicData.RtssGraphi
|
|||||||
repo.Stations = append(repo.Stations, station)
|
repo.Stations = append(repo.Stations, station)
|
||||||
}
|
}
|
||||||
//门控箱
|
//门控箱
|
||||||
|
gateBoxMap := make(map[string]*proto.Mkx)
|
||||||
for _, data := range storage.GateBoxs {
|
for _, data := range storage.GateBoxs {
|
||||||
mkx := &proto.Mkx{
|
mkx, ok := gateBoxMap[data.RefScreenDoor]
|
||||||
Id: uidsMap.GateBoxIds[data.Common.Id].Uid,
|
if !ok {
|
||||||
PsdId: uidsMap.PsdIds[data.RefScreenDoor].Uid,
|
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)
|
pslMapId := QueryGiId(data.RefGatedBoxMapCode)
|
||||||
pslStorage := QueryGiData[*graphicData.PslGraphicStorage](pslMapId)
|
pslStorage := QueryGiData[*graphicData.PslGraphicStorage](pslMapId)
|
||||||
for _, button := range pslStorage.PslButtons {
|
for _, button := range pslStorage.PslButtons {
|
||||||
repoButton := &proto.Button{
|
repoButton := &proto.Button{
|
||||||
Id: mkx.Id + "_" + button.Code,
|
Id: uidsMap.GateBoxIds[data.Common.Id].Uid + "_" + button.Code,
|
||||||
Code: button.Code,
|
Code: button.Code,
|
||||||
ButtonType: proto.Button_Reset_Press,
|
ButtonType: proto.Button_Reset_Press,
|
||||||
HasLight: true,
|
HasLight: true,
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 864c718d3369d9870ecce0120e1e2c2bc313ba38
|
Subproject commit 89dd583d1990729e1925e31b7bb5da3c6aeb3a94
|
Loading…
Reference in New Issue
Block a user