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 } }