From dc09ea375b07cf0b30359ac25589a6ce75784d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Thu, 18 Jul 2024 15:09:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B4=E5=BA=A6=E6=AF=94=E8=B5=9B=E4=B8=AD?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=B9=B4=E5=BA=A6=E6=AF=94=E8=B5=9B=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E4=B8=8D=E5=90=88=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...alCompetitionProjectRegistrationController.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java index 6e4255c0..7e09e6f3 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java @@ -267,7 +267,19 @@ public class AnnualCompetitionProjectRegistrationController { queryWrapper.in("enroll_code", eCodes); return; } else if (role.equals("committee")) { - List annualCompPointList = annualCompPointService.query().eq("create_by", loginUser.getUsername()).list(); + //首先获取负责的比赛 + List compList = compService.query().eq("comp_admin",loginUser.getUsername()).list(); + //将比赛的id放进一个list里面 + List compIds = compList.stream() + .map(Comp::getId) // 使用方法引用获取每个Comp对象的id + .collect(Collectors.toList()); // 收集到List中 + //根据比赛的id查询年度比赛id,这里没有去卡年度 + List annualCompList = annualCompService.query().in("compid",compIds).list(); + //将年度比赛id存放到一个list里面 + List anncompIds = annualCompList.stream() + .map(AnnualComp::getId) // 使用方法引用获取每个Comp对象的id + .collect(Collectors.toList()); // 收集到List中 + List annualCompPointList = annualCompPointService.query().in("annual_comp_id", anncompIds).list(); List aIds = new ArrayList<>(); aIds.add(""); for (AnnualCompPoint annualCompPoint : annualCompPointList)