From acbd1b877ead8227473219275635f7d97e839195 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Mon, 2 Sep 2024 10:46:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=A2=E9=98=9F=E8=B5=9B=E9=98=9F=E5=91=98?= =?UTF-8?q?=E4=BD=8D=E6=AC=A1=E6=AF=94=E5=80=BC=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demo/homepage/service/UserHomePageServiceImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 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 423f76c0..e8f95ff0 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 @@ -387,9 +387,10 @@ public class UserHomePageServiceImpl implements UserHomePageService { Set compIds = Optional.ofNullable(annualCompList).orElse(new LinkedList<>()).stream().map(obj -> obj.getId()).collect(Collectors.toSet()); List annualCompPointList = iAnnualCompPointService.list(new LambdaQueryWrapper().in(!ObjectUtils.isEmpty(compIds), AnnualCompPoint::getAnnualCompId, compIds)); + if(ObjectUtil.isEmpty(annualCompPointList)) return resultMap; //当前年,所有项目id Set annualCompPointIds = Optional.ofNullable(annualCompPointList).orElse(new ArrayList<>()).stream().map(annualCompPoint -> annualCompPoint.getId()).collect(Collectors.toSet()); - + if(ObjectUtil.isEmpty(annualCompPointIds)) return resultMap; //未评奖的项目为进行中 List pj0PointList = Optional.ofNullable(annualCompPointList).orElse(new LinkedList<>()).stream().filter(bo -> "0".equals(bo.getIsPj())).collect(Collectors.toList()); Map countMap = this.convertProjectLevel(annualCompPointList); @@ -658,10 +659,13 @@ public class UserHomePageServiceImpl implements UserHomePageService { .in(!ObjectUtils.isEmpty(compIds), AnnualComp::getCompid, compIds)); Set annualCompIds = Optional.ofNullable(annualCompList).orElse(new LinkedList<>()).stream().map(obj -> obj.getId()).collect(Collectors.toSet()); + if(ObjectUtil.isEmpty(annualCompIds)) return resultMap; List annualCompPointList = iAnnualCompPointService.list(new LambdaQueryWrapper().in(AnnualCompPoint::getAnnualCompId, annualCompIds)); + if(ObjectUtil.isEmpty(annualCompPointList)) return resultMap; + //该部门,当前年,所有项目id Set annualCompPointIds = Optional.ofNullable(annualCompPointList).orElse(new ArrayList<>()).stream().map(annualCompPoint -> annualCompPoint.getId()).collect(Collectors.toSet()); - + if(ObjectUtil.isEmpty(annualCompPointIds)) return resultMap; //未评奖的项目为进行中 List pj0PointList = Optional.ofNullable(annualCompPointList).orElse(new LinkedList<>()).stream().filter(bo -> "0".equals(bo.getIsPj())).collect(Collectors.toList()); Map countMap = this.convertProjectLevel(annualCompPointList);