零散组合数据构建
This commit is contained in:
parent
82dc5a6dcb
commit
8d9b120a98
|
@ -649,6 +649,24 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicD
|
|||
}
|
||||
}
|
||||
}
|
||||
cis := stationMap[stationUid]
|
||||
// 零散组合
|
||||
for _, com := range relayGi.CombinationtypeList {
|
||||
if com.Code == "LS" { // 零散组合
|
||||
d := &proto.ElectronicGroup{Code: com.Code}
|
||||
for _, relayId := range com.RefRelays {
|
||||
if uidsMap.RelayIds[relayId] == nil {
|
||||
continue
|
||||
}
|
||||
d.Components = append(d.Components, &proto.ElectronicComponent{
|
||||
Id: uidsMap.RelayIds[relayId].Uid,
|
||||
DeviceType: proto.DeviceType_DeviceType_Relay,
|
||||
})
|
||||
}
|
||||
cis.ElectronicGroup = append(cis.ElectronicGroup, d)
|
||||
fmt.Println("构建零散组合结果:", d)
|
||||
}
|
||||
}
|
||||
// 处理该集中站采集、驱动配置信息
|
||||
centralizedStationId := GenerateElementUid(city, lineId, nil, station)
|
||||
ref := queryCentralizedStationRef(centralizedStationId, repo)
|
||||
|
|
Loading…
Reference in New Issue