From a32d491b635047f9ba61bff5679be1db265b9e7d Mon Sep 17 00:00:00 2001 From: nixj Date: Thu, 27 Jun 2024 15:52:54 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90add=E3=80=91=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=9D=83=E9=99=90=E8=8E=B7=E5=8F=96=E6=96=B0=E5=A2=9Enull?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/chint/manage/util/BaseUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); }