diff --git a/src/main/java/com/chint/manage/util/BaseUtil.java b/src/main/java/com/chint/manage/util/BaseUtil.java index 6db0cdb2..2d3ad896 100644 --- a/src/main/java/com/chint/manage/util/BaseUtil.java +++ b/src/main/java/com/chint/manage/util/BaseUtil.java @@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.List; +import java.util.Objects; /** * 基础方法工具类 @@ -28,7 +29,7 @@ public class BaseUtil { } public List getRouteIds(){ - List list = BaseContext.getCurrentUser().loadRoleOrg().getRoleOrgCodeList(); + List list = BaseContext.getCurrentUser().loadRoleOrg().getRoleOrgCodeList().stream().filter(Objects::nonNull).toList(); List result= jdbcRouteOrderExtensionFieldBasicRepository.findAllByBelongDeptCodeIn(list); return result.stream().map(RouteOrderExtensionFieldBasic::getRouteId).toList(); }