diff --git a/et_calc/dataCalc.go b/et_calc/dataCalc.go index a6c4310..93f0e0d 100644 --- a/et_calc/dataCalc.go +++ b/et_calc/dataCalc.go @@ -107,11 +107,16 @@ func (the *CalcHandler) calcFormula(p *common_models.ProcessData) *common_models log.Printf("设备[%s]字段[%s]无绑定的监测原型[%s-%s] 字段输出", device.IotaDeviceId, inK, protoObj.Name, protoObj.Code) continue } + outUnit := protoObj.GetProtoItem(outKey).UnitName k := the.unitHelper.GetUnitTransK(inUnit, outUnit) if v, ok := inV.(float64); ok { outMap[outKey] = common_calc.Decimal(v*k, 5) } else { + if inV == "nil" { + //数据模拟工具出现的称重 lane异常值 跳过 + continue + } outMap[outKey] = inV }