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));