From 714c6b6915ffcfdcf6a85e9528dbf1d12ca7f8be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Fri, 19 Jan 2024 15:43:18 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/AnnconalCompServiceImpl.java | 12 ++++++++---- .../src/views/dashboard/Analysis/index1.vue | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompIntface/service/AnnconalCompServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompIntface/service/AnnconalCompServiceImpl.java index 3f95f01e..c39bc6bb 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompIntface/service/AnnconalCompServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompIntface/service/AnnconalCompServiceImpl.java @@ -58,10 +58,14 @@ public class AnnconalCompServiceImpl implements AnnconalCompService{ //本年度参加比赛队伍数=============================开始==================== List annualCompidsList = annualCompList.stream().map(AnnualComp::getId).collect(Collectors.toList()); - List annualCompPointList =annualCompPointService.list(new LambdaQueryWrapper().in(AnnualCompPoint::getAnnualCompId,annualCompidsList)); - List annualCompPointidsList = annualCompPointList.stream().map(AnnualCompPoint::getId).collect(Collectors.toList()); - List annualCompetitionProjectRegistrationList = annualCompetitionProjectRegistrationService.list(new LambdaQueryWrapper().in(AnnualCompetitionProjectRegistration::getAnnualCompid,annualCompPointidsList)); - resultMap.put("num02",annualCompetitionProjectRegistrationList.size()); + if(!annualCompidsList.isEmpty()) { + List annualCompPointList = annualCompPointService.list(new LambdaQueryWrapper().in(AnnualCompPoint::getAnnualCompId, annualCompidsList)); + List annualCompPointidsList = annualCompPointList.stream().map(AnnualCompPoint::getId).collect(Collectors.toList()); + List annualCompetitionProjectRegistrationList = annualCompetitionProjectRegistrationService.list(new LambdaQueryWrapper().in(AnnualCompetitionProjectRegistration::getAnnualCompid, annualCompPointidsList)); + resultMap.put("num02", annualCompetitionProjectRegistrationList.size()); + }else { + resultMap.put("num02", 0); + } //本年度参加比赛队伍数=============================结束==================== diff --git a/jeecgboot-vue3-master/src/views/dashboard/Analysis/index1.vue b/jeecgboot-vue3-master/src/views/dashboard/Analysis/index1.vue index 8ea7795d..18f04054 100644 --- a/jeecgboot-vue3-master/src/views/dashboard/Analysis/index1.vue +++ b/jeecgboot-vue3-master/src/views/dashboard/Analysis/index1.vue @@ -209,7 +209,7 @@ export default { name: "index1", data() { return { - urlList: "http://10.115.112.52:18082/jeecg-boot/admin/inde/inde", + urlList: "/jeecgboot/admin/inde/inde", loading:false, num01:'',//本年度已展开比赛数 num02:'',//本年度参加比赛学校数