[bug]uid和继电器编号对不上导致的缺继电器问题

This commit is contained in:
thesai 2024-08-07 16:46:18 +08:00
parent 844560ae1e
commit 2d38a7bd63
4 changed files with 12 additions and 7 deletions

View File

@ -6,8 +6,8 @@ server:
# 数据源
datasource:
# 数据库访问url
dsn: root:root@tcp(127.0.0.1:3306)/bj-rtss?charset=utf8mb4&parseTime=true&loc=UTC
# dsn: root:joylink0503@tcp(192.168.33.233:3306)/bj-rtss?charset=utf8mb4&parseTime=true&loc=UTC
# dsn: root:root@tcp(127.0.0.1:3306)/bj-rtss?charset=utf8mb4&parseTime=true&loc=UTC
dsn: root:joylink0503@tcp(192.168.33.233:3306)/bj-rtss?charset=utf8mb4&parseTime=true&loc=UTC
# 日志配置
logging:
@ -33,7 +33,7 @@ logging:
# 消息配置
messaging:
mqtt:
address: tcp://127.0.0.1:1883
# address: tcp://192.168.33.233:1883
# address: tcp://127.0.0.1:1883
address: tcp://192.168.33.233:1883
username: rtsts_service
password: joylink@0503

@ -1 +1 @@
Subproject commit 47ecc9c79f31758a6421dab4a7099690a3c7b649
Subproject commit a5ebb6869d51969e5887f1dfceaffe8fcdc27312

View File

@ -379,11 +379,16 @@ func initStationUid(data *data_proto.RtssGraphicStorage) *StationUidStructure {
}
// 屏蔽门
for _, door := range data.ScreenDoors {
station := stationMap[platformMap[door.RefPlatformId].GetRefStationId()]
if station == nil { //线路数据有问题
slog.Error(fmt.Sprintf("线路[%s]屏蔽门[%s]关联关系有问题", lineId, door.Code))
continue
}
comId := door.Common.Id
gus.PsdIds[comId] = &DeviceRelationship{
CommonId: comId,
Code: door.Code,
Uid: BuildUid(city, lineId, gus.PlatformIds[door.RefPlatformId].Code, door.Code),
Uid: BuildUid(city, lineId, station.StationName, door.Code),
CentralizedStations: gus.PlatformIds[door.RefPlatformId].GetCentralizedStations(),
}
}

View File

@ -948,7 +948,7 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *data_pro
mkx.PcbjId = relay.Id
} else if strings.Contains(relay.GetCode(), "POB") {
mkx.PobjId = relay.Id
} else if strings.Contains(relay.GetCode(), "PAB") || strings.Contains(relay.GetCode(), "DPB") {
} else if strings.Contains(relay.GetCode(), "PAB") || strings.Contains(relay.GetCode(), "DPB") || strings.Contains(relay.GetCode(), "PDB") {
mkx.PabjId = relay.Id
} else if strings.Contains(relay.GetCode(), "WRZF") {
mkx.WrzfjId = relay.Id