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