Merge branch 'master' of https://git.code.tencent.com/beijing-rtss-test/bj-rtsts-server-go
This commit is contained in:
commit
4cd8ada0ff
|
@ -1 +1 @@
|
|||
Subproject commit dfe96a977ccb283510934a15dfa0f3303620c278
|
||||
Subproject commit a6dfa6fffb7ecfe6630280a838092d208c0e3c1a
|
|
@ -187,20 +187,20 @@ func initStationUid(data *graphicData.RtssGraphicStorage) *StationUidStructure {
|
|||
if station == nil { //线路数据有问题
|
||||
continue
|
||||
}
|
||||
psd_station_map[door.Common.Id] = station.Common.Id
|
||||
psd_station_map[door.Common.Id] = station.StationName
|
||||
gus.PsdIds[door.Common.Id] = &elementIdStructure{
|
||||
CommonId: door.Common.Id,
|
||||
Code: door.Code,
|
||||
Uid: GenerateElementUid(city, lineId, []string{station.Common.Id}, door.Code),
|
||||
Uid: GenerateElementUid(city, lineId, []string{station.StationName}, door.Code),
|
||||
}
|
||||
}
|
||||
// 门控箱
|
||||
for _, box := range data.GateBoxs {
|
||||
stationId := psd_station_map[box.RefScreenDoor]
|
||||
stationName := psd_station_map[box.RefScreenDoor]
|
||||
gus.GateBoxIds[box.Common.Id] = &elementIdStructure{
|
||||
CommonId: box.Common.Id,
|
||||
Code: box.Code,
|
||||
Uid: GenerateElementUid(city, lineId, []string{stationId}, box.Code),
|
||||
Uid: GenerateElementUid(city, lineId, []string{stationName}, box.Code),
|
||||
}
|
||||
}
|
||||
// SPKS人员防护
|
||||
|
|
|
@ -556,7 +556,7 @@ func buildSectionCodePoint(repo *proto.Repository, storage *graphicData.RtssGrap
|
|||
}
|
||||
}
|
||||
func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicData.RelayCabinetGraphicStorage, mapId int32) {
|
||||
uidsMap := QueryUidStructure[*RelayUidStructure](mapId)
|
||||
relayUidStructure := QueryUidStructure[*RelayUidStructure](mapId)
|
||||
city := relayGi.UniqueIdPrefix.City
|
||||
lineId := relayGi.UniqueIdPrefix.LineId
|
||||
station := relayGi.UniqueIdPrefix.BelongsConcentrationStation
|
||||
|
@ -564,7 +564,7 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicD
|
|||
relayMap := make(map[string]*proto.Relay)
|
||||
for _, relay := range relayGi.Relays {
|
||||
repoRelay := &proto.Relay{
|
||||
Id: uidsMap.RelayIds[relay.Common.Id].Uid,
|
||||
Id: relayUidStructure.RelayIds[relay.Common.Id].Uid,
|
||||
Code: relay.Code,
|
||||
Model: convertRelayModel(relay.NewModel),
|
||||
StationId: stationUid,
|
||||
|
@ -574,7 +574,7 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicD
|
|||
}
|
||||
for _, pfp := range relayGi.PhaseFailureProtectors {
|
||||
repo.PhaseFailureProtectors = append(repo.PhaseFailureProtectors, &proto.PhaseFailureProtector{
|
||||
Id: uidsMap.RelayIds[pfp.Common.Id].Uid,
|
||||
Id: relayUidStructure.RelayIds[pfp.Common.Id].Uid,
|
||||
Code: pfp.Code,
|
||||
})
|
||||
}
|
||||
|
@ -608,10 +608,10 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicD
|
|||
for _, group := range relationship.Combinationtypes {
|
||||
var componentIds []string
|
||||
for _, relayId := range group.RefRelays {
|
||||
if uidsMap.RelayIds[relayId] == nil {
|
||||
if relayUidStructure.RelayIds[relayId] == nil {
|
||||
continue
|
||||
}
|
||||
componentIds = append(componentIds, uidsMap.RelayIds[relayId].Uid)
|
||||
componentIds = append(componentIds, relayUidStructure.RelayIds[relayId].Uid)
|
||||
}
|
||||
turnout.ElectronicComponentGroups = append(turnout.ElectronicComponentGroups,
|
||||
&proto.ElectronicComponentGroup{
|
||||
|
@ -631,10 +631,10 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicD
|
|||
group := relationship.Combinationtypes[0]
|
||||
var componentIds []string
|
||||
for _, relayId := range group.RefRelays {
|
||||
if uidsMap.RelayIds[relayId] == nil {
|
||||
if relayUidStructure.RelayIds[relayId] == nil {
|
||||
continue
|
||||
}
|
||||
componentIds = append(componentIds, uidsMap.RelayIds[relayId].Uid)
|
||||
componentIds = append(componentIds, relayUidStructure.RelayIds[relayId].Uid)
|
||||
}
|
||||
signal.Code = group.Code
|
||||
signal.ElectronicComponentGroups = append(signal.ElectronicComponentGroups,
|
||||
|
@ -650,11 +650,11 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicD
|
|||
for _, group := range relationship.Combinationtypes {
|
||||
d := &proto.ElectronicGroup{Code: group.Code}
|
||||
for _, relayId := range group.RefRelays {
|
||||
if uidsMap.RelayIds[relayId] == nil {
|
||||
if relayUidStructure.RelayIds[relayId] == nil {
|
||||
continue
|
||||
}
|
||||
d.Components = append(d.Components, &proto.ElectronicComponent{
|
||||
Id: uidsMap.RelayIds[relayId].Uid,
|
||||
Id: relayUidStructure.RelayIds[relayId].Uid,
|
||||
DeviceType: proto.DeviceType_DeviceType_Relay,
|
||||
})
|
||||
}
|
||||
|
@ -668,10 +668,10 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicD
|
|||
for _, group := range relationship.Combinationtypes {
|
||||
var componentIds []string
|
||||
for _, relayId := range group.RefRelays {
|
||||
if uidsMap.RelayIds[relayId] == nil {
|
||||
if relayUidStructure.RelayIds[relayId] == nil {
|
||||
continue
|
||||
}
|
||||
componentIds = append(componentIds, uidsMap.RelayIds[relayId].Uid)
|
||||
componentIds = append(componentIds, relayUidStructure.RelayIds[relayId].Uid)
|
||||
}
|
||||
psd.ElectronicComponentGroups = append(psd.ElectronicComponentGroups,
|
||||
&proto.ElectronicComponentGroup{
|
||||
|
@ -716,11 +716,11 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicD
|
|||
if com.Code == "LS" { // 零散组合
|
||||
d := &proto.ElectronicGroup{Code: com.Code}
|
||||
for _, relayId := range com.RefRelays {
|
||||
if uidsMap.RelayIds[relayId] == nil {
|
||||
if relayUidStructure.RelayIds[relayId] == nil {
|
||||
continue
|
||||
}
|
||||
d.Components = append(d.Components, &proto.ElectronicComponent{
|
||||
Id: uidsMap.RelayIds[relayId].Uid,
|
||||
Id: relayUidStructure.RelayIds[relayId].Uid,
|
||||
DeviceType: proto.DeviceType_DeviceType_Relay,
|
||||
})
|
||||
}
|
||||
|
@ -731,9 +731,9 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *graphicD
|
|||
// 处理该集中站采集、驱动配置信息
|
||||
centralizedStationId := GenerateElementUid(city, lineId, nil, station)
|
||||
ref := queryCentralizedStationRef(centralizedStationId, repo)
|
||||
ref.CjList = append(ref.CjList, handlerRelayGiCj(uidsMap, centralizedStationId, relayGi.CiCjList)...)
|
||||
ref.CjList = append(ref.CjList, handlerRelayGiCj(relayUidStructure, centralizedStationId, relayGi.CiCjList)...)
|
||||
sortQcTable(ref.CjList)
|
||||
ref.QdList = append(ref.QdList, handlerRelayGiQd(uidsMap, centralizedStationId, relayGi.CiQdList)...)
|
||||
ref.QdList = append(ref.QdList, handlerRelayGiQd(relayUidStructure, centralizedStationId, relayGi.CiQdList)...)
|
||||
sortQcTable(ref.QdList)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue