河南机电职业学院-首页数据统计优化

main
zhc077 4 months ago
parent f6d331c2b9
commit 34f2e164e2
  1. 10
      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<Annual>().eq(Annual::getAnnualName, currentYear + ""));
List<Comp> compList = iCompService.list(new LambdaQueryWrapper<Comp>().eq(Comp::getCompOrgan, departId));
Set<String> compIds = Optional.ofNullable(compList).orElse(new LinkedList<>()).stream().map(obj -> obj.getId()).collect(Collectors.toSet());
List<AnnualComp> annualCompList = new ArrayList<>();
if (ObjectUtil.isNotNull(compIds)) {
annualCompList = iAnnualCompService.list(new LambdaQueryWrapper<AnnualComp>()
.eq(AnnualComp::getAnnualid, annual.getId())
.in(AnnualComp::getCompid, compIds));
if (ObjectUtils.isEmpty(compIds)) {
return resultMap;
}
List<AnnualComp> annualCompList = iAnnualCompService.list(new LambdaQueryWrapper<AnnualComp>()
.eq(AnnualComp::getAnnualid, annual.getId())
.in(AnnualComp::getCompid, compIds));
Set<String> annualCompIds = Optional.ofNullable(annualCompList).orElse(new LinkedList<>()).stream().map(obj -> obj.getId()).collect(Collectors.toSet());
List<AnnualCompPoint> annualCompPointList = iAnnualCompPointService.list(new LambdaQueryWrapper<AnnualCompPoint>().in(AnnualCompPoint::getAnnualCompId, annualCompIds));

Loading…
Cancel
Save