|
|
@@ -117,7 +117,9 @@ public class WarningThresholdServiceImpl extends ServiceImpl<WarningThresholdMap
|
|
|
view.setEquipmentTypeName(type == null ? device.getEquipmentTypeName() : type.getTypeName());
|
|
|
for (EquipmentWarningType meta : metadata.getOrDefault(device.getEquipmentTypeId(), Collections.emptyList())) {
|
|
|
WarningType wt = wtById.get(meta.getWarningTypeId());
|
|
|
- String code = wt == null ? null : wt.getWarningCode();
|
|
|
+ // 只返回 warning_type.data_type 已配置(非空)的阈值指标
|
|
|
+ if (wt == null || wt.getDataType() == null) continue;
|
|
|
+ String code = wt.getWarningCode();
|
|
|
WarningThresholdItem item = new WarningThresholdItem();
|
|
|
item.setId(meta.getEquipmentTypeId() != null && meta.getWarningTypeId() != null ? meta.getEquipmentTypeId() * 100000 + meta.getWarningTypeId() : null); item.setEquipmentTypeId(meta.getEquipmentTypeId()); item.setWarningCode(code);
|
|
|
item.setWarningName(wt == null ? null : wt.getWarningName()); item.setWarningUnit(wt == null ? null : wt.getWarningUnit());
|