零散组合数据构建

This commit is contained in:
walker 2023-11-06 17:33:09 +08:00
parent 82dc5a6dcb
commit 8d9b120a98
1 changed files with 18 additions and 0 deletions

View File

@ -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)