From 7b38baa22860108de407922483ce98e8027646fc Mon Sep 17 00:00:00 2001 From: lucas Date: Thu, 14 Nov 2024 13:57:40 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=B7=BB=E5=8A=A0=E5=85=89=E7=94=B5?= =?UTF-8?q?=E6=8C=A0=E5=BA=A6=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configFiles/config_江苏农村公路桥梁.json | 7 ++++++- consumers/JSNCGLQL/config.go | 1 + consumers/consumerJSNCGLQL.go | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/configFiles/config_江苏农村公路桥梁.json b/configFiles/config_江苏农村公路桥梁.json index a5c27bc..c5b360c 100644 --- a/configFiles/config_江苏农村公路桥梁.json +++ b/configFiles/config_江苏农村公路桥梁.json @@ -10,7 +10,8 @@ "clientId": "goUpload_JSNCGLQL", "Topics": [ "upload/uds/+", - "upload/ZD/+" + "upload/ZD/+", + "upload/gdnd/+" ] } }, @@ -38,6 +39,10 @@ "ZDsensorMap": { "m1c1": "LHTDQ-VIB-C08-001-01", "m1c2": "LHTDQ-VIB-L03-001-01" + }, + "GDNDsensorMap": { + "DY-DIS-ZG03-01": "LHTDQ-GDND-G03-003-01", + "m3c2": "LHTDQ-GDND-G03-003-02" } } } \ No newline at end of file diff --git a/consumers/JSNCGLQL/config.go b/consumers/JSNCGLQL/config.go index 436bf8f..6849a12 100644 --- a/consumers/JSNCGLQL/config.go +++ b/consumers/JSNCGLQL/config.go @@ -23,6 +23,7 @@ type OUT struct { type SensorConfig struct { TYCJsensorMap map[string]string `json:"TYCJsensorMap"` ZDsensorMap map[string]string `json:"ZDsensorMap"` + GDNDsensorMap map[string]string `json:"GDNDsensorMap"` } type SensorInfo struct { diff --git a/consumers/consumerJSNCGLQL.go b/consumers/consumerJSNCGLQL.go index 956a59f..b880c33 100644 --- a/consumers/consumerJSNCGLQL.go +++ b/consumers/consumerJSNCGLQL.go @@ -116,6 +116,9 @@ func (the *consumerJSNCGLQL) getAdaptor(flag string) (adaptor adaptors.IAdaptor4 case "upload/ZD": log.Printf("[振动软件]-上报,准备处理") adaptor = adaptors.Adaptor_ZD_JSNCGLQL{IdMap: the.Info.ZDsensorMap, BridgeCode: bridgeCode} + case "upload/gdnd": + log.Printf("[光电挠度]-上报,准备处理") + adaptor = adaptors.Adaptor_GDND2LA_JSNCGLQL{IdMap: the.Info.GDNDsensorMap, BridgeCode: bridgeCode} default: log.Printf("[无匹配 %s],不处理", flag) }