Merge branch 'master' of https://git.code.tencent.com/beijing-rtss-test/bj-rtsts-server-go
This commit is contained in:
commit
fd12c74e6f
@ -1 +1 @@
|
|||||||
Subproject commit 3c08644dde7d13da7de400afa68a9fd4f1712a1e
|
Subproject commit 2f5b6287247d67ad12950fa6fed256925969ca65
|
@ -604,6 +604,7 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicD
|
|||||||
for _, platform := range repo.Platforms {
|
for _, platform := range repo.Platforms {
|
||||||
platformMap[platform.Id] = platform
|
platformMap[platform.Id] = platform
|
||||||
}
|
}
|
||||||
|
ciecs := stationMap[stationUid] //联锁集中站
|
||||||
for _, relationship := range relayGi.DeviceRelateRelayList {
|
for _, relationship := range relayGi.DeviceRelateRelayList {
|
||||||
switch relationship.DeviceType {
|
switch relationship.DeviceType {
|
||||||
case graphicData.RelatedRef_Turnout:
|
case graphicData.RelatedRef_Turnout:
|
||||||
@ -685,6 +686,30 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicD
|
|||||||
ComponentIds: componentIds,
|
ComponentIds: componentIds,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
case graphicData.RelatedRef_SignalFaultAlarm: // 信号机故障报警仪设备组合
|
||||||
|
{
|
||||||
|
egs := buildEgs(relationship.Combinationtypes, relayUidStructure)
|
||||||
|
ciecs.Deccs = append(ciecs.Deccs, &proto.DeviceEcc{
|
||||||
|
DeviceType: proto.DeviceType_DeviceType_SignalFaultAlarm,
|
||||||
|
Egs: egs,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
case graphicData.RelatedRef_Breakers: // 断路器
|
||||||
|
{
|
||||||
|
egs := buildEgs(relationship.Combinationtypes, relayUidStructure)
|
||||||
|
ciecs.Deccs = append(ciecs.Deccs, &proto.DeviceEcc{
|
||||||
|
DeviceType: proto.DeviceType_DeviceType_Breakers,
|
||||||
|
Egs: egs,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
case graphicData.RelatedRef_PowerScreen: // 电源屏
|
||||||
|
{
|
||||||
|
egs := buildEgs(relationship.Combinationtypes, relayUidStructure)
|
||||||
|
ciecs.Deccs = append(ciecs.Deccs, &proto.DeviceEcc{
|
||||||
|
DeviceType: proto.DeviceType_DeviceType_PowerScreen,
|
||||||
|
Egs: egs,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//门控箱
|
//门控箱
|
||||||
@ -743,6 +768,21 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicD
|
|||||||
sortQcTable(ref.QdList)
|
sortQcTable(ref.QdList)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func buildEgs(cts []*graphicData.Combinationtype, relayUidStructure *RelayUidStructure) []*proto.ElectronicComponentGroup {
|
||||||
|
var egs []*proto.ElectronicComponentGroup
|
||||||
|
for _, ct := range cts {
|
||||||
|
d := &proto.ElectronicComponentGroup{Code: ct.Code}
|
||||||
|
for _, relayId := range ct.RefRelays {
|
||||||
|
if relayUidStructure.RelayIds[relayId] == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
d.ComponentIds = append(d.ComponentIds, relayUidStructure.RelayIds[relayId].Uid)
|
||||||
|
}
|
||||||
|
egs = append(egs, d)
|
||||||
|
}
|
||||||
|
return egs
|
||||||
|
}
|
||||||
|
|
||||||
type IQcTable interface {
|
type IQcTable interface {
|
||||||
GetRow() int32
|
GetRow() int32
|
||||||
GetCol() int32
|
GetCol() int32
|
||||||
|
Loading…
Reference in New Issue
Block a user