添加返回前端的道岔状态
This commit is contained in:
parent
0457d58eeb
commit
3c68b9bebb
|
@ -273,6 +273,21 @@ func (ms *SfpMs) collectTurnoutStates() ([]*state.SwitchState, error) {
|
|||
Dw: pos.Dw,
|
||||
Fw: pos.Fw,
|
||||
}
|
||||
// 强制(联锁驱动无效)
|
||||
s.Force = entry.HasComponent(component.TurnoutFaultCiqdType)
|
||||
// 失表
|
||||
s.Sb = entry.HasComponent(component.TurnoutFaultSbType)
|
||||
// 定位失表
|
||||
s.Dwsb = entry.HasComponent(component.TurnoutFaultDwsbType)
|
||||
// 反位失表
|
||||
s.Fwsb = entry.HasComponent(component.TurnoutFaultFwsbType)
|
||||
// 挤岔
|
||||
s.Jc = entry.HasComponent(component.TurnoutFaultJcType)
|
||||
|
||||
// if entry.HasComponent(component.Zdj9TwoElectronicType) {
|
||||
// elec := component.Zdj9TwoElectronicType.Get(entry)
|
||||
|
||||
// }
|
||||
switchArr = append(switchArr, s)
|
||||
}
|
||||
return switchArr, nil
|
||||
|
|
|
@ -451,12 +451,14 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicD
|
|||
city := relayGi.UniqueIdPrefix.City
|
||||
lineId := relayGi.UniqueIdPrefix.LineId
|
||||
station := relayGi.UniqueIdPrefix.BelongsConcentrationStation
|
||||
stationUid := GenerateElementUid(city, lineId, nil, station)
|
||||
relayMap := make(map[string]*proto.Relay)
|
||||
for _, relay := range relayGi.Relays {
|
||||
repoRelay := &proto.Relay{
|
||||
Id: uidsMap.RelayIds[relay.Common.Id].Uid,
|
||||
Code: relay.Code,
|
||||
Model: convertRelayModel(relay.NewModel),
|
||||
Id: uidsMap.RelayIds[relay.Common.Id].Uid,
|
||||
Code: relay.Code,
|
||||
Model: convertRelayModel(relay.NewModel),
|
||||
StationId: stationUid,
|
||||
}
|
||||
repo.Relays = append(repo.Relays, repoRelay)
|
||||
relayMap[repoRelay.Id] = repoRelay
|
||||
|
|
Loading…
Reference in New Issue