From a59f622cb3b1f0547795deef0fa67cae75582aa5 Mon Sep 17 00:00:00 2001 From: Gitea Date: Mon, 29 Jul 2024 11:06:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E8=AE=BE=E7=BD=AE=E6=AF=94=E8=B5=9B?= =?UTF-8?q?=E5=A5=96=E9=A1=B9=E6=8A=A5NULL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AnnualCompPointController.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java index ee411b4e..34860de7 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java @@ -513,6 +513,9 @@ public class AnnualCompPointController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(annualCompAward, req.getParameterMap()); queryWrapper.eq("annucompid",id); List list = annualCompAwardService.list(queryWrapper); + if(list.size()==0){ + return Result.error("未设置年度比赛奖项!"); + } QueryWrapper queryWrappersp = new QueryWrapper<>(); queryWrappersp.eq("annualid",annualCompService.getById(annualCompPoint.getAnnualCompId()).getAnnualid()); queryWrappersp.eq("annual_compid",annualCompPoint.getAnnualCompId()); @@ -656,6 +659,13 @@ public class AnnualCompPointController extends JeecgController cxhq(@RequestBody AwardPersion awardPersion,HttpServletRequest req) { + AnnualCompAward annualCompAward = new AnnualCompAward(); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annualCompAward, req.getParameterMap()); + queryWrapper.eq("annucompid",awardPersion.getAnnualCompP()); + List list = annualCompAwardService.list(queryWrapper); + if(list.size()==0){ + return Result.error("未设置年度比赛奖项!"); + } AwardPersion awardPersionqw = new AwardPersion(); QueryWrapper queryWrapperap = QueryGenerator.initQueryWrapper(awardPersionqw, req.getParameterMap()); queryWrapperap.eq("annualid",awardPersion.getAnnualid()); @@ -668,10 +678,6 @@ public class AnnualCompPointController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(annualCompAward, req.getParameterMap()); - queryWrapper.eq("annucompid",awardPersion.getAnnualCompP()); - List list = annualCompAwardService.list(queryWrapper); QueryWrapper queryWrappersp = new QueryWrapper<>(); queryWrappersp.eq("annualid",annualCompService.getById(annualCompPoint.getAnnualCompId()).getAnnualid()); queryWrappersp.eq("annual_compid",annualCompPoint.getAnnualCompId());