未设置比赛奖项报NULL

main
Gitea 4 months ago
parent ccf9a95bda
commit a59f622cb3
  1. 14
      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<AnnualCompPoint,
QueryWrapper<AnnualCompAward> queryWrapper = QueryGenerator.initQueryWrapper(annualCompAward, req.getParameterMap());
queryWrapper.eq("annucompid",id);
List<AnnualCompAward> list = annualCompAwardService.list(queryWrapper);
if(list.size()==0){
return Result.error("未设置年度比赛奖项!");
}
QueryWrapper<ScorePersion> 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<AnnualCompPoint,
@ApiOperation(value="评奖数据生成", notes="评奖数据生成")
@PostMapping(value = "/cxhq")
public Result<String> cxhq(@RequestBody AwardPersion awardPersion,HttpServletRequest req) {
AnnualCompAward annualCompAward = new AnnualCompAward();
QueryWrapper<AnnualCompAward> queryWrapper = QueryGenerator.initQueryWrapper(annualCompAward, req.getParameterMap());
queryWrapper.eq("annucompid",awardPersion.getAnnualCompP());
List<AnnualCompAward> list = annualCompAwardService.list(queryWrapper);
if(list.size()==0){
return Result.error("未设置年度比赛奖项!");
}
AwardPersion awardPersionqw = new AwardPersion();
QueryWrapper<AwardPersion> queryWrapperap = QueryGenerator.initQueryWrapper(awardPersionqw, req.getParameterMap());
queryWrapperap.eq("annualid",awardPersion.getAnnualid());
@ -668,10 +678,6 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
}
}
AnnualCompPoint annualCompPoint = annualCompPointService.getById(awardPersion.getAnnualCompP());
AnnualCompAward annualCompAward = new AnnualCompAward();
QueryWrapper<AnnualCompAward> queryWrapper = QueryGenerator.initQueryWrapper(annualCompAward, req.getParameterMap());
queryWrapper.eq("annucompid",awardPersion.getAnnualCompP());
List<AnnualCompAward> list = annualCompAwardService.list(queryWrapper);
QueryWrapper<ScorePersion> queryWrappersp = new QueryWrapper<>();
queryWrappersp.eq("annualid",annualCompService.getById(annualCompPoint.getAnnualCompId()).getAnnualid());
queryWrappersp.eq("annual_compid",annualCompPoint.getAnnualCompId());

Loading…
Cancel
Save