diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/InspectionPointServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/InspectionPointServiceImpl.java index 710dcd6b..ad4b399b 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/InspectionPointServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/InspectionPointServiceImpl.java @@ -1,6 +1,7 @@ package org.dromara.property.service.impl; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.ObjectUtil; import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; @@ -77,7 +78,7 @@ public class InspectionPointServiceImpl implements IInspectionPointService { List inspectionItemVos = inspectionItemMapper.selectVoByIds(itemIdList); result.getRecords().stream().forEach(s->{ InspectionItemVo inspectionItemVo = inspectionItemVos.stream().filter(vo -> vo.getId() != null && vo.getId().equals(s.getItemId())).findFirst().orElse(null); - s.setItemName(inspectionItemVo.getItemName()); + s.setItemName(ObjectUtil.isNotEmpty(inspectionItemVo)?inspectionItemVo.getItemName():null); }); return TableDataInfo.build(result); }