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());