Explorar el Código

排水-监测设备 GIS 一张图

zengy hace 5 días
padre
commit
eeab5e786a

+ 0 - 1
pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/base/EquipmentBaseController.java

@@ -1,7 +1,6 @@
 package com.zksy.web.controller.base;
 
 
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.zksy.base.domain.EquipmentBase;
 import com.zksy.base.domain.vo.EquipmentBaseVO;

+ 3 - 1
pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/service/impl/WarningThresholdServiceImpl.java

@@ -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());