From 34f2e164e25e3bfe4b631ae9ed51122c818e9324 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Thu, 18 Jul 2024 15:54:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=B3=E5=8D=97=E6=9C=BA=E7=94=B5=E8=81=8C?= =?UTF-8?q?=E4=B8=9A=E5=AD=A6=E9=99=A2-=E9=A6=96=E9=A1=B5=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demo/homepage/service/UserHomePageServiceImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java index f0f8c163..ace99a83 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java @@ -113,12 +113,12 @@ public class UserHomePageServiceImpl implements UserHomePageService { Annual annual = iAnnualService.getOne(new LambdaQueryWrapper().eq(Annual::getAnnualName, currentYear + "")); List compList = iCompService.list(new LambdaQueryWrapper().eq(Comp::getCompOrgan, departId)); Set compIds = Optional.ofNullable(compList).orElse(new LinkedList<>()).stream().map(obj -> obj.getId()).collect(Collectors.toSet()); - List annualCompList = new ArrayList<>(); - if (ObjectUtil.isNotNull(compIds)) { - annualCompList = iAnnualCompService.list(new LambdaQueryWrapper() - .eq(AnnualComp::getAnnualid, annual.getId()) - .in(AnnualComp::getCompid, compIds)); + if (ObjectUtils.isEmpty(compIds)) { + return resultMap; } + List annualCompList = iAnnualCompService.list(new LambdaQueryWrapper() + .eq(AnnualComp::getAnnualid, annual.getId()) + .in(AnnualComp::getCompid, compIds)); Set annualCompIds = Optional.ofNullable(annualCompList).orElse(new LinkedList<>()).stream().map(obj -> obj.getId()).collect(Collectors.toSet()); List annualCompPointList = iAnnualCompPointService.list(new LambdaQueryWrapper().in(AnnualCompPoint::getAnnualCompId, annualCompIds));