diff --git a/src/main/java/com/chint/manage/util/BaseUtil.java b/src/main/java/com/chint/manage/util/BaseUtil.java index 2d3ad896..228c35b6 100644 --- a/src/main/java/com/chint/manage/util/BaseUtil.java +++ b/src/main/java/com/chint/manage/util/BaseUtil.java @@ -1,7 +1,6 @@ package com.chint.manage.util; import com.chint.domain.aggregates.user.User; -import com.chint.domain.value_object.system.SystemOrganizationVO; import com.chint.infrastructure.util.BaseContext; import com.chint.manage.entity.RouteOrderExtensionFieldBasic; import com.chint.manage.mapper.JdbcOrderDetailBasicRepository; @@ -30,17 +29,20 @@ public class BaseUtil { public List getRouteIds(){ List list = BaseContext.getCurrentUser().loadRoleOrg().getRoleOrgCodeList().stream().filter(Objects::nonNull).toList(); + if (list.isEmpty()) return null; List result= jdbcRouteOrderExtensionFieldBasicRepository.findAllByBelongDeptCodeIn(list); return result.stream().map(RouteOrderExtensionFieldBasic::getRouteId).toList(); } public List getOrderIds(){ List routeIds = getRouteIds(); + if (routeIds.isEmpty()) return null; return jdbcOrderDetailBasicRepository.findAllOrderId(routeIds); } public List getOrderNos(){ List routeIds = getRouteIds(); + if (routeIds.isEmpty()) return null; return jdbcOrderDetailBasicRepository.findAllOrderNo(routeIds); }