Browse Source

pms 查询设备关联的数采点位参数信息 空指针

zhangcl 2 weeks ago
parent
commit
099757b930

+ 3 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/IotDeviceServiceImpl.java

@@ -397,6 +397,9 @@ public class IotDeviceServiceImpl implements IotDeviceService {
             return new ArrayList<>();
         }
         List<ThingsModelDTO> rows = JSON.parseArray(JSON.toJSONString(tableDataInfo.getRows()), ThingsModelDTO.class);
+        if (CollUtil.isEmpty(rows)) {
+            return new ArrayList<>();
+        }
         rows.forEach(e ->{
             IotTdParamsDO paramsDO = paramsDOS1.stream().filter(f -> f.getIdentifier().equals(e.getIdentifier())).findFirst().orElse(null);
             if (Objects.nonNull(paramsDO)) {