From 34926c934e70f9c3c8c109bf98bb3b1f745dd819 Mon Sep 17 00:00:00 2001 From: yfh Date: Thu, 3 Oct 2024 20:58:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E5=85=AC=E5=BC=8F=E8=8E=B7?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- containerApp/go.mod | 2 +- et_Info/InfoHandler.go | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/containerApp/go.mod b/containerApp/go.mod index f855dac..bf6e79f 100644 --- a/containerApp/go.mod +++ b/containerApp/go.mod @@ -2,7 +2,7 @@ module containerApp go 1.23.1 -require gitea.anxinyun.cn/container/common_utils v0.0.8 +require gitea.anxinyun.cn/container/common_utils v0.0.9 require ( github.com/fsnotify/fsnotify v1.7.0 // indirect diff --git a/et_Info/InfoHandler.go b/et_Info/InfoHandler.go index 68c7c7e..cf2a806 100644 --- a/et_Info/InfoHandler.go +++ b/et_Info/InfoHandler.go @@ -69,23 +69,23 @@ func (the *InfoHandler) getFormulaInfo(p *common_models.ProcessData) { if err != nil { panic(err) } - //for i2, device := range p.Stations[i].Info.Devices { - // formulaInfo, err := the.configHelper.GetFormulaInfo(device.FormulaId) - // if err == nil { - // p.Stations[i].Info.Devices[i2].FormulaInfo = formulaInfo - // p.Stations[i].Info.Devices[i2].DeviceFactorProto = deviceFactorProto - // } - //} - - // TODO #TEST BEGIN 2024-10-01 测点设备没有公式信息,测试时先从设备监测原型中获取 - for i2, _ := range p.Stations[i].Info.Devices { - p.Stations[i].Info.Devices[i2].FormulaId = deviceFactorProto.Formula - formulaInfo, err := the.configHelper.GetFormulaInfo(deviceFactorProto.Formula) + for i2, device := range p.Stations[i].Info.Devices { + formulaInfo, err := the.configHelper.GetFormulaInfo(device.FormulaId) if err == nil { p.Stations[i].Info.Devices[i2].FormulaInfo = formulaInfo p.Stations[i].Info.Devices[i2].DeviceFactorProto = deviceFactorProto } } + + // TODO #TEST BEGIN 2024-10-01 测点设备没有公式信息,测试时先从设备监测原型中获取 + //for i2, _ := range p.Stations[i].Info.Devices { + // p.Stations[i].Info.Devices[i2].FormulaId = deviceFactorProto.Formula + // formulaInfo, err := the.configHelper.GetFormulaInfo(deviceFactorProto.Formula) + // if err == nil { + // p.Stations[i].Info.Devices[i2].FormulaInfo = formulaInfo + // p.Stations[i].Info.Devices[i2].DeviceFactorProto = deviceFactorProto + // } + //} // #TEST END } }