奖项导入报错提示

main
Gitea 4 months ago
parent fd4166882e
commit a9f89d25f0
  1. 17
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java

@ -539,10 +539,23 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, request.getParameterMap());
queryWrappertm.eq("enroll_code",list.get(i).getEnrollCode());
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm);
if(annualService.getannualthisid(list.get(i).getAnnualid())==null){
String nd = annualService.getannualthisid(list.get(i).getAnnualid());
if(nd==null){
return Result.error("文件导入失败:第"+(i+1)+"行年度不存在");
}else{
list.get(i).setAnnualid(annualService.getannualthisid(list.get(i).getAnnualid()));
list.get(i).setAnnualid(nd);
}
QueryWrapper<AnnualComp> queryWrapperndbs = new QueryWrapper<>();
queryWrapperndbs.eq("name",list.get(i).getAnnalComp());
List<AnnualComp> listndbs = annualCompService.list(queryWrapperndbs);
if(listndbs.size()==0){
return Result.error("文件导入失败:第"+(i+1)+"行年度比赛不存在");
}
QueryWrapper<AnnualCompPoint> queryWrapperndbsxm = new QueryWrapper<>();
queryWrapperndbsxm.eq("obj_name",list.get(i).getAnnualCompP());
List<AnnualCompPoint> listndbsxm = annualCompPointService.list(queryWrapperndbsxm);
if(listndbsxm.size()==0){
return Result.error("文件导入失败:第"+(i+1)+"行年度比赛项目不存在");
}
try {
for (int l = 0 ; l < listtm.size() ; l++){

Loading…
Cancel
Save